]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Allow clown mime and borg customize names (#35170)
authorlzk <124214523+lzk228@users.noreply.github.com>
Fri, 18 Apr 2025 02:32:03 +0000 (04:32 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Apr 2025 02:32:03 +0000 (12:32 +1000)
* Allow clown mime and borg customize name

* how

* uh

* 3

* good commit

Content.Server/Station/Systems/StationSpawningSystem.cs
Resources/Prototypes/Loadouts/role_loadouts.yml

index a77716eddf931602c5673abf6301d778505f35aa..d9c80c19dd96ba59ae430eb0bd5b5ba3ac5fa3a6 100644 (file)
@@ -162,6 +162,17 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
             profile = HumanoidCharacterProfile.RandomWithSpecies(speciesId);
         }
 
+        if (profile != null)
+        {
+            _humanoidSystem.LoadProfile(entity.Value, profile);
+            _metaSystem.SetEntityName(entity.Value, profile.Name);
+
+            if (profile.FlavorText != "" && _configurationManager.GetCVar(CCVars.FlavorText))
+            {
+                AddComp<DetailExaminableComponent>(entity.Value).Content = profile.FlavorText;
+            }
+        }
+
         if (loadout != null)
         {
             EquipRoleLoadout(entity.Value, loadout, roleProto!);
@@ -176,17 +187,9 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
         var gearEquippedEv = new StartingGearEquippedEvent(entity.Value);
         RaiseLocalEvent(entity.Value, ref gearEquippedEv);
 
-        if (profile != null)
+        if (prototype != null && TryComp<MetaDataComponent>(entity.Value, out var metaData))
         {
-            if (prototype != null)
-                SetPdaAndIdCardData(entity.Value, profile.Name, prototype, station);
-
-            _humanoidSystem.LoadProfile(entity.Value, profile);
-            _metaSystem.SetEntityName(entity.Value, profile.Name);
-            if (profile.FlavorText != "" && _configurationManager.GetCVar(CCVars.FlavorText))
-            {
-                AddComp<DetailExaminableComponent>(entity.Value).Content = profile.FlavorText;
-            }
+            SetPdaAndIdCardData(entity.Value, metaData.EntityName, prototype, station);
         }
 
         DoJobSpecials(job, entity.Value);
index c2e154798bae076187b33df08f7c476d9144efe0..a304adeb3adfca2a6bb4427b19c085fa4c4cdf76 100644 (file)
   - GroupSpeciesBreathTool
 
 # Silicons
-#- type: roleLoadout
-#  id: JobBorg
-#  nameDataset: roleloadout doesn't support both so need to update that first.
-#  canCustomizeName: true
+- type: roleLoadout
+  id: JobBorg
+  nameDataset: NamesBorg
+  canCustomizeName: true
 
 - type: roleLoadout
   id: JobStationAi
 
 - type: roleLoadout
   id: JobClown
+  canCustomizeName: true
   groups:
   - GroupTankHarness
   - ClownHead
 
 - type: roleLoadout
   id: JobMime
+  canCustomizeName: true
   groups:
   - GroupTankHarness
   - MimeHead