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!);
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);