mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* Add new fire sprite for mice that fits them better * Add the sprite change to rats as well * Moffroach and hamsters now also have more fitting fire sprites * made the meta.json easier to read
27 lines
896 B
C#
27 lines
896 B
C#
using Content.Server.Abilities.Psionics; //Nyano - Summary: the psniocs bin where dispel is located.
|
|
using Content.Shared.Anomaly;
|
|
using Content.Shared.Anomaly.Components;
|
|
using Robust.Shared.Random;
|
|
|
|
namespace Content.Server.Anomaly;
|
|
|
|
public sealed partial class AnomalySystem
|
|
{
|
|
[Dependency] private readonly SharedAnomalySystem _sharedAnomaly = default!;
|
|
[Dependency] private readonly DispelPowerSystem _dispel = default!;
|
|
|
|
|
|
private void InitializePsionics()
|
|
{
|
|
SubscribeLocalEvent<AnomalyComponent, DispelledEvent>(OnDispelled);
|
|
}
|
|
|
|
//Nyano - Summary: gives dispellable behavior to Anomalies.
|
|
private void OnDispelled(EntityUid uid, AnomalyComponent component, DispelledEvent args)
|
|
{
|
|
_dispel.DealDispelDamage(uid);
|
|
_sharedAnomaly.ChangeAnomalyHealth(uid, 0 - _random.NextFloat(0.4f, 0.8f), component);
|
|
args.Handled = true;
|
|
}
|
|
}
|