Skip to content

Commit

Permalink
Fix Hidden and Ghost Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Futuremappermydud committed Sep 9, 2024
1 parent 258cf4d commit 482746b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Enhancers/MapEnhancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ vector<string> MapEnhancer::Modifiers() const {
vector<string> result;

static auto reBeatEnabledFunc = CondDeps::Find<bool>("rebeat", "GetEnabled");
static auto reBeatHiddenFunc = CondDeps::Find<bool>("rebeat", "GetHidden");
static auto reBeatSameColorFunc = CondDeps::Find<bool>("rebeat", "GetSameColor");
static auto reBeatEasyFunc = CondDeps::Find<bool>("rebeat", "GetEasyMode");
static auto reBeatOneHpFunc = CondDeps::Find<bool>("rebeat", "GetOneHP");

bool reBeatEnabled = reBeatEnabledFunc.has_value() && reBeatEnabledFunc.value()();
bool reBeatHidden = reBeatHiddenFunc.has_value() && reBeatHiddenFunc.value()();
bool reBeatSameColor = reBeatSameColorFunc.has_value() && reBeatSameColorFunc.value()();
bool reBeatEasy = reBeatEasyFunc.has_value() && reBeatEasyFunc.value()();
bool reBeatOneHp = reBeatOneHpFunc.has_value() && reBeatOneHpFunc.value();
Expand All @@ -47,14 +49,7 @@ vector<string> MapEnhancer::Modifiers() const {
if (gameplayModifiers->songSpeed == GameplayModifiers::SongSpeed::Faster) { result.emplace_back("FS"); }
if (gameplayModifiers->songSpeed == GameplayModifiers::SongSpeed::Slower) { result.emplace_back("SS"); }
if (gameplayModifiers->songSpeed == GameplayModifiers::SongSpeed::SuperFast) { result.emplace_back("SF"); }
if (reBeatEnabled) {
static auto reBeatHiddenFunc = CondDeps::Find<bool>("rebeat", "GetHidden");
if (reBeatHiddenFunc.has_value() && reBeatHiddenFunc.value()()) {
result.emplace_back("HD");
}
} else if (gameplayModifiers->ghostNotes) {
result.emplace_back("GN");
}
if (gameplayModifiers->ghostNotes && !(reBeatEnabled && reBeatHidden)) { result.emplace_back("GN"); }
if (gameplayModifiers->noArrows) { result.emplace_back("NA"); }
if (gameplayModifiers->noBombs) { result.emplace_back("NB"); }
if (gameplayModifiers->noFailOn0Energy && energy == 0) { result.emplace_back("NF"); }
Expand All @@ -68,6 +63,7 @@ vector<string> MapEnhancer::Modifiers() const {

// ReBeat Modifier Support

if (reBeatEnabled && reBeatHidden) { result.emplace_back("HD"); }
if (reBeatEnabled && reBeatSameColor) { result.emplace_back("SMC"); }
if (reBeatEnabled && reBeatEasy) { result.emplace_back("EZ"); }
if (reBeatEnabled && reBeatOneHp) { result.emplace_back("OHP"); }
Expand Down

0 comments on commit 482746b

Please sign in to comment.