Some shit (#380)

* telegraphy effects

* shadow step spell backend

* add component spell

* predict sharpening

* Update ring.yml

* locale sync

* Update entities.ftl

* icon shadow step
This commit is contained in:
Ed
2024-08-02 13:51:54 +03:00
committed by GitHub
parent 31c9485e3b
commit 599c599a4e
22 changed files with 410 additions and 171 deletions

View File

@@ -0,0 +1,24 @@
using Content.Shared._CP14.MeleeWeapon.Components;
using Content.Shared.Damage;
using Content.Shared.Weapons.Melee.Events;
namespace Content.Shared._CP14.MeleeWeapon.EntitySystems;
public sealed class CP14MeleeSelfDamageSystem : EntitySystem
{
[Dependency] private readonly DamageableSystem _damageable = default!;
public override void Initialize()
{
SubscribeLocalEvent<CP14MeleeSelfDamageComponent, MeleeHitEvent>(OnMeleeHit);
}
private void OnMeleeHit(Entity<CP14MeleeSelfDamageComponent> ent, ref MeleeHitEvent args)
{
if (!args.IsHit)
return;
if (args.HitEntities.Count == 0)
return;
_damageable.TryChangeDamage(ent, ent.Comp.DamageToSelf);
}
}