Status effects fix. Refresh the status effect cooldown. (#5708)

This commit is contained in:
pointer-to-null
2021-12-07 09:18:07 +03:00
committed by GitHub
parent 4688c74d43
commit 090e74792c
26 changed files with 111 additions and 62 deletions

View File

@@ -38,6 +38,13 @@ namespace Content.Shared.StatusEffect
[ViewVariables]
public (TimeSpan, TimeSpan) Cooldown;
/// <summary>
/// Specifies whether to refresh or accumulate the cooldown of the status effect.
/// true - refresh time, false - accumulate time.
/// </summary>
[ViewVariables]
public bool CooldownRefresh = true;
/// <summary>
/// The name of the relevant component that
/// was added alongside the effect, if any.
@@ -45,9 +52,10 @@ namespace Content.Shared.StatusEffect
[ViewVariables]
public string? RelevantComponent;
public StatusEffectState((TimeSpan, TimeSpan) cooldown, string? relevantComponent=null)
public StatusEffectState((TimeSpan, TimeSpan) cooldown, bool refresh, string? relevantComponent=null)
{
Cooldown = cooldown;
CooldownRefresh = refresh;
RelevantComponent = relevantComponent;
}
}