Prevent opening crafting tools

This commit is contained in:
AconiteX
2021-06-07 22:16:17 -04:00
parent af69351a7e
commit 62edbcf662

View File

@@ -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