Skip to content

Commit fafc6af

Browse files
committed
Stupid bug
1 parent d995de5 commit fafc6af

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Event Levels changelog
22

3+
## 1.0.1
4+
- Fix not having the <cb>Animated Fire</c> mod breaking some changes
5+
36
## 1.0.0
47
- Initial commit!

mod.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
},
99
"id": "timestepyt.eventlevels",
1010
"name": "Event Levels",
11-
"version": "v1.0.0",
11+
"version": "v1.0.1",
1212
"developer": "TimeStepYT",
1313
"description": "Allows you to use the Event Levels button",
14+
"repository": "https://github.com/Reinmmar/EventLevels",
1415
"settings": {
1516
"useDaily": {
1617
"name": "Modified Daily Page",

src/DailyLevelNode.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ class $modify(DailyLevelNodeHook, DailyLevelNode) {
2727
bool init(GJGameLevel * level, DailyLevelPage * page, bool isNew) {
2828
if (!DailyLevelNode::init(level, page, isNew)) return false;
2929
auto hideSprite = this->getChildByID("uproxide.animated_fire/hide-spr");
30-
if (hideSprite == nullptr) return true;
31-
cocos2d::ccColor3B color;
32-
if (atEvent) {
33-
color.r = 0x3f;
34-
color.g = 0x09;
35-
color.b = 0x7b;
36-
static_cast<CCSprite*>(hideSprite)->setColor(color);
30+
if (hideSprite != nullptr) {
31+
cocos2d::ccColor3B color;
32+
if (atEvent) {
33+
color.r = 0x3f;
34+
color.g = 0x09;
35+
color.b = 0x7b;
36+
static_cast<CCSprite*>(hideSprite)->setColor(color);
37+
}
38+
else return true;
3739
}
38-
else return true;
3940
if (!Mod::get()->getSettingValue<bool>("useDaily")) return true;
4041
if (this->getChildByID("crown-sprite") == nullptr)
4142
return true;

0 commit comments

Comments
 (0)