Skip to content

Commit e2174c3

Browse files
Apparently on other platforms on modify has to be inlined
1 parent e37f06d commit e2174c3

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

src/hooks/editor/EditorPauseLayer.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
using namespace object_collab::prelude;
44
using namespace geode::prelude;
55

6-
void ModEditorPauseLayer::onModify(auto& self) {
7-
(void) self.setHookPriorityBeforePre("EditorPauseLayer::saveLevel", "alphalaneous.level-storage-api");
8-
}
9-
106
bool ModEditorPauseLayer::init(LevelEditorLayer* layer) {
117
if (!EditorPauseLayer::init(layer)) return false;
128

src/hooks/editor/EditorPauseLayer.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#include <Geode/modify/EditorPauseLayer.hpp>
55

66
class $modify(ModEditorPauseLayer, EditorPauseLayer) {
7-
static void onModify(auto& self);
7+
static void onModify(auto& self) {
8+
(void) self.setHookPriorityBeforePre("EditorPauseLayer::saveLevel", "alphalaneous.level-storage-api");
9+
}
810

911
$override bool init(LevelEditorLayer* layer);
1012
$override void saveLevel();

src/hooks/editor/EditorUI.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ using namespace geode::prelude;
66

77
EditorUI* ModEditorUI::INSTANCE = nullptr;
88

9-
void ModEditorUI::onModify(auto& self) {
10-
(void) self.setHookPriorityAfterPost("EditorUI::init", "hjfod.betteredit");
11-
}
12-
139
EditorUI* ModEditorUI::getEarly() {
1410
return ModEditorUI::INSTANCE;
1511
}

src/hooks/editor/EditorUI.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
class $modify(ModEditorUI, EditorUI) {
88
static EditorUI* INSTANCE;
99
public:
10-
static void onModify(auto& self);
10+
static void onModify(auto& self) {
11+
(void) self.setHookPriorityAfterPost("EditorUI::init", "hjfod.betteredit");
12+
}
1113

1214
static EditorUI* getEarly();
1315

0 commit comments

Comments
 (0)