Status effects fix. Refresh the status effect cooldown. (#5708)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user