Remove ILand (#4582)
* Remove ILand * Make land not handleable * Rename ILand
This commit is contained in:
23
Content.Server/Damage/Systems/DamageOtherOnHitSystem.cs
Normal file
23
Content.Server/Damage/Systems/DamageOtherOnHitSystem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Content.Server.Damage.Components;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Damage.Systems
|
||||
{
|
||||
public class DamageOtherOnHitSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<DamageOtherOnHitComponent, ThrowDoHitEvent>(OnDoHit);
|
||||
}
|
||||
|
||||
private void OnDoHit(EntityUid uid, DamageOtherOnHitComponent component, ThrowDoHitEvent args)
|
||||
{
|
||||
if (!args.Target.TryGetComponent(out IDamageableComponent? damageable))
|
||||
return;
|
||||
|
||||
damageable.TryChangeDamage(component.DamageType, component.Amount, component.IgnoreResistances);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user