From 62edbcf662f4252780cf5bed027427d186dc3b97 Mon Sep 17 00:00:00 2001 From: AconiteX <63141077+AconiteX@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:16:17 -0400 Subject: [PATCH] Prevent opening crafting tools --- .../serverGame/src/shared/command/CommandCppFuncs.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp b/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp index 7a03d1aa..427f933c 100755 --- a/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp +++ b/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp @@ -3392,9 +3392,12 @@ static void commandFuncOpenContainer(Command const & cmd, NetworkId const &actor return; } - //-- don't open factory crates - if (container->getGameObjectType() == SharedObjectTemplate::GOT_misc_factory_crate) + //-- don't open factory crates or crafting tools + const int got = container->getGameObjectType(); + if (got == SharedObjectTemplate::GOT_misc_factory_crate || got == SharedObjectTemplate::GOT_tool_crafting) + { return; + } //-- if they are opening a crafting station, what they really want is the hopper //-- but only if the object is not a volume container