diff --git a/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs b/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs index 3764a4564a..daef9001bb 100644 --- a/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs +++ b/Content.Server/CriminalRecords/Systems/CriminalRecordsConsoleSystem.cs @@ -141,8 +141,6 @@ public sealed class CriminalRecordsConsoleSystem : EntitySystem criminalData = EnsureComp(entity); } criminalData.Statuses[rec.Name] = msg.Status; - criminalData.Statuses[rec.ClownName] = msg.Status; - criminalData.Statuses[rec.MimeName] = msg.Status; Dirty(entity, criminalData); } // WD EDIT END diff --git a/Content.Server/StationRecords/Systems/StationRecordsSystem.cs b/Content.Server/StationRecords/Systems/StationRecordsSystem.cs index 946d0fd772..f2641fbd42 100644 --- a/Content.Server/StationRecords/Systems/StationRecordsSystem.cs +++ b/Content.Server/StationRecords/Systems/StationRecordsSystem.cs @@ -65,7 +65,7 @@ public sealed class StationRecordsSystem : SharedStationRecordsSystem TryComp(player, out var fingerprintComponent); TryComp(player, out var dnaComponent); - CreateGeneralRecord(station, idUid.Value, profile.Name, profile.ClownName, profile.MimeName, profile.BorgName, profile.Age, profile.Species, profile.Gender, jobId, fingerprintComponent?.Fingerprint, dnaComponent?.DNA, profile, records); + CreateGeneralRecord(station, idUid.Value, Name(player), profile.Age, profile.Species, profile.Gender, jobId, fingerprintComponent?.Fingerprint, dnaComponent?.DNA, profile, records); } @@ -100,9 +100,6 @@ public sealed class StationRecordsSystem : SharedStationRecordsSystem EntityUid station, EntityUid? idUid, string name, - string clownName, - string mimeName, - string borgName, int age, string species, Gender gender, @@ -126,9 +123,6 @@ public sealed class StationRecordsSystem : SharedStationRecordsSystem var record = new GeneralStationRecord() { Name = name, - ClownName = clownName, - MimeName = mimeName, - BorgName = borgName, Age = age, JobTitle = jobPrototype.LocalizedName, JobIcon = jobPrototype.Icon, diff --git a/Content.Server/_White/AspectsSystem/Aspects/RandomAppearanceAspect.cs b/Content.Server/_White/AspectsSystem/Aspects/RandomAppearanceAspect.cs index be76447bf4..ad0dc7dc2c 100644 --- a/Content.Server/_White/AspectsSystem/Aspects/RandomAppearanceAspect.cs +++ b/Content.Server/_White/AspectsSystem/Aspects/RandomAppearanceAspect.cs @@ -3,6 +3,7 @@ using Content.Server.GameTicking.Rules.Components; using Content.Server._White.AspectsSystem.Aspects.Components; using Content.Server._White.AspectsSystem.Base; using Content.Server._White.Other.RandomHumanSystem; +using Content.Server.StationRecords.Systems; using Content.Shared.Humanoid; namespace Content.Server._White.AspectsSystem.Aspects; @@ -12,7 +13,7 @@ public sealed class RandomAppearanceAspect : AspectSystem(HandleLateJoin); + SubscribeLocalEvent(HandleLateJoin, after: new [] {typeof(StationRecordsSystem)}); } protected override void Started(EntityUid uid, RandomAppearanceAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) diff --git a/Content.Server/_White/Other/RandomHumanSystem/RandomHumanSystem.cs b/Content.Server/_White/Other/RandomHumanSystem/RandomHumanSystem.cs index 3f4018e7bb..c1bb3d293b 100644 --- a/Content.Server/_White/Other/RandomHumanSystem/RandomHumanSystem.cs +++ b/Content.Server/_White/Other/RandomHumanSystem/RandomHumanSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Humanoid; using Content.Server.IdentityManagement; using Content.Server.PDA; using Content.Server.Roles; +using Content.Server.StationRecords.Systems; using Content.Shared.Access.Components; using Content.Shared.Humanoid; using Content.Shared.Inventory; @@ -10,6 +11,7 @@ using Content.Shared.Mind.Components; using Content.Shared.NukeOps; using Content.Shared.PDA; using Content.Shared.Preferences; +using Content.Shared.StationRecords; namespace Content.Server._White.Other.RandomHumanSystem; @@ -21,7 +23,7 @@ public sealed class RandomHumanSystem : EntitySystem [Dependency] private readonly IdCardSystem _card = default!; [Dependency] private readonly PdaSystem _pda = default!; [Dependency] private readonly IdentitySystem _identity = default!; - [Dependency] private readonly RoleSystem _roles = default!; + [Dependency] private readonly StationRecordsSystem _records = default!; public override void Initialize() { @@ -58,6 +60,21 @@ public sealed class RandomHumanSystem : EntitySystem _card.TryChangeFullName(cardId, newProfile.Name, card); _pda.SetOwner(idUid.Value, pdaComponent, newProfile.Name); + if (EntityManager.TryGetComponent(cardId, out StationRecordKeyStorageComponent? keyStorage) + && keyStorage.Key is { } key) + { + if (_records.TryGetRecord(key, out var generalRecord)) + { + generalRecord.Name = newProfile.Name; + generalRecord.Age = newProfile.Age; + generalRecord.Gender = newProfile.Gender; + generalRecord.Species = newProfile.Species; + generalRecord.Profile = newProfile; + } + + _records.Synchronize(key); + } + _identity.QueueIdentityUpdate(uid); } } diff --git a/Content.Shared/StationRecords/GeneralStationRecord.cs b/Content.Shared/StationRecords/GeneralStationRecord.cs index 6727983713..6f33beec8e 100644 --- a/Content.Shared/StationRecords/GeneralStationRecord.cs +++ b/Content.Shared/StationRecords/GeneralStationRecord.cs @@ -16,15 +16,6 @@ public sealed record GeneralStationRecord [DataField] public string Name = string.Empty; - [ViewVariables] - public string ClownName = string.Empty; - - [ViewVariables] - public string MimeName = string.Empty; - - [ViewVariables] - public string BorgName = string.Empty; - /// /// Age of the person that this station record represents. ///