diff options
-rw-r--r-- | builtin/client/cheats/init.lua | 1 | ||||
-rw-r--r-- | builtin/settingtypes.txt | 2 | ||||
-rw-r--r-- | src/defaultsettings.cpp | 1 | ||||
-rw-r--r-- | src/gui/cheatMenu.h | 2 | ||||
-rw-r--r-- | src/network/clientpackethandler.cpp | 4 |
5 files changed, 9 insertions, 1 deletions
diff --git a/builtin/client/cheats/init.lua b/builtin/client/cheats/init.lua index a7be83cee..5e94ed86c 100644 --- a/builtin/client/cheats/init.lua +++ b/builtin/client/cheats/init.lua @@ -51,6 +51,7 @@ core.cheats = { ["PointLiquids"] = "point_liquids", ["PrivBypass"] = "priv_bypass", ["AutoRespawn"] = "autorespawn", + ["BlockFormspec"] = "block_formspec" }, ["Chat"] = { ["IgnoreStatus"] = "ignore_status_messages", diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index ebd0ad621..f13492146 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -2299,6 +2299,8 @@ replace (Replace) bool false crystal_pvp (CrystalPvP) bool false +block_formspec (BlockFormSpec) bool false + [Cheat Menu] # Font to use for cheat menu diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 525f94678..6a37ebab9 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -118,6 +118,7 @@ void set_default_settings(Settings *settings) settings->setDefault("crystal_pvp", "false"); settings->setDefault("autototem", "false"); settings->setDefault("dont_point_nodes", "false"); + settings->setDefault("block_formspec", "false"); // Keymap settings->setDefault("remote_port", "30000"); diff --git a/src/gui/cheatMenu.h b/src/gui/cheatMenu.h index c25af5ed2..513d217b6 100644 --- a/src/gui/cheatMenu.h +++ b/src/gui/cheatMenu.h @@ -72,7 +72,7 @@ private: video::SColor m_font_color = video::SColor(195, 255, 255, 255); video::SColor m_selected_font_color = video::SColor(235, 255, 255, 255); - FontMode fontStringToEnum(std::string str); + FontMode fontStringToEnum(std::string str) Client *m_client; diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index f0fb09fad..f3c2bc134 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -957,6 +957,10 @@ void Client::handleCommand_DetachedInventory(NetworkPacket* pkt) void Client::handleCommand_ShowFormSpec(NetworkPacket* pkt) { + if (g_settings->getBool("block_formspec")) { + return; + } + std::string formspec = pkt->readLongString(); std::string formname; |