Disease Stages But Epic (#9043)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -11,7 +11,12 @@ namespace Content.Shared.Disease
|
||||
/// and false otherwise
|
||||
/// </summary>
|
||||
public abstract bool Cure(DiseaseEffectArgs args);
|
||||
|
||||
/// <summary>
|
||||
/// What stages the cure applies to.
|
||||
/// probably should be all, but go wild
|
||||
/// </summary>
|
||||
[DataField("stages")]
|
||||
public readonly int[] Stages = { 0 };
|
||||
/// <summary>
|
||||
/// This is used by the disease diangoser machine
|
||||
/// to generate reports to tell people all of a disease's
|
||||
|
||||
@@ -12,6 +12,11 @@ namespace Content.Shared.Disease
|
||||
[DataField("probability")]
|
||||
public float Probability = 1.0f;
|
||||
/// <summary>
|
||||
/// What stages this effect triggers on
|
||||
/// </summary>
|
||||
[DataField("stages")]
|
||||
public readonly int[] Stages = { 0 };
|
||||
/// <summary>
|
||||
/// What effect the disease will have.
|
||||
/// </summary>
|
||||
public abstract void Effect(DiseaseEffectArgs args);
|
||||
|
||||
@@ -37,6 +37,19 @@ namespace Content.Shared.Disease
|
||||
/// </summary>
|
||||
public float Accumulator = 0f;
|
||||
/// <summary>
|
||||
/// Since accumulator is reset with TickTime, this just tracks
|
||||
/// the total amount of time a disease has been present.
|
||||
/// </summary>
|
||||
public float TotalAccumulator = 0f;
|
||||
/// <summary>
|
||||
/// Stores all the separate stages of the disease plus the time
|
||||
/// thresholds for their activation
|
||||
/// int: the disease stage (0 for baseline, 1, 2, etc.)
|
||||
/// float: the time it takes for the stage to begin.
|
||||
/// </summary>
|
||||
[DataField("stages", serverOnly: true)]
|
||||
public readonly List<float> Stages = new() { 0f };
|
||||
/// <summary>
|
||||
/// List of effects the disease has that will
|
||||
/// run every second (by default anyway)
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user