Skip to content

Commit 94e33f4

Browse files
authored
Assay Power Hotfix (#1551)
# Description Assay featured the return of a bug that was present with the "Heal Other Powers", which made it so that failing to cast the Assay power (due to attempting to use it while moving for instance), caused the player to permanently lose the ability to cast any psi powers. The reason for this and the fix for it are pretty much exactly the same as it was for HealOtherPowerSystem. Goddamn I **desperately** need to generalize these powers so I never have to go through this again. # Changelog :cl: - fix: Fixed a bug where failing to cast the Assay power meant one lost the ability to ever use psionic powers again.
1 parent 6584a62 commit 94e33f4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Content.Server/Abilities/Psionics/Abilities/AssayPowerSystem.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,19 @@ private void OnPowerUsed(EntityUid uid, PsionicComponent psionic, AssayPowerActi
4040
return;
4141

4242
var ev = new AssayDoAfterEvent(_gameTiming.CurTime, args.FontSize, args.FontColor);
43-
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.Performer, args.UseDelay - TimeSpan.FromSeconds(psionic.CurrentAmplification), ev, args.Performer, args.Target, args.Performer)
43+
var doAfterArgs = new DoAfterArgs(EntityManager, args.Performer, args.UseDelay - TimeSpan.FromSeconds(psionic.CurrentAmplification), ev, args.Performer, args.Target, args.Performer)
4444
{
4545
BlockDuplicate = true,
4646
BreakOnMove = true,
4747
BreakOnDamage = true,
48-
}, out var doAfterId);
48+
};
49+
50+
if (!_doAfterSystem.TryStartDoAfter(doAfterArgs, out var doAfterId))
51+
return;
52+
4953
psionic.DoAfter = doAfterId;
5054

5155
_popups.PopupEntity(Loc.GetString(args.PopupTarget, ("entity", args.Target)), args.Performer, PopupType.Medium);
52-
5356
_audioSystem.PlayPvs(args.SoundUse, args.Performer, AudioParams.Default.WithVolume(8f).WithMaxDistance(1.5f).WithRolloffFactor(3.5f));
5457
_psionics.LogPowerUsed(args.Performer, args.PowerName, args.MinGlimmer, args.MaxGlimmer);
5558
args.Handled = true;

0 commit comments

Comments
 (0)