Revert "Disease stages" (#9034)
This commit is contained in:
@@ -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