Shadow anomaly returns (#24629)

* content

* add cat

* ambient

* I FORGOT HEARTS!

* fix ambient

* some fixes

* canCollide: false

* connect to damageable

* pi

* remove fx

* some fixes

* *sad bruh*

* hazed

* Update base_shadow.yml
This commit is contained in:
Ed
2024-02-14 01:12:32 +03:00
committed by GitHub
parent f8640cf97e
commit ae321151ca
26 changed files with 468 additions and 29 deletions

View File

@@ -0,0 +1,22 @@
using Content.Server.Flash.Components;
using Content.Shared.Damage;
namespace Content.Server.Flash;
public sealed class DamagedByFlashingSystem : EntitySystem
{
[Dependency] private readonly DamageableSystem _damageable = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DamagedByFlashingComponent, FlashAttemptEvent>(OnFlashAttempt);
}
private void OnFlashAttempt(Entity<DamagedByFlashingComponent> ent, ref FlashAttemptEvent args)
{
_damageable.TryChangeDamage(ent, ent.Comp.FlashDamage);
//To Do: It would be more logical if different flashes had different power,
//and the damage would be inflicted depending on the strength of the flash.
}
}