mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 13:53:49 -07:00
Add "Randomize on Randomizer Generation" options to Audio and Cosmetics Editors
* Added "Randomize All Music and Sound Effects on Randomizer Generation" to the Audio Editor. * Added "Randomize All on Randomizer Generation" to the Cosmetics Editor. When enabled, these options randomize audio and/or cosmetics during a new randomizer generation.
This commit is contained in:
parent
f37c3aa228
commit
d8e90a701c
3 changed files with 16 additions and 0 deletions
|
@ -564,6 +564,12 @@ void AudioEditor::DrawElement() {
|
|||
.Color(THEME_COLOR)
|
||||
.Tooltip(
|
||||
"Enables randomizing all unlocked music and sound effects when you enter a new scene."));
|
||||
UIWidgets::CVarCheckbox(
|
||||
"Randomize All Music and Sound Effects on Randomizer Generation",CVAR_AUDIO("RandomizeAllOnNewRandoGen"),
|
||||
UIWidgets::CheckboxOptions()
|
||||
.Color(THEME_COLOR)
|
||||
.Tooltip(
|
||||
"Enables randomizing all unlocked music and sound effects when you generate a new randomizer."));
|
||||
UIWidgets::CVarCheckbox(
|
||||
"Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop"),
|
||||
UIWidgets::CheckboxOptions()
|
||||
|
|
|
@ -2380,6 +2380,10 @@ void CosmeticsEditorWindow::DrawElement() {
|
|||
UIWidgets::CheckboxOptions()
|
||||
.Color(THEME_COLOR)
|
||||
.Tooltip("Enables randomizing all unlocked cosmetics when you enter a new scene."));
|
||||
UIWidgets::CVarCheckbox("Randomize All on Randomizer Generation", CVAR_COSMETIC("RandomizeAllOnNewRandoGen"),
|
||||
UIWidgets::CheckboxOptions()
|
||||
.Color(THEME_COLOR)
|
||||
.Tooltip("Enables randomizing all unlocked cosmetics when you generate a new randomizer."));
|
||||
UIWidgets::CVarCheckbox(
|
||||
"Advanced Mode", CVAR_COSMETIC("AdvancedMode"),
|
||||
UIWidgets::CheckboxOptions()
|
||||
|
|
|
@ -3611,6 +3611,12 @@ bool GenerateRandomizer(std::string seed /*= ""*/) {
|
|||
}
|
||||
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0) {
|
||||
randoThread = std::thread(&GenerateRandomizerImgui, seed);
|
||||
if (CVarGetInteger(CVAR_AUDIO("RandomizeAllOnNewRandoGen"), 0) == 1) {
|
||||
AudioEditor_RandomizeAll();
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("RandomizeAllOnNewRandoGen"), 0) == 1) {
|
||||
CosmeticsEditor_RandomizeAll();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue