Ensure DNA scrambling makes valid profiles (#42757)

This commit is contained in:
pathetic meowmeow
2026-02-02 18:54:12 -05:00
committed by GitHub
parent a765d42074
commit b5f4c28c9f

View File

@@ -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.