diff --git a/changelog.md b/changelog.md index 556c49a..dc841df 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,13 @@ # v2.0.0 - Removed Creator Points error messages - check console for errors +- Added Shop Shortcuts +- Added Demons to garage +- Updated Feedback API (again) - Added new tags: "content" and "offline" - No longer uses Geode nightly - Added Demon Keys to garage +- Added Icon + Color Hack - Enable in settings - Added [Ko-Fi](https://ko-fi.com/omgrod) button (please support the creation of this mod) - Bugfixes: - Separate Dual Icons mod - Moved down hitboxes and arrows diff --git a/deprecated.md b/deprecated.md index 0cff829..a748e9d 100644 --- a/deprecated.md +++ b/deprecated.md @@ -1,35 +1,3 @@ -# DEMONS code - -mod.json - -``` -"demons": { - "name": "Demons", - "description": "Demons show up in the garage.", - "type": "bool", - "default": true - }, -``` - -main.cpp - -``` -if (demons) { - // Credits to Capeling for this code (Demons in Garage) - - // Deprecated stuff (sorry!) - - // auto statMenu = this->getChildByID("capeling.garage-stats-menu/stats-menu"); - - // auto myStatItem = StatsDisplayAPI::getNewItem("demons"_spr, CCSprite::create("GaragePlus_demonIcon.png"_spr), GameStatsManager::sharedState()->getStat("5"), 1.f); - - // if (statMenu) { - // statMenu->addChild(myStatItem); - // statMenu->updateLayout(); - // } - } -``` - # Advanced Stats mod.json diff --git a/mod.json b/mod.json index 13cbfe6..a1f5714 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,6 @@ { "geode": "3.2.0", - "version": "v2.0.0-alpha.4", + "version": "v2.0.0-alpha.3", "gd": { "win": "2.206", "android": "2.206" @@ -16,6 +16,12 @@ "description": "Creator Points show up in the garage. Click the CP icon to refresh. (Only available to people logged in)", "type": "bool", "default": true + }, + "demons": { + "name": "Demons", + "description": "Demons show up in the garage.", + "type": "bool", + "default": true }, "no-lock-hint": { "name": "Remove Lock Hint", @@ -46,6 +52,12 @@ "description": "Percentage of completed Achievements show up in the garage.", "type": "bool", "default": true + }, + "icon-hack": { + "name": "Icon + Color Hack", + "description": "You can use every icon and color in the game.", + "type": "bool", + "default": false }, "shops-shortcut": { "name": "Shops Shortcut", diff --git a/src/IconHack.cpp b/src/IconHack.cpp index 193ef89..9a6b65f 100644 --- a/src/IconHack.cpp +++ b/src/IconHack.cpp @@ -7,12 +7,23 @@ using namespace geode::prelude; class $modify(GameManager) { bool isIconUnlocked(int _id, IconType _type) { - if (GameManager::isIconUnlocked(_id, _type)) return true; - if (_id <= 0) return false; - return true; + if (Mod::get()->getSettingValue("icon-hack")) { + if (GameManager::isIconUnlocked(_id, _type)) return true; + if (_id <= 0) return false; + return true; + } else { + // Call the original GameManager method + return GameManager::isIconUnlocked(_id, _type); + } } + bool isColorUnlocked(int _id, UnlockType _type) { - if (GameManager::isColorUnlocked(_id, _type)) return true; - return true; + if (Mod::get()->getSettingValue("icon-hack")) { + if (GameManager::isColorUnlocked(_id, _type)) return true; + return true; + } else { + // Call the original GameManager method + return GameManager::isColorUnlocked(_id, _type); + } } }; \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index e816407..2b58751 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,7 @@ class $modify(GJGarageLayerModified, GJGarageLayer) { auto topBtns = Mod::get()->getSettingValue("top-buttons"); auto feedback = Mod::get()->getSettingValue("feedback"); auto demonKeys = Mod::get()->getSettingValue("demon-keys"); + auto demons = Mod::get()->getSettingValue("demons"); auto achCount = Mod::get()->getSettingValue("achievement-count----------------------------------------------------do-after"); auto shopsShortcut = Mod::get()->getSettingValue("shops-shortcut"); @@ -46,6 +47,19 @@ class $modify(GJGarageLayerModified, GJGarageLayer) { GJGarageLayerModified::refreshCP(nullptr, false); } + if (demons) { + // Credits to Capeling for this code (Demons in Garage) + + auto statMenu = this->getChildByID("capeling.garage-stats-menu/stats-menu"); + + auto myStatItem = StatsDisplayAPI::getNewItem("demons"_spr, CCSprite::create("GaragePlus_demonIcon.png"_spr), GameStatsManager::sharedState()->getStat("5"), 1.f); + + if (statMenu) { + statMenu->addChild(myStatItem); + statMenu->updateLayout(); + } + } + if (shopsShortcut) { auto topLeftMenu = this->getChildByID("top-left-menu"); auto oldShopRope = topLeftMenu->getChildByID("shop-button");