mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 21:02:18 -05:00
only save authentic sequence cvars (#2216)
This commit is contained in:
parent
95f1ba7202
commit
6f7361e1a4
@ -189,6 +189,10 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
|||||||
for (const auto& [defaultValue, seqData] : map) {
|
for (const auto& [defaultValue, seqData] : map) {
|
||||||
const auto& [name, sfxKey, seqType] = seqData;
|
const auto& [name, sfxKey, seqType] = seqData;
|
||||||
if (seqType == type) {
|
if (seqType == type) {
|
||||||
|
// Only save authentic sequence CVars
|
||||||
|
if (seqType == SEQ_FANFARE && defaultValue >= MAX_AUTHENTIC_SEQID) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const std::string cvarKey = "gSfxEditor_" + sfxKey;
|
const std::string cvarKey = "gSfxEditor_" + sfxKey;
|
||||||
CVar_SetS32(cvarKey.c_str(), defaultValue);
|
CVar_SetS32(cvarKey.c_str(), defaultValue);
|
||||||
}
|
}
|
||||||
@ -208,7 +212,8 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
|||||||
const auto& [name, sfxKey, seqType] = seqData;
|
const auto& [name, sfxKey, seqType] = seqData;
|
||||||
const std::string cvarKey = "gSfxEditor_" + sfxKey;
|
const std::string cvarKey = "gSfxEditor_" + sfxKey;
|
||||||
if (seqType & type) {
|
if (seqType & type) {
|
||||||
if (((seqType & SEQ_BGM_CUSTOM) || seqType == SEQ_FANFARE) && defaultValue > MAX_AUTHENTIC_SEQID) {
|
// Only save authentic sequence CVars
|
||||||
|
if (((seqType & SEQ_BGM_CUSTOM) || seqType == SEQ_FANFARE) && defaultValue >= MAX_AUTHENTIC_SEQID) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const int randomValue = values.back();
|
const int randomValue = values.back();
|
||||||
@ -229,6 +234,7 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
|||||||
if (~(seqType) & type) {
|
if (~(seqType) & type) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// Do not display custom sequences in the list
|
||||||
if (((seqType & SEQ_BGM_CUSTOM) || seqType == SEQ_FANFARE) && defaultValue >= MAX_AUTHENTIC_SEQID) {
|
if (((seqType & SEQ_BGM_CUSTOM) || seqType == SEQ_FANFARE) && defaultValue >= MAX_AUTHENTIC_SEQID) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user