Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Winkarst-cpu committed Feb 12, 2025
1 parent 6c6c51e commit aaf5dda
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Content.Server/Administration/Systems/SuperBonkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ public sealed class SuperBonkSystem : EntitySystem
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly IGameTiming _timing = default!;

private readonly HashSet<EntityUid> _toRemove = [];

public override void Initialize()
{
base.Initialize();
Expand All @@ -38,7 +36,7 @@ private void OnMobStateChanged(Entity<SuperBonkComponent> ent, ref MobStateChang
var (uid, component) = ent;

if (component.StopWhenDead && args.NewMobState == MobState.Dead)
_toRemove.Add(uid);
RemCompDeferred<SuperBonkComponent>(uid);
}

private void OnShutdown(Entity<SuperBonkComponent> ent, ref ComponentShutdown args)
Expand Down Expand Up @@ -67,13 +65,6 @@ public override void Update(float frameTime)

comp.NextBonk += comp.BonkCooldown;
}

foreach (var uid in _toRemove)
{
RemComp<SuperBonkComponent>(uid);
}

_toRemove.Clear();
}

public void StartSuperBonk(EntityUid target, bool stopWhenDead = false)
Expand Down

0 comments on commit aaf5dda

Please sign in to comment.