From 1cd9bf1c483fd841788cc6731f6368a7fd5e83dc Mon Sep 17 00:00:00 2001 From: user95401 Date: Mon, 29 Apr 2024 10:43:21 +0400 Subject: [PATCH] add about.md, patch way toggle, fixes for fake pages info and coming soon level id --- _Src/FakeLevelPagesScroll.cpp | 12 +++++++++++- _Src/controllers.cpp | 2 +- about.md | 20 ++++++++++++++++++++ mod.json | 6 ++++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 about.md diff --git a/_Src/FakeLevelPagesScroll.cpp b/_Src/FakeLevelPagesScroll.cpp index 933a084..e9eb4b7 100644 --- a/_Src/FakeLevelPagesScroll.cpp +++ b/_Src/FakeLevelPagesScroll.cpp @@ -94,7 +94,7 @@ class $modify(LevelSelectLayerExt, LevelSelectLayer) { }; //cumingsoon if (not Mod::get()->getSettingValue("NO_COMINGSOON")) { - lvl->m_levelID = 0; + lvl->m_levelID = -1; auto cumingsoon = LevelPage::create(lvl); cumingsoon->updateDynamicPage(lvl); auto COMINGSOON_TEXT = (Mod::get()->getSettingValue("COMINGSOON_TEXT")); @@ -189,6 +189,7 @@ class $modify(LevelSelectLayerExt, LevelSelectLayer) { instantMoveToCurrentPage(); } void onNext(cocos2d::CCObject* sender) { + if (Mod::get()->getSettingValue("USE_PATCHES")) return LevelSelectLayer::onNext(sender); ++m_fields->m_page; if (m_fields->m_page >= m_fields->m_shitcodingmenu->getChildrenCount()) { m_fields->m_page = 0; @@ -206,6 +207,7 @@ class $modify(LevelSelectLayerExt, LevelSelectLayer) { } }; void onPrev(cocos2d::CCObject* sender) { + if (Mod::get()->getSettingValue("USE_PATCHES")) return LevelSelectLayer::onPrev(sender); --m_fields->m_page; if (m_fields->m_page < 0) { m_fields->m_page = m_fields->m_shitcodingmenu->getChildrenCount() - 1; @@ -227,9 +229,17 @@ class $modify(LevelSelectLayerExt, LevelSelectLayer) { m_fields->m_shitcodingmenuPoint.x = (newPointX); } }; + void onInfo(cocos2d::CCObject* sender) { + if (Mod::get()->getSettingValue("USE_PATCHES")) return LevelSelectLayer::onInfo(sender); + auto currentPage = dynamic_cast(m_fields->m_shitcodingmenu->getChildByTag(m_fields->m_page + 1)); + if (currentPage) currentPage->onInfo(currentPage); + } static LevelSelectLayer* create(int p0) { auto rtn = LevelSelectLayer::create(p0); + if (Mod::get()->getSettingValue("USE_PATCHES")) return rtn; + ((LevelSelectLayerExt*)rtn)->mainSetup(p0); + return rtn; } }; \ No newline at end of file diff --git a/_Src/controllers.cpp b/_Src/controllers.cpp index e8c6e3d..765773d 100644 --- a/_Src/controllers.cpp +++ b/_Src/controllers.cpp @@ -53,7 +53,7 @@ void UpdatePagesSetup() { Ini.SaveFile(IniPath.c_str()); - return;//////////////////////////////////////////////////////////////////////////////// + if (not Mod::get()->getSettingValue("USE_PATCHES")) return;//////////////////////////////////////////////////////////////////////////////// #ifdef GEODE_IS_WINDOWS //we at LevelSelectLayer::init(LevelSelectLayer* pClass, int initLevel) //way: "Download the soundtrack" string, move up to sideart sprites diff --git a/about.md b/about.md new file mode 100644 index 0000000..4c0043f --- /dev/null +++ b/about.md @@ -0,0 +1,20 @@ +# Main Levels Editor + +u can edit: +- main levels setup (stars, song, name, difficulty) +- bg color for page +- songs +- pages in level select layer (here is a fake page list) + +and "Load Failed!" bypass here + +summary u can add ur own level in level select layer + +settings here is generating per hooked functions call +so play stereo madness to generate all config structure + + + +#### android releases is unstable i think + + \ No newline at end of file diff --git a/mod.json b/mod.json index 3149945..bf43bed 100644 --- a/mod.json +++ b/mod.json @@ -37,6 +37,12 @@ "type": "bool", "default": false }, + "USE_PATCHES": { + "name": "Use patches (PC Only)", + "description": "this thing make dont working NO_THETOWER, NO_COMINGSOON, COMINGSOON_TEXT keys\nalso this is for windows only", + "type": "bool", + "default": false + }, "NO_THETOWER": { "name": "Remove The Tower Page", "description": "dont add this page yea",