mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 08:07:28 +00:00
* initial commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * my whitespace so trailing * Merge branch 'coscult-tweakandfix' of https://github.com/AftrLite/Delta-v into coscult-tweakandfix * tweaks * 2nd content commit * linter oopsie * my yml so linter * ubuntu build test fail my beloathed * weighting tune * requested changes + audio changes for licensing * using begone * tweak * begone spawnmenu entry * yml fix, nyano code tweak, effigy tweak * review commit * testfail nonsense begone * requested changes from a review that doesn't even exist yet * emote change
28 lines
890 B
C#
28 lines
890 B
C#
using Content.Server.Abilities.Psionics;
|
|
using Content.Shared._DV.CosmicCult;
|
|
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 DispelPowerSystem _dispel = default!;
|
|
|
|
private void InitializePsionics()
|
|
{
|
|
SubscribeLocalEvent<AnomalyComponent, DispelledEvent>(OnDispelled);
|
|
}
|
|
|
|
//Nyano - Summary: gives dispellable behavior to Anomalies.
|
|
private void OnDispelled(Entity<AnomalyComponent> ent, ref DispelledEvent args)
|
|
{
|
|
if (HasComp<CosmicCultExamineComponent>(ent)) // begone nyanocode interference with cosmic cult
|
|
return;
|
|
_dispel.DealDispelDamage(ent);
|
|
ChangeAnomalyHealth(ent, 0 - _random.NextFloat(0.4f, 0.8f), ent.Comp);
|
|
args.Handled = true;
|
|
}
|
|
}
|