new hooks and item removing
This commit is contained in:
@@ -410,7 +410,7 @@ namespace Barotrauma
|
||||
if (targetLimb == null)
|
||||
{
|
||||
#if SERVER
|
||||
var should = GameMain.Lua.hook.Call("afflictionApplied", new DynValue[] { UserData.Create(this), UserData.Create(affliction) });
|
||||
var should = GameMain.Lua.hook.Call("afflictionApplied", new DynValue[] { LuaSetup.CreateUserDataSafe(this), LuaSetup.CreateUserDataSafe(affliction) });
|
||||
|
||||
if (should != null && should.CastToBool())
|
||||
{
|
||||
@@ -526,6 +526,15 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
#if SERVER
|
||||
var should = GameMain.Lua.hook.Call("afflictionApplied", new DynValue[] { LuaSetup.CreateUserDataSafe(this), LuaSetup.CreateUserDataSafe(attackResult), LuaSetup.CreateUserDataSafe(hitLimb) });
|
||||
|
||||
if (should != null && should.CastToBool())
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
foreach (Affliction newAffliction in attackResult.Afflictions)
|
||||
{
|
||||
if (newAffliction.Prefab.LimbSpecific)
|
||||
|
||||
Reference in New Issue
Block a user