From b47164a110bef69e6f7d75037a4feea245a74859 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Wed, 25 Oct 2023 11:14:26 -0700 Subject: [PATCH] Fixes custom sequences not being listed in Audio Manager dropdowns, and adds a check to the shuffle function to make sure sequences with `canBeUsedAsReplacement = false` can't be shuffled in. (#3324) --- soh/soh/Enhancements/audio/AudioCollection.cpp | 2 +- soh/soh/Enhancements/audio/AudioEditor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/audio/AudioCollection.cpp b/soh/soh/Enhancements/audio/AudioCollection.cpp index 0d23b6584..63456f748 100644 --- a/soh/soh/Enhancements/audio/AudioCollection.cpp +++ b/soh/soh/Enhancements/audio/AudioCollection.cpp @@ -353,7 +353,7 @@ void AudioCollection::AddToCollection(char* otrPath, uint16_t seqNum) { SequenceInfo info = {seqNum, sequenceName, StringHelper::Replace(StringHelper::Replace(StringHelper::Replace(sequenceName, " ", "_"), "~", "-"),".", ""), - type, false, false}; + type, false, true}; sequenceMap.emplace(seqNum, info); } diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp index 9374a486d..8b0615a83 100644 --- a/soh/soh/Enhancements/audio/AudioEditor.cpp +++ b/soh/soh/Enhancements/audio/AudioEditor.cpp @@ -82,7 +82,7 @@ void RandomizeGroup(SeqType type) { // use a while loop to add duplicates if we don't have enough included sequences while (values.size() < AuthenticCountBySequenceType(type)) { for (const auto& seqData : AudioCollection::Instance->GetIncludedSequences()) { - if (seqData->category & type) { + if (seqData->category & type && seqData->canBeUsedAsReplacement) { values.push_back(seqData->sequenceId); } }