diff --git a/.github/workflows/multi-platform.yml b/.github/workflows/multi-platform.yml index 6998102..7823f62 100644 --- a/.github/workflows/multi-platform.yml +++ b/.github/workflows/multi-platform.yml @@ -76,6 +76,7 @@ jobs: - name: Publish Nightly release uses: andelf/nightly-release@main + if: ${{ github.ref_name == github.event.repository.default_branch }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a9e68c..e4663f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.21) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) if("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS) set(CMAKE_OSX_ARCHITECTURES "arm64") diff --git a/README.md b/README.md index 26070ac..f394b0c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This silly lil' mod adds a mod menu filled to the brim with **over 35 crazy trol When pressing `\` or by pressing the floating *Horrible Options* button on your screen, a menu will pop up with a list of joke mod options you can toggle anytime on your game to do some interesting things to your gaming experience. You can view more information within the menu itself. > [!NOTE] -> *You can customize any keybinds in this mod via the *[Custom Keybinds](https://www.geode-sdk.org/mods/geode.custom-keybinds)* mod.* +> *You can customize any keybinds in this mod through its settings.* #### Player Life Give the player a limited health-like meter that must always stay above 0 to prevent the player from dying. diff --git a/about.md b/about.md index 73c7025..ca402a8 100644 --- a/about.md +++ b/about.md @@ -13,7 +13,7 @@ This silly lil' mod adds a mod menu filled to the brim with **over 35 crazy trol ### Options When pressing `\` on your keyboard or by pressing the floating *Horrible Options* button on your screen, a menu will pop up with a list of horrible mod options you can toggle anytime on your game to do some interesting things to your gaming experience. You can view more information within the menu itself. -> ![ℹ️](frame:GJ_infoIcon_001.png?scale=0.5) *You can customize any keybinds in this mod via the *[Custom Keybinds](mod:geode.custom-keybinds)* mod.* +> ![ℹ️](frame:GJ_infoIcon_001.png?scale=0.5) *You can customize any keybinds in this mod through its settings.* #### Player Life Give the player a limited health-like meter that must always stay above 0 to prevent the player from dying. diff --git a/include/Events.hpp b/include/Events.hpp index f5ae964..9a866a6 100644 --- a/include/Events.hpp +++ b/include/Events.hpp @@ -2,47 +2,12 @@ #include "Horrible.hpp" -#include - #include // Container for Horrible Ideas API namespace horrible { // Event for option toggles - class OptionEvent : public geode::Event { - private: - std::string m_id; // Unique ID of the option - bool m_toggled; // Toggle boolean of the option - - public: - OptionEvent(std::string id, bool toggled); // Constructor - - AWCW_HORRIBLE_API_DLL std::string_view getId() const noexcept; // Get the unique ID of the option - AWCW_HORRIBLE_API_DLL bool getToggled() const noexcept; // Get the toggle boolean of the option - }; - - // Filter for option toggle event - class AWCW_HORRIBLE_API_DLL OptionEventFilter : public geode::EventFilter { - private: - std::vector m_ids; // Unique ID of the options to listen to - - public: - using Callback = geode::ListenerResult(OptionEvent*); - - /** - * Event handler - * - * @param fn Callback function containing a pointer to the event that fired - * @param event Pointer to the event that fired - */ - geode::ListenerResult handle(std::function fn, OptionEvent* event); - - OptionEventFilter() = default; // Constructor - - OptionEventFilter(std::string id); // Constructor (listens to one option's toggle) - OptionEventFilter(std::vector ids); // Constructor (listens to any specified options' toggles) - - OptionEventFilter(cocos2d::CCNode*, std::string id); // Constructor with target (listens to one option's toggle) - OptionEventFilter(cocos2d::CCNode*, std::vector ids); // Constructor with target (listens to any specified options' toggles) + struct OptionEvent final : geode::GlobalEvent { + using GlobalEvent::GlobalEvent; }; }; \ No newline at end of file diff --git a/include/Horrible.hpp b/include/Horrible.hpp index 087dc78..3a094cc 100644 --- a/include/Horrible.hpp +++ b/include/Horrible.hpp @@ -22,21 +22,18 @@ // Container for Horrible Ideas API functions namespace horrible { // Mod option manager for Horrible Ideas - class AWCW_HORRIBLE_API_DLL OptionManager : public cocos2d::CCObject { + class AWCW_HORRIBLE_API_DLL OptionManager final : public cocos2d::CCObject { private: - class Impl; // PImpl class - std::unique_ptr m_impl; // PImpl pointer + std::vector