do a hook call inside callback param of HookMethod, and wrapped __params
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user