Move minds, roles, jobs and objectives to shared (#19679)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Mind;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Objectives;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -30,7 +31,7 @@ namespace Content.Server.Objectives.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
var minds = _entityManager.System<MindSystem>();
|
||||
var minds = _entityManager.System<SharedMindSystem>();
|
||||
if (!minds.TryGetMind(data, out var mindId, out var mind))
|
||||
{
|
||||
shell.WriteLine("Can't find the mind.");
|
||||
@@ -44,7 +45,7 @@ namespace Content.Server.Objectives.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
var mindSystem = _entityManager.System<MindSystem>();
|
||||
var mindSystem = _entityManager.System<SharedMindSystem>();
|
||||
if (!mindSystem.TryAddObjective(mindId, mind, objectivePrototype))
|
||||
{
|
||||
shell.WriteLine("Objective requirements dont allow that objective to be added.");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Mind;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Mind;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Content.Server.Objectives.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
var minds = _entities.System<MindSystem>();
|
||||
var minds = _entities.System<SharedMindSystem>();
|
||||
if (!minds.TryGetMind(player, out _, out var mind))
|
||||
{
|
||||
shell.WriteError(LocalizationManager.GetString("shell-target-entity-does-not-have-message", ("missing", "mind")));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Mind;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Mind;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.Objectives.Commands
|
||||
}
|
||||
|
||||
var mgr = IoCManager.Resolve<IPlayerManager>();
|
||||
var minds = _entityManager.System<MindSystem>();
|
||||
var minds = _entityManager.System<SharedMindSystem>();
|
||||
if (!mgr.TryGetSessionByUsername(args[0], out var session))
|
||||
{
|
||||
shell.WriteLine("Can't find the playerdata.");
|
||||
@@ -38,7 +38,7 @@ namespace Content.Server.Objectives.Commands
|
||||
|
||||
if (int.TryParse(args[1], out var i))
|
||||
{
|
||||
var mindSystem = _entityManager.System<MindSystem>();
|
||||
var mindSystem = _entityManager.System<SharedMindSystem>();
|
||||
shell.WriteLine(mindSystem.TryRemoveObjective(mind, i)
|
||||
? "Objective successfully removed!"
|
||||
: "Objective removing failed. Maybe the index is out of bounds? Check lsobjectives!");
|
||||
|
||||
Reference in New Issue
Block a user