diff --git a/CMakeLists.txt b/CMakeLists.txt index 2da5d2e..12c836b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_CXX_VISIBILITY_PRESET hidden) -project(FakeRate VERSION 1.4.0) +project(FakeRate VERSION 1.4.1) add_library(${PROJECT_NAME} SHARED src/FakeRate.cpp diff --git a/changelog.md b/changelog.md index d9c91a8..2dd7a17 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,8 @@ # Fake Rate Changelog +## v1.4.1 (2024-08-16) +- Fixed a bug where the game would crash if a grandpa demon rate was removed +- Fixed a bug where the fake rate popup would sometimes not identify grandpa demons correctly + ## v1.4.0 (2024-08-16) - Added GDDP Integration support - Added support for Grandpa Demon background effects and particles diff --git a/mod.json b/mod.json index 8120b1e..f0b7d59 100644 --- a/mod.json +++ b/mod.json @@ -5,7 +5,7 @@ "win": "2.206", "mac": "2.206" }, - "version": "v1.4.0", + "version": "v1.4.1", "id": "hiimjustin000.fake_rate", "name": "Fake Rate", "developer": "hiimjustin000", diff --git a/src/main.cpp b/src/main.cpp index 033c314..7de07b6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,7 +68,7 @@ class $modify(FRLevelInfoLayer, LevelInfoLayer) { .difficulty = FakeRate::getDifficultyFromLevel(m_level), .moreDifficultiesOverride = Loader::get()->isModLoaded("uproxide.more_difficulties") ? stars == 4 || stars == 7 || stars == 9 ? stars : stars == 0 && (starsRequested == 4 || starsRequested == 7 || starsRequested == 9) ? starsRequested : 0 : 0, - .grandpaDemonOverride = grandpaDemon && !gddpOverride ? FakeRate::getGRDOverride(grandpaDemon) : 0, + .grandpaDemonOverride = grandpaDemon && (!gddpOverride || !gddpDifficulty) ? FakeRate::getGRDOverride(grandpaDemon) : 0, .demonsInBetweenOverride = demonInBetween ? FakeRate::getDIBOverride(demonInBetween) : 0, .gddpIntegrationOverride = gddpDifficulty && (!grandpaDemon || gddpOverride) ? FakeRate::getGDDPOverride(gddpDifficulty) : 0, .coins = m_level->m_coinsVerified > 0 @@ -132,7 +132,8 @@ class $modify(FRLevelInfoLayer, LevelInfoLayer) { } auto bgNum = 0; - if (isSpriteName(child, "itzkiba.grandpa_demon/GrD_demon4_bg.png")) { + if (isSpriteName(child, "itzkiba.grandpa_demon/GrD_demon4_bg.png") && + child->getID().find("hiimjustin000.fake_rate/grandpa_background") != std::string::npos) { if (child->getID() == "") child->setID(fmt::format("grd-bg-{}", ++bgNum)); if (child->getID() == "grd-bg-1") child->setVisible(remove); else if (child->getID() == "grd-bg-2") child->setVisible(remove); @@ -141,7 +142,8 @@ class $modify(FRLevelInfoLayer, LevelInfoLayer) { } auto particleNum = 0; - if (typeinfo_cast(child) && child->getPositionY() == winSize.height / 2 + 76.0f) { + if (typeinfo_cast(child) && child->getPositionY() == winSize.height / 2 + 76.0f && + child->getID().find("hiimjustin000.fake_rate/grandpa_particles") != std::string::npos) { if (child->getID() == "") child->setID(fmt::format("grd-particles-{}", ++particleNum)); if (child->getID() == "grd-particles-1") child->setVisible(remove); else if (child->getID() == "grd-particles-2") child->setVisible(remove);