mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -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)
|
.Color(THEME_COLOR)
|
||||||
.Tooltip(
|
.Tooltip(
|
||||||
"Enables randomizing all unlocked music and sound effects when you enter a new scene."));
|
"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(
|
UIWidgets::CVarCheckbox(
|
||||||
"Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop"),
|
"Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop"),
|
||||||
UIWidgets::CheckboxOptions()
|
UIWidgets::CheckboxOptions()
|
||||||
|
|
|
@ -2380,6 +2380,10 @@ void CosmeticsEditorWindow::DrawElement() {
|
||||||
UIWidgets::CheckboxOptions()
|
UIWidgets::CheckboxOptions()
|
||||||
.Color(THEME_COLOR)
|
.Color(THEME_COLOR)
|
||||||
.Tooltip("Enables randomizing all unlocked cosmetics when you enter a new scene."));
|
.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(
|
UIWidgets::CVarCheckbox(
|
||||||
"Advanced Mode", CVAR_COSMETIC("AdvancedMode"),
|
"Advanced Mode", CVAR_COSMETIC("AdvancedMode"),
|
||||||
UIWidgets::CheckboxOptions()
|
UIWidgets::CheckboxOptions()
|
||||||
|
|
|
@ -3611,6 +3611,12 @@ bool GenerateRandomizer(std::string seed /*= ""*/) {
|
||||||
}
|
}
|
||||||
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0) {
|
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0) {
|
||||||
randoThread = std::thread(&GenerateRandomizerImgui, seed);
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue