Skip to content

Commit

Permalink
Merge pull request #48 from Futuremappermydud/master
Browse files Browse the repository at this point in the history
Fix Hidden and Ghost Notes For ReBeat
  • Loading branch information
NSGolova authored Sep 11, 2024
2 parents cddafd1 + 482746b commit 95b6255
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 95b6255

Please sign in to comment.