Cleaned up obsolete properties from MobStateComponent (#13097)

Co-authored-by: Jezithyr <Jezithyr@gmail.com>
This commit is contained in:
Jezithyr
2022-12-19 19:25:35 -08:00
committed by GitHub
parent 7259acfb18
commit 5f9b4adf47
22 changed files with 91 additions and 78 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Disease;
using Content.Server.Disease.Components;
using Content.Server.MobState;
using Content.Server.Station.Systems;
using Content.Shared.Disease;
using Content.Shared.MobState.Components;
@@ -13,6 +14,7 @@ namespace Content.Server.StationEvents.Events;
public sealed class DiseaseOutbreak : StationEventSystem
{
[Dependency] private readonly DiseaseSystem _diseaseSystem = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
public override string Prototype => "DiseaseOutbreak";
@@ -42,7 +44,7 @@ public sealed class DiseaseOutbreak : StationEventSystem
List<DiseaseCarrierComponent> aliveList = new();
foreach (var (carrier, mobState) in EntityManager.EntityQuery<DiseaseCarrierComponent, MobStateComponent>())
{
if (!mobState.IsDead())
if (!_mobStateSystem.IsDead(mobState.Owner, mobState))
aliveList.Add(carrier);
}
RobustRandom.Shuffle(aliveList);