rename hooks, introduce statusEffect.apply and update docs
This commit is contained in:
@@ -2343,7 +2343,7 @@ namespace Barotrauma
|
||||
|
||||
if (condition == 0.0f) { return; }
|
||||
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("itemUse", new object[] { this, character, targetLimb }));
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("item.use", new object[] { this, character, targetLimb }));
|
||||
|
||||
if (should.Bool())
|
||||
return;
|
||||
@@ -2381,7 +2381,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (condition == 0.0f) { return; }
|
||||
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("itemSecondaryUse", new object[] { this, character}));
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("item.secondaryUse", new object[] { this, character}));
|
||||
|
||||
if (should.Bool())
|
||||
return;
|
||||
|
||||
@@ -1138,7 +1138,10 @@ namespace Barotrauma
|
||||
{
|
||||
if (entity is Item item)
|
||||
{
|
||||
GameMain.Lua.hook.Call("statusEffect.apply." + item.Prefab.Identifier, this, deltaTime, entity, targets, worldPosition);
|
||||
var result = new LuaResult(GameMain.Lua.hook.Call("statusEffect.apply." + item.Prefab.Identifier, this, deltaTime, entity, targets, worldPosition));
|
||||
|
||||
if (result.Bool())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user