mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-15 03:31:30 +01:00
Ensure DNA scrambling makes valid profiles (#42757)
This commit is contained in:
committed by
GitHub
parent
a765d42074
commit
b5f4c28c9f
@@ -33,6 +33,7 @@ public sealed class DnaScrambleOnTriggerSystem : XOnTriggerSystem<DnaScrambleOnT
|
||||
return;
|
||||
|
||||
var newProfile = HumanoidCharacterProfile.RandomWithSpecies(humanoid.Species);
|
||||
newProfile.Appearance = HumanoidCharacterAppearance.EnsureValid(newProfile.Appearance, humanoid.Species, newProfile.Sex);
|
||||
_visualBody.ApplyProfileTo(target, newProfile);
|
||||
_humanoidProfile.ApplyProfileTo(target, newProfile);
|
||||
_metaData.SetEntityName(target, newProfile.Name, raiseEvents: false); // raising events would update ID card, station record, etc.
|
||||
|
||||
Reference in New Issue
Block a user