new hook call method + function to delegate conversion

This commit is contained in:
Oiltanker
2022-04-15 17:15:45 +03:00
parent 891efb4c4f
commit 3eba20ecb7
39 changed files with 470 additions and 676 deletions
@@ -133,9 +133,9 @@ namespace Barotrauma.Networking
return;
}
var should = new LuaResult(GameMain.LuaCs.HookBase.Call("chatMessage", txt, c, type));
var should = GameMain.LuaCs.Hook.Call<bool?>("chatMessage", txt, c, type);
if (should.Bool())
if (should != null && should.Value)
{
return;
}