This commit is contained in:
Evil Factory
2021-12-11 23:45:54 -03:00
parent d7655fa1a7
commit b58d528502
@@ -423,10 +423,10 @@ namespace Barotrauma
() => () =>
{ {
if (getValidArgs == null) return null; if (getValidArgs == null) return null;
var result = env.CallFunction(getValidArgs, new object[] { }); var result = new LuaResult(env.CallFunction(getValidArgs, new object[] { }));
if (result == null || !(result is string[][])) { return null; } var obj = result.Object();
return (string[][])result; if (obj is string[][]) return (string[][])obj;
return null;
}, isCheat); }, isCheat);
luaAddedCommand.Add(cmd); luaAddedCommand.Add(cmd);