Skip to content

Commit 4ab6190

Browse files
committed
title wave notification
1 parent 1a4f2a4 commit 4ab6190

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Floating menu button now resizes properly when changing graphics quality
1010
- Fix sizing issues with thumbnails on *Level Ads* for lower graphics qualities
1111
- Fix ad on *Level Ads* being stuck loading if already playing the advertised level
12+
- Add notification hint for *'Tidal Wave' Jumpscare!* option to clarify it intentionally doesn't switch to the extreme demon we're all thinking about
1213
- Internal tweaks
1314

1415
# v1.2.0

src/hooks/jumpscares/ForceLevels.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ static void tryJumpscare(bool useReplay) {
103103
auto const level = js_internal::getLevelInfo(js.first);
104104

105105
log::debug("jumpscare for {} triggered!", level);
106-
return jumpscares::switchLevel(level, false, useReplay);
106+
return jumpscares::switchLevel(level, false, useReplay, [level]() {
107+
if (level == jumpscares::level::tidal) Notification::create("Wait, this isn't Tidal Wave...")->show();
108+
});
107109
};
108110
};
109111
};

src/util/Jumpscares.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace horrible {
1212
inline constexpr auto tidal = 93733469;
1313
};
1414

15-
void switchLevel(int level, bool dontCreateObjects, bool useReplay);
15+
void switchLevel(int level, bool dontCreateObjects, bool useReplay, geode::CopyableFunction<void()>&& callback = nullptr);
1616

1717
namespace coro {
1818
void getLevel(int id, geode::CopyableFunction<void(geode::Result<GJGameLevel*>)>&& callback);

src/util/src/Jumpscares.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
using namespace geode::prelude;
88
using namespace horrible::util;
99

10-
void jumpscares::switchLevel(int level, bool dontCreateObjects, bool useReplay) {
10+
void jumpscares::switchLevel(int level, bool dontCreateObjects, bool useReplay, geode::CopyableFunction<void()>&& callback) {
1111
if (auto pl = PlayLayer::get()) {
1212
if (pl->m_level->m_levelID == level) return;
1313
};
1414

15-
coro::getLevel(level, [level, dontCreateObjects, useReplay](Result<GJGameLevel*> result) {
15+
coro::getLevel(level, [level, dontCreateObjects, useReplay, cb = std::move(callback)](Result<GJGameLevel*> result) {
1616
if (result.isOk()) {
1717
auto lvl = std::move(result).unwrap();
1818

@@ -22,6 +22,8 @@ void jumpscares::switchLevel(int level, bool dontCreateObjects, bool useReplay)
2222

2323
auto scene = PlayLayer::scene(lvl, useReplay, dontCreateObjects);
2424
CCDirector::sharedDirector()->replaceScene(scene);
25+
26+
if (cb) cb();
2527
} else if (result.isErr()) {
2628
log::error("Failed to get level {}: {}", level, result.unwrapErr());
2729
};

0 commit comments

Comments
 (0)