diff --git a/Content.Server/Administration/Commands/RejuvenateCommand.cs b/Content.Server/Administration/Commands/RejuvenateCommand.cs index a95fc945a1..ea7dccc96d 100644 --- a/Content.Server/Administration/Commands/RejuvenateCommand.cs +++ b/Content.Server/Administration/Commands/RejuvenateCommand.cs @@ -2,6 +2,8 @@ using Content.Server.Atmos.Components; using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Components; using Content.Server.Body.Systems; +using Content.Server.Disease.Components; +using Content.Server.Disease; using Content.Server.Nutrition.Components; using Content.Server.Nutrition.EntitySystems; using Content.Shared.Administration; @@ -12,9 +14,7 @@ using Content.Shared.Nutrition.Components; using Content.Shared.StatusEffect; using Robust.Server.Player; using Robust.Shared.Console; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Localization; + namespace Content.Server.Administration.Commands { @@ -89,6 +89,11 @@ namespace Content.Server.Administration.Commands { entMan.RemoveComponent(target); } + + if (entMan.TryGetComponent(target, out var carrier)) + { + EntitySystem.Get().CureAllDiseases(target, carrier); + } } } } diff --git a/Content.Server/Disease/DiseaseSystem.cs b/Content.Server/Disease/DiseaseSystem.cs index 00ce1eb761..c217541bb6 100644 --- a/Content.Server/Disease/DiseaseSystem.cs +++ b/Content.Server/Disease/DiseaseSystem.cs @@ -189,6 +189,17 @@ namespace Content.Server.Disease _popupSystem.PopupEntity(Loc.GetString("disease-cured"), carrier.Owner, Filter.Entities(carrier.Owner)); } + public void CureAllDiseases(EntityUid uid, DiseaseCarrierComponent? carrier = null) + { + if (!Resolve(uid, ref carrier)) + return; + + foreach (var disease in carrier.Diseases) + { + CureDisease(carrier, disease); + } + } + /// /// Called when someone interacts with a diseased person with an empty hand /// to check if they get infected