Revert "Mind ecs" (#14881)

This commit is contained in:
Leon Friedrich
2023-03-27 10:24:00 +13:00
committed by GitHub
parent c6c8fa2075
commit 4d71b1b81e
85 changed files with 684 additions and 1150 deletions

View File

@@ -1,4 +1,3 @@
using Content.Server.Mind;
using Content.Server.Objectives.Interfaces;
using JetBrains.Annotations;
using Robust.Shared.Utility;
@@ -22,15 +21,7 @@ namespace Content.Server.Objectives.Conditions
public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Mobs/Ghosts/ghost_human.rsi"), "icon");
public float Progress
{
get
{
var entityManager = IoCManager.Resolve<EntityManager>();
var mindSystem = entityManager.System<MindSystem>();
return _mind == null || mindSystem.IsCharacterDeadIc(_mind) ? 1f : 0f;
}
}
public float Progress => (_mind?.CharacterDeadIC ?? true) ? 1f : 0f;
public float Difficulty => 0.5f;

View File

@@ -1,4 +1,3 @@
using Content.Server.Mind;
using Content.Server.Objectives.Interfaces;
using Content.Server.Station.Components;
using Content.Shared.Cuffs.Components;
@@ -47,14 +46,13 @@ namespace Content.Server.Objectives.Conditions
{
get {
var entMan = IoCManager.Resolve<IEntityManager>();
var mindSystem = entMan.System<MindSystem>();
if (_mind?.OwnedEntity == null
|| !entMan.TryGetComponent<TransformComponent>(_mind.OwnedEntity, out var xform))
return 0f;
var shuttleContainsAgent = false;
var agentIsAlive = !mindSystem.IsCharacterDeadIc(_mind);
var agentIsAlive = !_mind.CharacterDeadIC;
var agentIsEscaping = true;
if (entMan.TryGetComponent<CuffableComponent>(_mind.OwnedEntity, out var cuffed)

View File

@@ -1,4 +1,3 @@
using Content.Server.Mind;
using Content.Server.Objectives.Interfaces;
using Content.Shared.Mobs.Systems;
using Robust.Shared.Utility;
@@ -33,15 +32,7 @@ namespace Content.Server.Objectives.Conditions
public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Weapons/Guns/Pistols/viper.rsi"), "icon");
public float Progress
{
get
{
var entityManager = IoCManager.Resolve<EntityManager>();
var mindSystem = entityManager.System<MindSystem>();
return Target == null || mindSystem.IsCharacterDeadIc(Target) ? 1f : 0f;
}
}
public float Progress => (Target?.CharacterDeadIC ?? true) ? 1f : 0f;
public float Difficulty => 2f;

View File

@@ -13,7 +13,7 @@ namespace Content.Server.Objectives.Conditions
{
public override IObjectiveCondition GetAssigned(Mind.Mind mind)
{
var allHumans = EntityManager.EntityQuery<MindContainerComponent>(true).Where(mc =>
var allHumans = EntityManager.EntityQuery<MindComponent>(true).Where(mc =>
{
var entity = mc.Mind?.OwnedEntity;

View File

@@ -3,7 +3,6 @@ using Content.Server.Objectives.Interfaces;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using Content.Server.GameTicking.Rules;
using Content.Server.Mind;
namespace Content.Server.Objectives.Conditions
{
@@ -42,15 +41,7 @@ namespace Content.Server.Objectives.Conditions
public SpriteSpecifier Icon => new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/bureaucracy.rsi"), "folder-white");
public float Progress
{
get
{
var entityManager = IoCManager.Resolve<EntityManager>();
var mindSystem = entityManager.System<MindSystem>();
return _target == null || mindSystem.IsCharacterDeadIc(_target) ? 1f : 0f;
}
}
public float Progress => (!_target?.CharacterDeadIC ?? true) ? 1f : 0f;
public float Difficulty => 1.75f;