Skip to content

Commit

Permalink
Revert "Disease stages (#8405)"
Browse files Browse the repository at this point in the history
This reverts commit 13b208a.
  • Loading branch information
PaulRitter authored Jun 22, 2022
1 parent 13b208a commit dfe66ca
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 69 deletions.
4 changes: 1 addition & 3 deletions Content.Server/Disease/DiseaseSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ public override void Update(float frameTime)
{
foreach (var effect in disease.Effects)
{
if (disease.DiseaseSeverity <= effect.MaxSeverity
&& disease.DiseaseSeverity >= effect.MinSeverity
&& _random.Prob(effect.Probability))
if (_random.Prob(effect.Probability))
effect.Effect(args);
}
}
Expand Down
22 changes: 0 additions & 22 deletions Content.Server/Disease/Effects/DiseaseAddComp.cs

This file was deleted.

33 changes: 0 additions & 33 deletions Content.Shared/Disease/DiseaseEffect.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using JetBrains.Annotations;
using Robust.Shared.Utility;

namespace Content.Shared.Disease
{
Expand All @@ -16,38 +15,6 @@ public abstract class DiseaseEffect
/// What effect the disease will have.
/// </summary>
public abstract void Effect(DiseaseEffectArgs args);

/// <summary>
/// What is the minimal severity needed for this effect to occur?
/// </summary>
[DataField("minSeverity")]
public float MinSeverity
{
get => _minSeverity;
set
{
DebugTools.Assert(value > 1f || value < 0f ,"MinSeverity have been attempted to be set out of range");
_minSeverity = Math.Clamp(value, 0.0f, 1.0f);
}
}

private float _minSeverity = 0.0f;

/// <summary>
/// What is the maximum severity that this effect can occur?
/// </summary>
[DataField("maxSeverity")]
public float MaxSeverity
{
get => _maxSeverity;
set
{
DebugTools.Assert(value > 1f || value < 0f ,"MaxSeverity have been attempted to be set out of range");
_maxSeverity = Math.Clamp(value, 0.0f, 1.0f);
}
}

private float _maxSeverity = 1.0f;
}
/// <summary>
/// What you have to work with in any disease effect/cure.
Expand Down
11 changes: 0 additions & 11 deletions Content.Shared/Disease/DiseasePrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ public sealed class DiseasePrototype : IPrototype, IInheritingPrototype
/// it needs something to control its tickrate
/// </summary>
public float Accumulator = 0f;

/// <summary>
/// This controls the progression of the disease, used to stage disease effects
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float DiseaseSeverity
{
get => _diseaseServerity;
set => _diseaseServerity = Math.Clamp(value, 0f, 1f);
}
private float _diseaseServerity = 0f;
/// <summary>
/// List of effects the disease has that will
/// run every second (by default anyway)
Expand Down

0 comments on commit dfe66ca

Please sign in to comment.