Remove IMobStateComponent (#5220)
This commit is contained in:
committed by
GitHub
parent
4236551d86
commit
f5b11d6af8
@@ -8,6 +8,7 @@ using Content.Server.Popups;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
@@ -92,7 +93,7 @@ namespace Content.Server.Body.Behavior
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
if (Body != null && Body.Owner.TryGetComponent(out IMobStateComponent? mobState) && mobState.IsCritical())
|
||||
if (Body != null && Body.Owner.TryGetComponent(out MobStateComponent? mobState) && mobState.IsCritical())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.State;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Movement.EntitySystems;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -20,7 +19,7 @@ namespace Content.Server.Body
|
||||
|
||||
private void OnRelayMoveInput(EntityUid uid, BodyComponent component, RelayMoveInputEvent args)
|
||||
{
|
||||
if (EntityManager.TryGetComponent<IMobStateComponent>(uid, out var mobState) &&
|
||||
if (EntityManager.TryGetComponent<MobStateComponent>(uid, out var mobState) &&
|
||||
mobState.IsDead() &&
|
||||
EntityManager.TryGetComponent<MindComponent>(uid, out var mind) &&
|
||||
mind.HasMind)
|
||||
|
||||
@@ -13,7 +13,7 @@ using Content.Shared.Alert;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
@@ -190,7 +190,7 @@ namespace Content.Server.Body.Respiratory
|
||||
|
||||
if (bloodstreamAmount < amountNeeded)
|
||||
{
|
||||
if (!Owner.GetComponent<IMobStateComponent>().IsCritical())
|
||||
if (!Owner.GetComponent<MobStateComponent>().IsCritical())
|
||||
{
|
||||
// Panic inhale
|
||||
foreach (var lung in lungs)
|
||||
@@ -313,7 +313,7 @@ namespace Content.Server.Body.Respiratory
|
||||
/// </param>
|
||||
public void Update(float frameTime)
|
||||
{
|
||||
if (!Owner.TryGetComponent<IMobStateComponent>(out var state) ||
|
||||
if (!Owner.TryGetComponent<MobStateComponent>(out var state) ||
|
||||
state.IsDead())
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user