Skip to content

Commit 4375dbe

Browse files
committed
tweaks
1 parent c547d7d commit 4375dbe

6 files changed

Lines changed: 20 additions & 11 deletions

File tree

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# v1.2.2
2+
- Tweaked charge-up functionality for *Charged Leap* option
3+
- Decreased speed multiplier for *Charged Leap* option by `16.7%`
24
- Fix visual bug with fading color progress bars
35

46
# v1.2.1

src/Utils.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,15 @@ namespace horrible {
7676
inline constexpr auto chat = "chatFont.fnt";
7777
};
7878

79-
namespace fs = asp::fs; // Shortcut for `asp::fs`
80-
namespace str = geode::utils::string; // Shortcut for `geode::utils::string`
79+
namespace fs = asp::fs; // Shortcut for `asp::fs`
80+
81+
namespace str {
82+
using namespace geode::utils::string;
83+
84+
inline constexpr auto isOnOff(bool on) {
85+
return on ? "ON" : "OFF";
86+
};
87+
};
8188

8289
namespace popup {
8390
inline void closeBtnID(CCMenuItemSpriteExtra* btn) {

src/hooks/Flicks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ class $modify(FlicksPlayLayer, PlayLayer) {
4545
queueInMainThread([opt]() {
4646
if (auto o = opt.lock()) {
4747
o->isEnabled() ? o->disable() : o->enable();
48-
log::warn("Flicked option {} {} due to flicks", o->getID(), o->isEnabled() ? "ON" : "OFF");
48+
log::warn("Flicked option {} {} due to flicks", o->getID(), str::isOnOff(o->isEnabled()));
4949

5050
sfx::play(sfx::file::bad);
51-
Notification::create(fmt::format("Flicked {} ({}) {}", o->getName(), o->getCategory(), o->isEnabled() ? "ON" : "OFF").c_str(), NotificationIcon::Warning, 0.5f)->show();
51+
Notification::create(fmt::format("Flicked {} ({}) {}", o->getName(), o->getCategory(), str::isOnOff(o->isEnabled())).c_str(), NotificationIcon::Warning, 0.5f)->show();
5252
};
5353
});
5454
};

src/hooks/jumpscares/ForceLevels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace js_internal {
5252
};
5353

5454
static void toggleHooks(bool on) {
55-
log::trace("Toggling all jumpscare hooks {}", on ? "ON" : "OFF");
55+
log::trace("Toggling all jumpscare hooks {}", str::isOnOff(on));
5656

5757
for (auto& hook : g_jsHookVector) {
5858
if (auto h = hook.lock()) (void)h->toggle(on);

src/hooks/mechanics/Leap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class $modify(LeapGJBaseGameLayer, GJBaseGameLayer) {
6363
if (down) {
6464
f->charge = 0.f;
6565

66-
schedule(schedule_selector(LeapGJBaseGameLayer::chargeUp), 0.125f);
66+
schedule(schedule_selector(LeapGJBaseGameLayer::chargeUp), 0.1f);
6767
if (f->chargeMeter) f->chargeMeter->setVisible(true);
6868
} else {
6969
unschedule(schedule_selector(LeapGJBaseGameLayer::chargeUp));
@@ -83,7 +83,7 @@ class $modify(LeapGJBaseGameLayer, GJBaseGameLayer) {
8383

8484
auto pct = f->charge / 100.f;
8585

86-
auto newSpeed = (f->speed * 3.f) * pct;
86+
auto newSpeed = (f->speed * 2.5f) * pct;
8787
auto boostHeight = 16.25f * pct;
8888

8989
m_player1->m_playerSpeed = newSpeed;
@@ -123,7 +123,7 @@ class $modify(LeapGJBaseGameLayer, GJBaseGameLayer) {
123123
unschedule(schedule_selector(LeapGJBaseGameLayer::chargeUp));
124124
};
125125

126-
f->charge += 16.25f;
126+
f->charge += 20.f;
127127

128128
if (f->chargeMeter) {
129129
f->chargeMeter->updateProgress(f->charge);

src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace main {
3434
static void toggleSafeModeHooks(bool value) {
3535
for (auto const& hook : g_safeModeHooks) {
3636
if (auto h = hook.lock()) {
37-
log::trace("Toggling safe mode hook '{}' {}...", h->getDisplayName(), value ? "ON" : "OFF");
37+
log::trace("Toggling safe mode hook '{}' {}...", h->getDisplayName(), str::isOnOff(value));
3838
(void)h->toggle(value);
3939
};
4040
};
@@ -89,7 +89,7 @@ namespace main {
8989

9090
for (auto const& hook : g_floatingBtnHooks) {
9191
if (auto h = hook.lock()) {
92-
log::trace("Toggling floating button hook '{}' {}...", h->getDisplayName(), value ? "ON" : "OFF");
92+
log::trace("Toggling floating button hook '{}' {}...", h->getDisplayName(), str::isOnOff(value));
9393
(void)h->toggle(value);
9494
};
9595
};
@@ -184,7 +184,7 @@ namespace main {
184184
OptionCheatingEvent()
185185
.listen([](bool cheating) {
186186
if (mod->getSettingValue<bool>(setting::DynamicSafeMode)) {
187-
log::warn("Dynamic safe mode is now {}", cheating ? "ON" : "OFF");
187+
log::warn("Dynamic safe mode is now {}", str::isOnOff(cheating));
188188
main::toggleSafeModeHooks(cheating);
189189
};
190190
})

0 commit comments

Comments
 (0)