diff --git a/src/SecretLayer2.cpp b/src/SecretLayer2.cpp new file mode 100644 index 0000000..cc92cdd --- /dev/null +++ b/src/SecretLayer2.cpp @@ -0,0 +1,55 @@ +#include +#include +#include +#include + +using namespace geode::prelude; +using namespace geode::node_ids; + +$register_ids(SecretLayer2) { + setIDs( + this, + 0, + "background", + "vault-name", + "message", + "textbox-background", + "text-box", + "menu", + "the-challange-text1", + "the-challange-text2" + ); + auto menu = static_cast(this->getChildByID("menu")); + setIDs( + menu, + 0, + "back-button", + "valtkeeper-button", + "door-button", + "the-challange-button" + ); + auto textbox = this->getChildByID("text-box"); + setIDs( + textbox, + 0, + "input", + "display-text", + "bar-position" + ); +} + +struct SecretLayer2IDs : Modify { + static void onModify(auto& self) { + if (!self.setHookPriority("SecretLayer2::init", GEODE_ID_PRIORITY)) { + log::warn("Failed to set SecretLayer2::init hook priority, node IDs may not work properly"); + } + } + + bool init() { + if(!SecretLayer2::init()) return false; + + NodeIDs::get()->provide(this); + + return true; + } +}; \ No newline at end of file