do a hook call inside callback param of HookMethod, and wrapped __params

This commit is contained in:
zhurengong
2021-11-11 17:19:06 +08:00
parent 9635db22fc
commit d1188a1ea5
4 changed files with 86 additions and 65 deletions
@@ -2304,6 +2304,11 @@ namespace Barotrauma
if (condition == 0.0f) { return; }
var should = new LuaResult(GameMain.Lua.hook.Call("itemUse", new object[] { this, character, targetLimb }));
if (should.Bool())
return;
bool remove = false;
foreach (ItemComponent ic in components)
@@ -2337,6 +2342,11 @@ namespace Barotrauma
{
if (condition == 0.0f) { return; }
var should = new LuaResult(GameMain.Lua.hook.Call("itemSecondaryUse", new object[] { this, character}));
if (should.Bool())
return;
bool remove = false;
foreach (ItemComponent ic in components)