Stunned Status and Knockdown Meth fix. (#39547)
* Init Commit * Remove unused code, fix stun visuals bug * Update Content.Shared/Stunnable/SharedStunSystem.cs * Some initial changes * first batch of changes * Commit * One line cleanup * KnockdownStatusEffect ain't worth it. * Fix 2 bugs * Fixes * Remove that actually, * Maybe this? * Meff fix * Meff fix * alert cleanup and API * I expect update loops to be at the top. * Fix LOC * Address review * Address review x 2 * Merg my PR * Fix * Update Content.Shared/Alert/AlertsSystem.cs webedit Co-authored-by: Perry Fraser <perryprog@users.noreply.github.com> * FIX THAT TEST FAIL!!!! * Me when I forget to actually give you alerts * Push * Tests are not failing locally why are they dying on github??? * Fix test fails (real) --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Co-authored-by: Perry Fraser <perryprog@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
abff932ca8
commit
141d903125
@@ -25,12 +25,6 @@ public sealed partial class ModifyStatusEffect : EntityEffect
|
||||
[DataField]
|
||||
public float Delay = 0f;
|
||||
|
||||
/// <remarks>
|
||||
/// true - refresh status effect time (update to greater value), false - accumulate status effect time.
|
||||
/// </remarks>
|
||||
[DataField]
|
||||
public bool Refresh = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should this effect add the status effect, remove time from it, or set its cooldown?
|
||||
/// </summary>
|
||||
@@ -49,11 +43,11 @@ public sealed partial class ModifyStatusEffect : EntityEffect
|
||||
var duration = TimeSpan.FromSeconds(time);
|
||||
switch (Type)
|
||||
{
|
||||
case StatusEffectMetabolismType.Update:
|
||||
statusSys.TryUpdateStatusEffectDuration(args.TargetEntity, EffectProto, duration, Delay > 0 ? TimeSpan.FromSeconds(Delay) : null);
|
||||
break;
|
||||
case StatusEffectMetabolismType.Add:
|
||||
if (Refresh)
|
||||
statusSys.TryUpdateStatusEffectDuration(args.TargetEntity, EffectProto, duration, Delay > 0 ? TimeSpan.FromSeconds(Delay) : null);
|
||||
else
|
||||
statusSys.TryAddStatusEffectDuration(args.TargetEntity, EffectProto, duration, Delay > 0 ? TimeSpan.FromSeconds(Delay) : null);
|
||||
statusSys.TryAddStatusEffectDuration(args.TargetEntity, EffectProto, duration, Delay > 0 ? TimeSpan.FromSeconds(Delay) : null);
|
||||
break;
|
||||
case StatusEffectMetabolismType.Remove:
|
||||
statusSys.TryAddTime(args.TargetEntity, EffectProto, -duration);
|
||||
|
||||
Reference in New Issue
Block a user