rename item hooks to use the new name scheme, register body, new meleeWeapon.handleImpact hook and statusEffect.apply.ItemIdentifier hook
This commit is contained in:
@@ -383,6 +383,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
Limb targetLimb = target.UserData as Limb;
|
||||
Character targetCharacter = targetLimb?.character ?? target.UserData as Character;
|
||||
GameMain.Lua.hook.Call("meleeWeapon.handleImpact", this, target);
|
||||
if (Attack != null)
|
||||
{
|
||||
Attack.SetUser(User);
|
||||
|
||||
@@ -1135,6 +1135,13 @@ namespace Barotrauma
|
||||
if (lifeTimer <= 0) { return; }
|
||||
}
|
||||
|
||||
{
|
||||
if (entity is Item item)
|
||||
{
|
||||
GameMain.Lua.hook.Call("statusEffect.apply." + item.Prefab.Identifier, this, deltaTime, entity, targets, worldPosition);
|
||||
}
|
||||
}
|
||||
|
||||
Hull hull = GetHull(entity);
|
||||
Vector2 position = GetPosition(entity, targets, worldPosition);
|
||||
foreach (ISerializableEntity serializableEntity in targets)
|
||||
|
||||
Reference in New Issue
Block a user