Revert "Disease stages" (#9034)
This commit is contained in:
@@ -115,9 +115,7 @@ namespace Content.Server.Disease
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using Content.Shared.Disease;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Content.Server.Disease.Effects;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class DiseaseAddComp : DiseaseEffect
|
||||
{
|
||||
[DataField("comp")]
|
||||
public string? Comp = null;
|
||||
public override void Effect(DiseaseEffectArgs args)
|
||||
{
|
||||
if (Comp == null) return;
|
||||
|
||||
EntityUid uid = args.DiseasedEntity;
|
||||
Component newComponent = (Component) IoCManager.Resolve<IComponentFactory>().GetComponent(Comp);
|
||||
newComponent.Owner = uid;
|
||||
|
||||
if (!args.EntityManager.HasComponent(uid, newComponent.GetType()))
|
||||
args.EntityManager.AddComponent(uid, newComponent);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user