This commit is contained in:
Dmitry 2026-07-19 14:17:14 +07:00
parent cf0741df48
commit 40573ca2e4
3 changed files with 20 additions and 12 deletions

View file

@ -308,12 +308,19 @@ namespace Content.Shared.Preferences
return sex;
}
// Corvax-TTS-Start
// Corvax-TTS-Start
public static String RandomTTS(Sex sex)
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
var random = IoCManager.Resolve<IRobustRandom>();
var voiceId = random.Pick(prototypeManager
.EnumeratePrototypes<TTSVoicePrototype>()
.Where(o => CanHaveVoice(o, sex)).ToArray()
).ID;
// Corvax-TTS-End
return voiceId;
}
// Corvax-TTS-End
/// <summary>
/// Picks a random gender using species sex;
@ -380,11 +387,10 @@ namespace Content.Shared.Preferences
profile.Gender = (randomizeCfg & RandomizeCfg.Gender) != 0 ? RandomGender(profile.Sex) : baseProfile.Gender;
profile.Name = (randomizeCfg & RandomizeCfg.Name) != 0 ? RandomName(speciesProto, profile.Gender) : baseProfile.Name;
profile.Age = (randomizeCfg & RandomizeCfg.Age) != 0 ? RandomAge(speciesProto) : baseProfile.Age;
profile.TTSVoice = (randomizeCfg & RandomizeCfg.Age) != 0 ? RandomTTS(profile.Sex) : baseProfile.TTSVoice; // Corvax-TTS
profile.Appearance = HumanoidCharacterAppearance.Random(randomizeCfg, baseProfile.Appearance, speciesProto, profile.Sex);
return profile;
TTSVoice = voiceId, // Corvax-TTS
}
/// <summary>

View file

@ -36,14 +36,16 @@
accentVColor: "#DFDFDF"
- type: Icon
state: pda-seniorofficer
- type: CartridgeLoader
preinstalled:
- CrewManifestCartridge
- NotekeeperCartridge
- NanoTaskCartridge
- NewsReaderCartridge
- WantedListCartridge
- AstroNavCartridge
- type: EntityTableContainerFill
containers:
preinstalled-program-container: !type:AllSelector
children:
- id: CrewManifestCartridge
- id: NotekeeperCartridge
- id: NanoTaskCartridge
- id: NewsReaderCartridge
- id: WantedListCartridge
- id: AstroNavCartridge
- type: entity
parent: BaseSecurityPDA

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 2 KiB