From bb505cc1524a239259ba6d5d7b42a1570dee7261 Mon Sep 17 00:00:00 2001 From: FireMario211 <17692105+FireMario211@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:23:33 -0500 Subject: [PATCH] fix some issues --- CMakeLists.txt | 6 +- mod.json | 6 +- src/MoreLeaderboards/LevelHelper.cpp | 3 +- src/MoreLeaderboards/MoreLeaderboards.cpp | 4 +- src/Secret/BadApple.cpp | 4 +- src/Settings/CustomSettings.cpp | 104 ------------ src/Settings/CustomSettings.hpp | 71 +------- src/Settings/TestButton.cpp | 194 ++++++++++++++++++++++ src/Styles/NewGJCommentList.cpp | 3 +- src/Styles/NewProfilePage.cpp | 3 +- src/main.cpp | 4 +- 11 files changed, 208 insertions(+), 194 deletions(-) create mode 100644 src/Settings/TestButton.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index f9a8f11..7e55b9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,8 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden) if(NOT DEFINED GEODE_TARGET_PLATFORM) set(GEODE_TARGET_PLATFORM "Win64") - set(GEODE_GD_VERSION 2.206) - set(GEODE_COMP_GD_VERSION 22060) + set(GEODE_GD_VERSION 2.2074) + set(GEODE_COMP_GD_VERSION 22074) endif() if (${GEODE_TARGET_PLATFORM} STREQUAL "Win64") @@ -66,7 +66,7 @@ endif() if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND WIN32) message("compiling on linux!!") # why it requires advapi32 is beyond me - target_link_libraries(${PROJECT_NAME} opengl32 ws2_32 crypt32 wldap32 normaliz advapi32 comdlg32) + target_link_libraries(${PROJECT_NAME} opengl32 ws2_32 crypt32 wldap32 normaliz advapi32) elseif(${GEODE_TARGET_PLATFORM} STREQUAL "Win32") target_link_libraries(${PROJECT_NAME} opengl32 ws2_32 Crypt32 Wldap32 Normaliz) endif() diff --git a/mod.json b/mod.json index de20e84..a74d69f 100644 --- a/mod.json +++ b/mod.json @@ -1,5 +1,5 @@ { - "geode": "4.0.0-alpha.1", + "geode": "4.0.0-beta.1", "version": "v1.3.12", "gd": { "win": "2.2074", @@ -20,12 +20,12 @@ "dependencies": [ { "id": "geode.node-ids", - "version": ">=v1.14.0", + "version": ">=v1.17.0", "importance": "required" }, { "id": "jouca.badgesapi", - "version": ">=v1.1.0", + "version": ">=v1.2.0-beta.3", "importance": "required" } ], diff --git a/src/MoreLeaderboards/LevelHelper.cpp b/src/MoreLeaderboards/LevelHelper.cpp index f4cb7f7..28f7454 100644 --- a/src/MoreLeaderboards/LevelHelper.cpp +++ b/src/MoreLeaderboards/LevelHelper.cpp @@ -1,4 +1,3 @@ -#pragma once #include "../includes.h" #define STAR_EXP 5 @@ -412,4 +411,4 @@ class SpriteHelper { return barColor; } -}; \ No newline at end of file +}; diff --git a/src/MoreLeaderboards/MoreLeaderboards.cpp b/src/MoreLeaderboards/MoreLeaderboards.cpp index 1a7ce55..17c6994 100644 --- a/src/MoreLeaderboards/MoreLeaderboards.cpp +++ b/src/MoreLeaderboards/MoreLeaderboards.cpp @@ -720,7 +720,7 @@ void MoreLeaderboards::loadPageMore() { addChild(listLayer); if (MoreLeaderboards::scroll_int != 0) { - listLayer->m_listView->m_tableView->scrollLayer(-99999999); + listLayer->m_listView->m_tableView->scrollLayer((float)-INT_MAX); listLayer->m_listView->m_tableView->scrollLayer(MoreLeaderboards::scroll_int); } } @@ -1290,8 +1290,6 @@ void MoreLeaderboards::onTab(CCObject* pSender) { class $modify(LeaderboardsLayer) { bool init(LeaderboardState state) { if (!LeaderboardsLayer::init(state)) return false; - - log::info("weee"); auto menu = CCMenu::create(); auto plusSpr = CCSprite::createWithSpriteFrameName("GJ_plusBtn_001.png"); diff --git a/src/Secret/BadApple.cpp b/src/Secret/BadApple.cpp index f06fd78..3297a51 100644 --- a/src/Secret/BadApple.cpp +++ b/src/Secret/BadApple.cpp @@ -177,7 +177,7 @@ class $modify(SecretVault, SecretLayer2) { void launchBadApple(CCObject* pSender) { //GameSoundManager::sharedManager()->stopBackgroundMusic(); - FMODAudioEngine::sharedEngine()->stopAllMusic(); + FMODAudioEngine::sharedEngine()->stopAllMusic(true); auto scene = cocos2d::CCScene::create(); auto layer = BadApple::create(); scene->addChild(layer); @@ -199,7 +199,7 @@ class $modify(SecretVault, SecretLayer2) { void launchCOTE(CCObject* pSender) { //GameSoundManager::sharedManager()->stopBackgroundMusic(); - FMODAudioEngine::sharedEngine()->stopAllMusic(); + FMODAudioEngine::sharedEngine()->stopAllMusic(true); auto scene = cocos2d::CCScene::create(); auto layer = COTE::create(); scene->addChild(layer); diff --git a/src/Settings/CustomSettings.cpp b/src/Settings/CustomSettings.cpp index 2d0d152..fcd38f9 100644 --- a/src/Settings/CustomSettings.cpp +++ b/src/Settings/CustomSettings.cpp @@ -1,114 +1,10 @@ #include "CustomSettings.hpp" #include -#include "../Notifications/EventsPush.h" #include "../includes.h" -int cycleTypes = -1; -SettingNodeV3* SettingTestValue::createNode(float width) { - return SettingTestNode::create(static_pointer_cast(shared_from_this()), width); -} SettingNodeV3* SettingPosValue::createNode(float width) { return SettingPosNode::create(static_pointer_cast(shared_from_this()), width); } SettingNodeV3* SettingCreditsValue::createNode(float width) { return SettingCreditsNode::create(static_pointer_cast(shared_from_this()), width); } - -void SettingTestNode::onTestBtn(CCObject*) { - auto scene = CCDirector::sharedDirector()->getRunningScene(); - cycleTypes = cycleTypes + 1; - if (cycleTypes > 4) cycleTypes = 0; - bool newRate = Mod::get()->getSettingValue("newRate"); - bool daily = Mod::get()->getSettingValue("daily"); - bool weekly = Mod::get()->getSettingValue("weekly"); - if (!newRate && cycleTypes == 0) cycleTypes = 1; - if (!daily && cycleTypes == 1) cycleTypes = 2; - if (!weekly && cycleTypes == 2) cycleTypes = 3; - if (!newRate && !daily && !weekly) { - cycleTypes = 5; - } - - sio::message::ptr data = sio::object_message::create(); - //{'demon': 1, 'type': 1, 'starsum': 6, 'stars': 10, 'rate': 1, 'title': 'BRAINPOWER Let the base kick!', 'level_name': 'O-oooooooooo AAAAE-A-A-I-A-U-', 'level_creator': ' JO-oooooooooooo AAE-O-A-A-U-U-A- E-eee-ee-eee AAAAE-A-E-I-E-A- JO-ooo-oo-oo-oo EEEEO-A-AAA-AAAA', 'sprite': 'GJ_square01.png'} - data->get_map()["coins"] = sio::int_message::create(3); - data->get_map()["verified_coins"] = sio::int_message::create(1); - data->get_map()["platformer"] = sio::int_message::create(0); - switch (cycleTypes) { - case 0: // new rate - data->get_map()["title"] = sio::string_message::create("New Rated Level !"); - data->get_map()["demon"] = sio::int_message::create(0); - data->get_map()["type"] = sio::int_message::create(0); - data->get_map()["stars"] = sio::int_message::create(1); - data->get_map()["starsum"] = sio::int_message::create(10); - data->get_map()["level_name"] = sio::string_message::create("Stereo Madness"); - data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); - data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); - data->get_map()["rate"] = sio::int_message::create(1); - break; - case 1: // daily - data->get_map()["title"] = sio::string_message::create("New Daily Level !"); - data->get_map()["demon"] = sio::int_message::create(0); - data->get_map()["type"] = sio::int_message::create(1); - data->get_map()["stars"] = sio::int_message::create(9); - data->get_map()["starsum"] = sio::int_message::create(40); - data->get_map()["level_name"] = sio::string_message::create("Cycles"); - data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); - data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); - data->get_map()["rate"] = sio::int_message::create(1); - break; - case 2: // weekly - data->get_map()["title"] = sio::string_message::create("New Weekly Level !"); - data->get_map()["demon"] = sio::int_message::create(1); - data->get_map()["type"] = sio::int_message::create(2); - data->get_map()["stars"] = sio::int_message::create(14); - data->get_map()["starsum"] = sio::int_message::create(7); - data->get_map()["level_name"] = sio::string_message::create("Theory of Everything 2"); - data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); - data->get_map()["sprite"] = sio::string_message::create("GJ_square05.png"); - data->get_map()["rate"] = sio::int_message::create(1); - break; - case 3: // Legendary rating test - data->get_map()["title"] = sio::string_message::create("New Rated Level !"); - data->get_map()["demon"] = sio::int_message::create(0); - data->get_map()["type"] = sio::int_message::create(0); - data->get_map()["stars"] = sio::int_message::create(3); - data->get_map()["starsum"] = sio::int_message::create(20); - data->get_map()["level_name"] = sio::string_message::create("Oh no it's happening"); - data->get_map()["level_creator"] = sio::string_message::create("by ..."); - data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); - data->get_map()["rate"] = sio::int_message::create(3); - break; - case 4: // Mythic rating test - data->get_map()["title"] = sio::string_message::create("New Rated Level !"); - data->get_map()["demon"] = sio::int_message::create(0); - data->get_map()["type"] = sio::int_message::create(0); - data->get_map()["stars"] = sio::int_message::create(100); - data->get_map()["starsum"] = sio::int_message::create(20); - data->get_map()["level_name"] = sio::string_message::create("FIRE IN THE HOLE!"); - data->get_map()["level_creator"] = sio::string_message::create("by GD Community"); - data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); - data->get_map()["rate"] = sio::int_message::create(4); - break; - case 5: // in case the user disables everything - data->get_map()["title"] = sio::string_message::create("New Rated Level !"); - data->get_map()["demon"] = sio::int_message::create(1); - data->get_map()["type"] = sio::int_message::create(-1); - data->get_map()["stars"] = sio::int_message::create(2); - data->get_map()["starsum"] = sio::int_message::create(6); - data->get_map()["level_name"] = sio::string_message::create("Back On Track"); - data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); - data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); - data->get_map()["rate"] = sio::int_message::create(1); - break; - default: // not possible - data->get_map()["title"] = sio::string_message::create("hi there hxd user, ghidra user or ida user. (or hi RobTop) Here's a little easter egg for you :)"); - data->get_map()["demon"] = sio::int_message::create(1); - data->get_map()["type"] = sio::int_message::create(2); - data->get_map()["stars"] = sio::int_message::create(14); - data->get_map()["starsum"] = sio::int_message::create(7); - data->get_map()["sprite"] = sio::string_message::create("This will crash! :D"); - - break; - } - EventsPush::pushRateLevel(scene, data); -} diff --git a/src/Settings/CustomSettings.hpp b/src/Settings/CustomSettings.hpp index 16a05cf..9bb73d9 100644 --- a/src/Settings/CustomSettings.hpp +++ b/src/Settings/CustomSettings.hpp @@ -4,78 +4,8 @@ #include using namespace geode::prelude; -/* - --- Test --- -*/ - -class SettingTestValue : public SettingV3 { -public: - static Result> parse(std::string const& key, std::string const& modID, matjson::Value const& json) { - auto res = std::make_shared(); - auto root = checkJson(json, "SettingTestValue"); - res->init(key, modID, root); - res->parseNameAndDescription(root); - root.checkUnknownKeys(); - return root.ok(std::static_pointer_cast(res)); - } - - bool load(matjson::Value const& json) override { - return true; - } - bool save(matjson::Value& json) const override { - return true; - } - bool isDefaultValue() const override { - return true; - } - void reset() override {} - SettingNodeV3* createNode(float width) override; -}; -class SettingTestNode : public SettingNodeV3 { -protected: - bool init(std::shared_ptr setting, float width) { - if (!SettingNodeV3::init(setting, width)) - return false; - this->setContentSize({ width, 35.f }); - auto label = CCLabelBMFont::create("Test", "bigFont.fnt"); - label->setScale(.6F); - auto playSpr = CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); - playSpr->setScale(.4F); - auto testBtn = CCMenuItemSpriteExtra::create( - playSpr, - this, - menu_selector(SettingTestNode::onTestBtn) - ); - getButtonMenu()->setContentWidth(width); - getButtonMenu()->addChildAtPosition(label, Anchor::Left, {42, 0}); - getButtonMenu()->addChildAtPosition(testBtn, Anchor::Right, {-15, 0}); - getButtonMenu()->updateLayout(); - getNameLabel()->setVisible(false); - return true; - } - void onCommit() override {} - void onResetToDefault() override {} - -public: - void onTestBtn(CCObject*); - bool hasUncommittedChanges() const override { - return false; - } - bool hasNonDefaultValue() const override { - return false; - } - static SettingTestNode* create(std::shared_ptr setting, float width) { - auto ret = new SettingTestNode(); - if (ret && ret->init(setting, width)) { - ret->autorelease(); - return ret; - } - CC_SAFE_DELETE(ret); - return nullptr; - } -}; /* Notification Position @@ -267,6 +197,7 @@ class SettingCreditsValue : public SettingV3 { auto root = checkJson(json, "SettingCreditsValue"); res->init(key, modID, root); res->parseNameAndDescription(root); + res->parseEnableIf(root); root.checkUnknownKeys(); return root.ok(std::static_pointer_cast(res)); } diff --git a/src/Settings/TestButton.cpp b/src/Settings/TestButton.cpp new file mode 100644 index 0000000..5cca832 --- /dev/null +++ b/src/Settings/TestButton.cpp @@ -0,0 +1,194 @@ +#include +#include "../Notifications/EventsPush.h" + +using namespace geode::prelude; + +/* + --- Test --- +*/ + +int cycleTypes = -1; + +class SettingTestValue : public SettingV3 { +public: + static Result> parse(std::string const& key, std::string const& modID, matjson::Value const& json) { + auto res = std::make_shared(); + auto root = checkJson(json, "SettingTestValue"); + res->init(key, modID, root); + res->parseNameAndDescription(root); + res->parseEnableIf(root); + root.checkUnknownKeys(); + return root.ok(std::static_pointer_cast(res)); + } + + bool load(matjson::Value const& json) override { + return true; + } + bool save(matjson::Value& json) const override { + return true; + } + bool isDefaultValue() const override { + return true; + } + void reset() override {} + SettingNodeV3* createNode(float width) override; +}; + +class SettingTestNode : public SettingNodeV3 { +protected: + bool init(std::shared_ptr setting, float width) { + if (!SettingNodeV3::init(setting, width)) + return false; + this->setContentSize({ width, 35.f }); + auto label = CCLabelBMFont::create("Test", "bigFont.fnt"); + + label->setScale(.6F); + + auto playSpr = CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); + + playSpr->setScale(.4F); + + auto testBtn = CCMenuItemSpriteExtra::create( + playSpr, + this, + menu_selector(SettingTestNode::onTestBtn) + ); + + getButtonMenu()->setContentWidth(width); + getButtonMenu()->addChildAtPosition(label, Anchor::Left, {42, 0}); + getButtonMenu()->addChildAtPosition(testBtn, Anchor::Right, {-15, 0}); + getButtonMenu()->updateLayout(); + + getNameLabel()->setVisible(false); + + return true; + } + void onCommit() override {} + void onResetToDefault() override {} + +public: + void onTestBtn(CCObject*) { + auto scene = CCDirector::sharedDirector()->getRunningScene(); + cycleTypes = cycleTypes + 1; + if (cycleTypes > 4) cycleTypes = 0; + bool newRate = Mod::get()->getSettingValue("newRate"); + bool daily = Mod::get()->getSettingValue("daily"); + bool weekly = Mod::get()->getSettingValue("weekly"); + if (!newRate && cycleTypes == 0) cycleTypes = 1; + if (!daily && cycleTypes == 1) cycleTypes = 2; + if (!weekly && cycleTypes == 2) cycleTypes = 3; + if (!newRate && !daily && !weekly) { + cycleTypes = 5; + } + + sio::message::ptr data = sio::object_message::create(); + //{'demon': 1, 'type': 1, 'starsum': 6, 'stars': 10, 'rate': 1, 'title': 'BRAINPOWER Let the base kick!', 'level_name': 'O-oooooooooo AAAAE-A-A-I-A-U-', 'level_creator': ' JO-oooooooooooo AAE-O-A-A-U-U-A- E-eee-ee-eee AAAAE-A-E-I-E-A- JO-ooo-oo-oo-oo EEEEO-A-AAA-AAAA', 'sprite': 'GJ_square01.png'} + data->get_map()["coins"] = sio::int_message::create(3); + data->get_map()["verified_coins"] = sio::int_message::create(1); + data->get_map()["platformer"] = sio::int_message::create(0); + switch (cycleTypes) { + case 0: // new rate + data->get_map()["title"] = sio::string_message::create("New Rated Level !"); + data->get_map()["demon"] = sio::int_message::create(0); + data->get_map()["type"] = sio::int_message::create(0); + data->get_map()["stars"] = sio::int_message::create(1); + data->get_map()["starsum"] = sio::int_message::create(10); + data->get_map()["level_name"] = sio::string_message::create("Stereo Madness"); + data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); + data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); + data->get_map()["rate"] = sio::int_message::create(1); + break; + case 1: // daily + data->get_map()["title"] = sio::string_message::create("New Daily Level !"); + data->get_map()["demon"] = sio::int_message::create(0); + data->get_map()["type"] = sio::int_message::create(1); + data->get_map()["stars"] = sio::int_message::create(9); + data->get_map()["starsum"] = sio::int_message::create(40); + data->get_map()["level_name"] = sio::string_message::create("Cycles"); + data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); + data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); + data->get_map()["rate"] = sio::int_message::create(1); + break; + case 2: // weekly + data->get_map()["title"] = sio::string_message::create("New Weekly Level !"); + data->get_map()["demon"] = sio::int_message::create(1); + data->get_map()["type"] = sio::int_message::create(2); + data->get_map()["stars"] = sio::int_message::create(14); + data->get_map()["starsum"] = sio::int_message::create(7); + data->get_map()["level_name"] = sio::string_message::create("Theory of Everything 2"); + data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); + data->get_map()["sprite"] = sio::string_message::create("GJ_square05.png"); + data->get_map()["rate"] = sio::int_message::create(1); + break; + case 3: // Legendary rating test + data->get_map()["title"] = sio::string_message::create("New Rated Level !"); + data->get_map()["demon"] = sio::int_message::create(0); + data->get_map()["type"] = sio::int_message::create(0); + data->get_map()["stars"] = sio::int_message::create(3); + data->get_map()["starsum"] = sio::int_message::create(20); + data->get_map()["level_name"] = sio::string_message::create("Oh no it's happening"); + data->get_map()["level_creator"] = sio::string_message::create("by ..."); + data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); + data->get_map()["rate"] = sio::int_message::create(3); + break; + case 4: // Mythic rating test + data->get_map()["title"] = sio::string_message::create("New Rated Level !"); + data->get_map()["demon"] = sio::int_message::create(0); + data->get_map()["type"] = sio::int_message::create(0); + data->get_map()["stars"] = sio::int_message::create(100); + data->get_map()["starsum"] = sio::int_message::create(20); + data->get_map()["level_name"] = sio::string_message::create("FIRE IN THE HOLE!"); + data->get_map()["level_creator"] = sio::string_message::create("by GD Community"); + data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); + data->get_map()["rate"] = sio::int_message::create(4); + break; + case 5: // in case the user disables everything + data->get_map()["title"] = sio::string_message::create("New Rated Level !"); + data->get_map()["demon"] = sio::int_message::create(1); + data->get_map()["type"] = sio::int_message::create(-1); + data->get_map()["stars"] = sio::int_message::create(2); + data->get_map()["starsum"] = sio::int_message::create(6); + data->get_map()["level_name"] = sio::string_message::create("Back On Track"); + data->get_map()["level_creator"] = sio::string_message::create("by RobTop"); + data->get_map()["sprite"] = sio::string_message::create("GJ_square01.png"); + data->get_map()["rate"] = sio::int_message::create(1); + break; + default: // not possible + data->get_map()["title"] = sio::string_message::create("hi there hxd user, ghidra user or ida user. (or hi RobTop) Here's a little easter egg for you :)"); + data->get_map()["demon"] = sio::int_message::create(1); + data->get_map()["type"] = sio::int_message::create(2); + data->get_map()["stars"] = sio::int_message::create(14); + data->get_map()["starsum"] = sio::int_message::create(7); + data->get_map()["sprite"] = sio::string_message::create("This will crash! :D"); + + break; + } + EventsPush::pushRateLevel(scene, data); + } + bool hasUncommittedChanges() const override { + return false; + } + bool hasNonDefaultValue() const override { + return false; + } + static SettingTestNode* create(std::shared_ptr setting, float width) { + auto ret = new SettingTestNode(); + if (ret && ret->init(setting, width)) { + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return nullptr; + } + std::shared_ptr getSetting() const { + return std::static_pointer_cast(SettingNodeV3::getSetting()); + } +}; + +SettingNodeV3* SettingTestValue::createNode(float width) { + return SettingTestNode::create(static_pointer_cast(shared_from_this()), width); +} + +$execute { + (void)Mod::get()->registerCustomSettingType("test-notification", &SettingTestValue::parse); +} diff --git a/src/Styles/NewGJCommentList.cpp b/src/Styles/NewGJCommentList.cpp index 2318bb9..a1fbf86 100644 --- a/src/Styles/NewGJCommentList.cpp +++ b/src/Styles/NewGJCommentList.cpp @@ -268,9 +268,8 @@ class $modify(CommentCell) { } void loadFromComment(GJComment* comment) { - auto layer = m_mainLayer; - CommentCell::loadFromComment(comment); + auto layer = m_mainLayer; if (comment->m_commentDeleted) return; diff --git a/src/Styles/NewProfilePage.cpp b/src/Styles/NewProfilePage.cpp index 6f3737d..09f33ea 100644 --- a/src/Styles/NewProfilePage.cpp +++ b/src/Styles/NewProfilePage.cpp @@ -442,13 +442,12 @@ class $modify(ProfilePage) { } void loadPageFromUserInfo(GJUserScore* a2) { + ProfilePage::loadPageFromUserInfo(a2); auto layer = m_mainLayer; CCMenuItemSpriteExtra* badgeBtn = nullptr; bool modbadge_bool = false; - ProfilePage::loadPageFromUserInfo(a2); - CCMenu* username_menu = typeinfo_cast(layer->getChildByIDRecursive("username-menu")); CCLabelBMFont* label = typeinfo_cast(layer->getChildByIDRecursive("username-label")); diff --git a/src/main.cpp b/src/main.cpp index 20c0b5c..3af854e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -179,7 +179,7 @@ class $modify(CCScheduler) { // used to be GameManager bool everywhereElse = Mod::get()->template getSettingValue("everywhereElse"); if ((layerName != "LevelEditorLayer" && layerName != "PlayLayer") && !everywhereElse) return; if ((layerName != "LevelEditorLayer" && layerName != "PlayLayer") && everywhereElse) { - //processChestEvent(scene); // disabled for now until this weird chest bug is fixed + processChestEvent(scene); processEvent(scene); } } @@ -212,7 +212,6 @@ class $modify(CCScheduler) { // used to be GameManager class $modify(CCScheduler) { // GD Protocol part void update(float dt) { CCScheduler::update(dt); - return; // disabled for now until GLM::sharedState works auto scene = CCDirector::sharedDirector()->getRunningScene(); if (scene->getChildrenCount() == 0) return; auto layer = scene->getChildren()->objectAtIndex(0); @@ -478,7 +477,6 @@ class $modify(MyMenuLayerGDUTILS, MenuLayer) { */ $execute { - (void)Mod::get()->registerCustomSettingType("test-notification", &SettingTestValue::parse); (void)Mod::get()->registerCustomSettingType("credit-buttons", &SettingCreditsValue::parse); //(void)Mod::get()->registerCustomSettingType("notificationPlacement", &SettingPosValue::parse); auto ret = Mod::get()->registerCustomSettingType("notification-placement", &SettingPosValue::parse);