Skip to content

Commit

Permalink
Update PsionicRegenerationPowerSystem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed May 29, 2024
1 parent 4567016 commit 3584a4e
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Content.Shared.Popups;
using Content.Shared.Psionics.Events;
using Content.Shared.Examine;
using static Content.Shared.Examine.ExamineSystemShared;
using Robust.Shared.Timing;
using Content.Shared.Actions.Events;
using Robust.Server.Audio;
Expand All @@ -28,6 +27,7 @@ public sealed class PsionicRegenerationPowerSystem : EntitySystem
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
[Dependency] private readonly SharedPsionicAbilitiesSystem _psionics = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -73,13 +73,7 @@ private void OnPowerUsed(EntityUid uid, PsionicRegenerationPowerComponent compon

component.DoAfter = doAfterId;

_popupSystem.PopupEntity(Loc.GetString("psionic-regeneration-begin", ("entity", uid)),
uid,
// TODO: Use LoS-based Filter when one is available.
Filter.Pvs(uid).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)),
true,
PopupType.Medium);

_popupSystem.PopupEntity(Loc.GetString("psionic-regeneration-begin", ("entity", uid)), uid, PopupType.Medium);
_audioSystem.PlayPvs(component.SoundUse, uid, AudioParams.Default.WithVolume(8f).WithMaxDistance(1.5f).WithRolloffFactor(3.5f));

_psionics.LogPowerUsed(uid, "psionic regeneration",
Expand Down Expand Up @@ -122,12 +116,7 @@ private void OnMobStateChangedEvent(EntityUid uid, PsionicRegenerationPowerCompo
BreakOnDamage = false,
RequireCanInteract = false,
});
_popupSystem.PopupEntity(Loc.GetString("psionic-regeneration-self-revive", ("entity", uid)),
uid,
// TODO: Use LoS-based Filter when one is available.
Filter.Pvs(uid).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)),
true,
PopupType.MediumCaution);
_popupSystem.PopupEntity(Loc.GetString("psionic-regeneration-self-revive", ("entity", uid)), uid, PopupType.MediumCaution);
_audioSystem.PlayPvs(component.SoundUse, uid, AudioParams.Default.WithVolume(8f).WithMaxDistance(1.5f).WithRolloffFactor(3.5f));

_psionics.LogPowerUsed(uid, "psionic regeneration",
Expand Down

0 comments on commit 3584a4e

Please sign in to comment.