Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjasmine00 committed Aug 16, 2024
1 parent 7dd51f8 commit d75e8fe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 5 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -141,7 +142,8 @@ class $modify(FRLevelInfoLayer, LevelInfoLayer) {
}

auto particleNum = 0;
if (typeinfo_cast<CCParticleSystemQuad*>(child) && child->getPositionY() == winSize.height / 2 + 76.0f) {
if (typeinfo_cast<CCParticleSystemQuad*>(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);
Expand Down

0 comments on commit d75e8fe

Please sign in to comment.