Remove IMobStateComponent (#5220)
This commit is contained in:
committed by
GitHub
parent
4236551d86
commit
f5b11d6af8
@@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using Content.Server.CharacterAppearance.Components;
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.CharacterAppearance.Systems;
|
||||
using Content.Shared.Cloning;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
@@ -108,7 +107,7 @@ namespace Content.Server.Cloning.Components
|
||||
if (cloningSystem.ClonesWaitingForMind.TryGetValue(mind, out var cloneUid))
|
||||
{
|
||||
if (Owner.EntityManager.TryGetEntity(cloneUid, out var clone) &&
|
||||
clone.TryGetComponent<IMobStateComponent>(out var cloneState) &&
|
||||
clone.TryGetComponent<MobStateComponent>(out var cloneState) &&
|
||||
!cloneState.IsDead() &&
|
||||
clone.TryGetComponent(out MindComponent? cloneMindComp) &&
|
||||
(cloneMindComp.Mind == null || cloneMindComp.Mind == mind))
|
||||
@@ -121,7 +120,7 @@ namespace Content.Server.Cloning.Components
|
||||
}
|
||||
|
||||
if (mind.OwnedEntity != null &&
|
||||
mind.OwnedEntity.TryGetComponent<IMobStateComponent>(out var state) &&
|
||||
mind.OwnedEntity.TryGetComponent<MobStateComponent>(out var state) &&
|
||||
!state.IsDead())
|
||||
{
|
||||
obj.Session.AttachedEntity?.PopupMessageCursor(Loc.GetString("cloning-pod-component-msg-already-alive"));
|
||||
|
||||
Reference in New Issue
Block a user