Skip to content

Commit

Permalink
Update AssayPowerSystem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Jan 15, 2025
1 parent 6584a62 commit a0cbdc0
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,19 @@ private void OnPowerUsed(EntityUid uid, PsionicComponent psionic, AssayPowerActi
return;

var ev = new AssayDoAfterEvent(_gameTiming.CurTime, args.FontSize, args.FontColor);
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.Performer, args.UseDelay - TimeSpan.FromSeconds(psionic.CurrentAmplification), ev, args.Performer, args.Target, args.Performer)
var doAfterArgs = new DoAfterArgs(EntityManager, args.Performer, args.UseDelay - TimeSpan.FromSeconds(psionic.CurrentAmplification), ev, args.Performer, args.Target, args.Performer)
{
BlockDuplicate = true,
BreakOnMove = true,
BreakOnDamage = true,
}, out var doAfterId);
};

if (!_doAfterSystem.TryStartDoAfter(doAfterArgs, out var doAfterId))
return;

psionic.DoAfter = doAfterId;

_popups.PopupEntity(Loc.GetString(args.PopupTarget, ("entity", args.Target)), args.Performer, PopupType.Medium);

_audioSystem.PlayPvs(args.SoundUse, args.Performer, AudioParams.Default.WithVolume(8f).WithMaxDistance(1.5f).WithRolloffFactor(3.5f));
_psionics.LogPowerUsed(args.Performer, args.PowerName, args.MinGlimmer, args.MaxGlimmer);
args.Handled = true;
Expand Down

0 comments on commit a0cbdc0

Please sign in to comment.