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,5 +1,4 @@
using Content.Server.Administration;
using Content.Server.Mind;
using Content.Server.Players;
using Content.Shared.Administration;
using Robust.Server.Player;
@@ -11,8 +10,6 @@ namespace Content.Server.Objectives.Commands
[AdminCommand(AdminFlags.Admin)]
public sealed class AddObjectiveCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entityManager = default!;
public string Command => "addobjective";
public string Description => "Adds an objective to the player's mind.";
public string Help => "addobjective <username> <objectiveID>";
@@ -45,10 +42,8 @@ namespace Content.Server.Objectives.Commands
shell.WriteLine($"Can't find matching ObjectivePrototype {objectivePrototype}");
return;
}
var mindSystem = _entityManager.System<MindSystem>();
if (!mindSystem.TryAddObjective(mind, objectivePrototype))
if (!mind.TryAddObjective(objectivePrototype))
{
shell.WriteLine("Objective requirements dont allow that objective to be added.");
}