Refactor minds to be entities with components, make roles components (#19591)

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
DrSmugleaf
2023-08-28 16:53:24 -07:00
committed by GitHub
parent e0ee397af7
commit 15c0211fb2
119 changed files with 1445 additions and 1289 deletions

View File

@@ -8,7 +8,7 @@ using System.Threading.Tasks;
using Content.Server.Administration.Managers;
using Content.Server.Discord;
using Content.Server.GameTicking;
using Content.Server.Players;
using Content.Server.Mind;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using JetBrains.Annotations;
@@ -31,6 +31,7 @@ namespace Content.Server.Administration.Systems
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPlayerLocator _playerLocator = default!;
[Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly MindSystem _minds = default!;
private ISawmill _sawmill = default!;
private readonly HttpClient _httpClient = new();
@@ -221,8 +222,6 @@ namespace Content.Server.Administration.Systems
return;
}
var characterName = _playerManager.GetPlayerData(userId).ContentData()?.Mind?.CharacterName;
var linkToPrevious = string.Empty;
// If we have all the data required, we can link to the embed of the previous round or embed that was too long
@@ -238,6 +237,7 @@ namespace Content.Server.Administration.Systems
}
}
var characterName = _minds.GetCharacterName(userId);
existingEmbed = (null, lookup.Username, linkToPrevious, characterName, _gameTicker.RunLevel);
}