diff --git a/changelog.md b/changelog.md index d23167b..c6567f2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # Fake Rate Changelog +## v1.1.7 (2024-05-27) +- Fixed a few bugs with compatibilty with other mods + ## v1.1.6 (2024-05-27) - Fixed incompatibility with the mod "GDDP Integration" by Minemaker0430 diff --git a/mod.json b/mod.json index f9e359a..374df6c 100644 --- a/mod.json +++ b/mod.json @@ -5,7 +5,7 @@ "win": "2.204", "mac": "2.200" }, - "version": "v1.1.6", + "version": "v1.1.7", "id": "hiimjustin000.fake_rate", "name": "Fake Rate", "developer": "hiimjustin000", diff --git a/src/FREditPopup.cpp b/src/FREditPopup.cpp index 870456a..da3f248 100644 --- a/src/FREditPopup.cpp +++ b/src/FREditPopup.cpp @@ -58,16 +58,16 @@ void FRLevelInfoLayer::updateFakeRate(int stars, int feature, int difficulty, bo } auto gddpOverride = false; if (auto gddpDifficultySprite = static_cast(getChildByID("gddp-difficulty"))) { - gddpOverride = true; + gddpOverride = gddpDifficultySprite->isVisible(); gddpDifficultySprite->setVisible(false); m_difficultySprite->setOpacity(255); } if (Loader::get()->isModLoaded("itzkiba.grandpa_demon") && !gddpOverride) { removeChildByTag(69420); - if (auto grdDifficulty = getChildByID("grd-difficulty")) grdDifficulty->setVisible(false); for (auto child : CCArrayExt(getChildren())) { if (child->getID() == "grd-difficulty") child->setVisible(false); } + if (auto grdInfinity = getChildByID("grd-infinity")) grdInfinity->setVisible(false); m_difficultySprite->setVisible(true); if (auto featureGlow = m_difficultySprite->getChildByTag(69420)) featureGlow->setPosition(m_difficultySprite->getContentSize() * 0.5f); @@ -83,7 +83,9 @@ void FRLevelInfoLayer::updateFakeRate(int stars, int feature, int difficulty, bo auto children = getChildren(); for (int i = 0; i < children->count(); i++) { if (auto child = typeinfo_cast(children->objectAtIndex(i))) { - if (auto button = typeinfo_cast(child->getChildren()->objectAtIndex(0))) { + auto grandchildren = child->getChildren(); + if (!grandchildren || grandchildren->count() < 1) continue; + if (auto button = typeinfo_cast(grandchildren->objectAtIndex(0))) { if (button->getNormalImage() == m_difficultySprite) { nodeToSetPosition = child; difficultySpriteParent = button;