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

@@ -2,7 +2,6 @@ using System.Linq;
using Content.Server.Administration.Commands;
using Content.Server.Cargo.Systems;
using Content.Server.Chat.Managers;
using Content.Server.Mind;
using Content.Server.Preferences.Managers;
using Content.Server.Spawners.Components;
using Content.Server.Station.Components;
@@ -39,7 +38,6 @@ public sealed class PiratesRuleSystem : GameRuleSystem
[Dependency] private readonly PricingSystem _pricingSystem = default!;
[Dependency] private readonly MapLoaderSystem _map = default!;
[Dependency] private readonly NamingSystem _namingSystem = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
[ViewVariables]
private List<Mind.Mind> _pirates = new();
@@ -208,13 +206,16 @@ public sealed class PiratesRuleSystem : GameRuleSystem
var name = _namingSystem.GetName("Human", gender);
var session = ops[i];
var newMind = _mindSystem.CreateMind(session.UserId, name);
_mindSystem.ChangeOwningPlayer(newMind, session.UserId);
var newMind = new Mind.Mind(session.UserId)
{
CharacterName = name
};
newMind.ChangeOwningPlayer(session.UserId);
var mob = Spawn("MobHuman", _random.Pick(spawns));
MetaData(mob).EntityName = name;
_mindSystem.TransferTo(newMind, mob);
newMind.TransferTo(mob);
var profile = _prefs.GetPreferences(session.UserId).SelectedCharacter as HumanoidCharacterProfile;
_stationSpawningSystem.EquipStartingGear(mob, pirateGear, profile);