From 68e52f60c962697aa922a88c5dd8a002e4ae3e8f Mon Sep 17 00:00:00 2001 From: rhailrake <49613070+rhailrake@users.noreply.github.com> Date: Thu, 4 May 2023 13:44:24 +0600 Subject: [PATCH] [feat] Custom name for clown, mime and borgs --- .../UI/HumanoidProfileEditor.Random.cs | 26 +- .../Preferences/UI/HumanoidProfileEditor.xaml | 15 + .../UI/HumanoidProfileEditor.xaml.cs | 41 +- .../Tests/Preferences/ServerDbSqliteTests.cs | 3 + ...409140454_CATaddNamesToProfile.Designer.cs | 1370 +++++++++++++++++ .../20230409140454_CATaddNamesToProfile.cs | 48 + ...409140432_CATaddNamesToProfile.Designer.cs | 1304 ++++++++++++++++ .../20230409140432_CATaddNamesToProfile.cs | 48 + Content.Server.Database/Model.cs | 3 + Content.Server/Database/ServerDbBase.cs | 6 + .../GameTicking/GameTicker.Spawning.cs | 83 +- .../Station/Systems/StationSpawningSystem.cs | 51 +- .../Systems/StationRecordsSystem.cs | 7 +- Content.Shared/Humanoid/NamingSystem.cs | 15 + Content.Shared/Mind/MindComponent.cs | 9 + Content.Shared/Mind/SharedMindSystem.cs | 5 +- .../Preferences/HumanoidCharacterProfile.cs | 124 +- .../StationRecords/GeneralStationRecord.cs | 9 + 18 files changed, 3124 insertions(+), 43 deletions(-) create mode 100644 Content.Server.Database/Migrations/Postgres/20230409140454_CATaddNamesToProfile.Designer.cs create mode 100644 Content.Server.Database/Migrations/Postgres/20230409140454_CATaddNamesToProfile.cs create mode 100644 Content.Server.Database/Migrations/Sqlite/20230409140432_CATaddNamesToProfile.Designer.cs create mode 100644 Content.Server.Database/Migrations/Sqlite/20230409140432_CATaddNamesToProfile.cs diff --git a/Content.Client/Preferences/UI/HumanoidProfileEditor.Random.cs b/Content.Client/Preferences/UI/HumanoidProfileEditor.Random.cs index c9e184dfc2..c2510a3582 100644 --- a/Content.Client/Preferences/UI/HumanoidProfileEditor.Random.cs +++ b/Content.Client/Preferences/UI/HumanoidProfileEditor.Random.cs @@ -19,7 +19,31 @@ namespace Content.Client.Preferences.UI if (Profile == null) return; var name = HumanoidCharacterProfile.GetName(Profile.Species, Profile.Gender); SetName(name); - UpdateNameEdit(); + UpdateNamesEdit(); + } + + private void RandomizeClownName() + { + if (Profile == null) return; + var name = HumanoidCharacterProfile.GetClownName(); + SetClownName(name); + UpdateNamesEdit(); + } + + private void RandomizeMimeName() + { + if (Profile == null) return; + var name = HumanoidCharacterProfile.GetMimeName(); + SetMimeName(name); + UpdateNamesEdit(); + } + + private void RandomizeBorgName() + { + if (Profile == null) return; + var name = HumanoidCharacterProfile.GetBorgName(); + SetBorgName(name); + UpdateNamesEdit(); } } } diff --git a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml index ed8155877c..e18a7932b2 100644 --- a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml +++ b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml @@ -19,6 +19,21 @@