Cleaned up obsolete properties from MobStateComponent (#13097)
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
This commit is contained in:
@@ -13,16 +13,15 @@ namespace Content.Server.Objectives.Conditions
|
||||
{
|
||||
public override IObjectiveCondition GetAssigned(Mind.Mind mind)
|
||||
{
|
||||
var entityMgr = IoCManager.Resolve<IEntityManager>();
|
||||
var allHumans = entityMgr.EntityQuery<MindComponent>(true).Where(mc =>
|
||||
var allHumans = EntityManager.EntityQuery<MindComponent>(true).Where(mc =>
|
||||
{
|
||||
var entity = mc.Mind?.OwnedEntity;
|
||||
|
||||
if (entity == default)
|
||||
return false;
|
||||
|
||||
return entityMgr.TryGetComponent(entity, out MobStateComponent? mobState) &&
|
||||
mobState.IsAlive() &&
|
||||
return EntityManager.TryGetComponent(entity, out MobStateComponent? mobState) &&
|
||||
MobStateSystem.IsAlive(entity.Value, mobState) &&
|
||||
mc.Mind != mind;
|
||||
}).Select(mc => mc.Mind).ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user