Skip to content

Commit 809636e

Browse files
committed
fix
1 parent b045f1b commit 809636e

File tree

6 files changed

+102
-39
lines changed

6 files changed

+102
-39
lines changed

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v2.1.1
2+
3+
- Fixed issues which caused rejected mod (good job, rod!)
4+
5+
![garage plus joke](omgrod.geodify/changelog1.png)
6+
17
# v2.1.0
28

39
- Added Layers: `teamtcm.geometry-dash-odyssey/OdysseyComicLayer`, `teamtcm.geometry-dash-odyssey/OdysseySelectLayer`, `gd/UIOptionsLayer`, `gd/UIPOptionsLayer`, `GJShopLayer` (currently all of them are together)

mod.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"win": "2.2074",
66
"mac": "2.2074"
77
},
8-
"version": "v2.1.0",
8+
"version": "v2.1.1-beta.1",
99
"id": "omgrod.geodify",
1010
"name": "Geodify",
1111
"developers": ["OmgRod", "Cosmella-v"],
@@ -17,7 +17,8 @@
1717
"res/loops/*"
1818
],
1919
"sprites": [
20-
"res/*.png"
20+
"res/*.png",
21+
"res/joke/*.png"
2122
]
2223
},
2324
"settings": {

res/joke/changelog1.png

5.58 KB
Loading

src/modify/CCLayer.cpp

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
#include "../SwelvyBG.hpp"
2-
#include <Geode/Geode.hpp>
3-
#include <Geode/modify/CCLayer.hpp>
1+
// #include "../SwelvyBG.hpp"
2+
// #include <Geode/Geode.hpp>
3+
// #include <Geode/modify/CCLayer.hpp>
44

5-
using namespace geode::prelude;
5+
// using namespace geode::prelude;
66

7-
class $modify(MyCCLayer, CCLayer) {
8-
void onEnter() {
9-
CCLayer::onEnter();
10-
if (auto parent = dynamic_cast<UIOptionsLayer*>(this->getParent())) {
11-
if (Mod::get()->getSettingValue<bool>("gd/UIOptionsLayer")) {
12-
int lowestZ = INT_MAX;
13-
CCObject* obj = nullptr;
14-
CCARRAY_FOREACH(this->getChildren(), obj) {
15-
if (auto node = dynamic_cast<CCNode*>(obj)) {
16-
lowestZ = std::min(lowestZ, node->getZOrder());
17-
}
18-
}
7+
// class $modify(MyCCLayer, CCLayer) {
8+
// void onEnter() {
9+
// CCLayer::onEnter();
10+
// if (auto parent = typeinfo_cast<UIOptionsLayer*>(this->getParent())) {
11+
// if (Mod::get()->getSettingValue<bool>("gd/UIOptionsLayer")) {
12+
// int lowestZ = INT_MAX;
13+
// CCObject* obj = nullptr;
14+
// CCARRAY_FOREACH(this->getChildren(), obj) {
15+
// if (auto node = typeinfo_cast<CCNode*>(obj)) {
16+
// lowestZ = std::min(lowestZ, node->getZOrder());
17+
// }
18+
// }
1919

20-
auto swelvyBG = SwelvyBG::create();
21-
swelvyBG->setZOrder(lowestZ - 1);
22-
this->addChild(swelvyBG);
23-
}
24-
}
25-
if (auto parent = dynamic_cast<UIPOptionsLayer*>(this->getParent())) {
26-
if (Mod::get()->getSettingValue<bool>("gd/UIPOptionsLayer")) {
27-
int lowestZ = INT_MAX;
28-
CCObject* obj = nullptr;
29-
CCARRAY_FOREACH(this->getChildren(), obj) {
30-
if (auto node = dynamic_cast<CCNode*>(obj)) {
31-
lowestZ = std::min(lowestZ, node->getZOrder());
32-
}
33-
}
20+
// auto swelvyBG = SwelvyBG::create();
21+
// swelvyBG->setZOrder(lowestZ - 1);
22+
// this->addChild(swelvyBG);
23+
// }
24+
// }
25+
// if (auto parent = typeinfo_cast<UIPOptionsLayer*>(this->getParent())) {
26+
// if (Mod::get()->getSettingValue<bool>("gd/UIPOptionsLayer")) {
27+
// int lowestZ = INT_MAX;
28+
// CCObject* obj = nullptr;
29+
// CCARRAY_FOREACH(this->getChildren(), obj) {
30+
// if (auto node = typeinfo_cast<CCNode*>(obj)) {
31+
// lowestZ = std::min(lowestZ, node->getZOrder());
32+
// }
33+
// }
3434

35-
auto swelvyBG = SwelvyBG::create();
36-
swelvyBG->setZOrder(lowestZ - 1);
37-
this->addChild(swelvyBG);
38-
}
39-
}
40-
}
41-
};
35+
// auto swelvyBG = SwelvyBG::create();
36+
// swelvyBG->setZOrder(lowestZ - 1);
37+
// this->addChild(swelvyBG);
38+
// }
39+
// }
40+
// }
41+
// };

src/modify/gd/UIOptionsLayer.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include "../../SwelvyBG.hpp"
2+
#include <Geode/Geode.hpp>
3+
#include <Geode/modify/UIOptionsLayer.hpp>
4+
5+
using namespace geode::prelude;
6+
7+
class $modify(MyUIOptionsLayer, UIOptionsLayer) {
8+
bool init(bool p0) {
9+
if (!UIOptionsLayer::init(p0)) {
10+
return false;
11+
}
12+
if (Mod::get()->getSettingValue<bool>("gd/UIOptionsLayer")) {
13+
int lowestZ = INT_MAX;
14+
CCObject* obj = nullptr;
15+
auto layer = this->getChildByType<CCLayer*>(0);
16+
CCARRAY_FOREACH(layer->getChildren(), obj) {
17+
if (auto node = typeinfo_cast<CCNode*>(obj)) {
18+
lowestZ = std::min(lowestZ, node->getZOrder());
19+
}
20+
}
21+
22+
auto swelvyBG = SwelvyBG::create();
23+
swelvyBG->setZOrder(lowestZ - 1);
24+
layer->addChild(swelvyBG);
25+
}
26+
return true;
27+
}
28+
};

src/modify/gd/UIPOptionsLayer.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include "../../SwelvyBG.hpp"
2+
#include <Geode/Geode.hpp>
3+
#include <Geode/modify/UIPOptionsLayer.hpp>
4+
5+
using namespace geode::prelude;
6+
7+
class $modify(MyUIPOptionsLayer, UIPOptionsLayer) {
8+
bool init() {
9+
if (!UIPOptionsLayer::init()) {
10+
return false;
11+
}
12+
if (Mod::get()->getSettingValue<bool>("gd/UIPOptionsLayer")) {
13+
int lowestZ = INT_MAX;
14+
CCObject* obj = nullptr;
15+
auto layer = this->getChildByType<CCLayer*>(0);
16+
CCARRAY_FOREACH(layer->getChildren(), obj) {
17+
if (auto node = typeinfo_cast<CCNode*>(obj)) {
18+
lowestZ = std::min(lowestZ, node->getZOrder());
19+
}
20+
}
21+
22+
auto swelvyBG = SwelvyBG::create();
23+
swelvyBG->setZOrder(lowestZ - 1);
24+
layer->addChild(swelvyBG);
25+
}
26+
return true;
27+
}
28+
};

0 commit comments

Comments
 (0)