Skip to content

Commit 97f47fa

Browse files
committed
fix stuff
1 parent e6f4d49 commit 97f47fa

15 files changed

Lines changed: 42 additions & 43 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Disturb the player's accessibility to the gameplay.
3737
Probably the worst of it all...
3838

3939
> [!WARNING]
40-
> *Please keep in mind that certain hacks from mod menus may interfere with this mod's functionality.*
40+
> *Please keep in mind that certain game settings and hacks from mod menus may interfere with parts of this mod's functionality.*
4141
4242
---
4343

about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This silly lil' mod adds a mod menu filled to the brim with **over 30 crazy trol
1313
### Options
1414
When <cf>pressing `\` on your keyboard</c> or by <cl>pressing the floating *Horrible Options* button on your screen</c>, a <cg>menu</c> will pop up with <cg>a list of horrible mod options</c> you can <cy>toggle anytime</c> on your game to do some interesting things to your gaming experience. From random mirror portals to game-breaking glitches! You can view more information within the contents of the menu itself.
1515

16-
> ![icon](frame:GJ_infoIcon_001.png?scale=0.5) <cj>*You can customize any keybinds in this mod via the *[Custom Keybinds](mod:geode.custom-keybinds)* mod.*</c>
16+
> ![ℹ️](frame:GJ_infoIcon_001.png?scale=0.5) <cj>*You can customize any keybinds in this mod via the *[Custom Keybinds](mod:geode.custom-keybinds)* mod.*</c>
1717
1818
#### Player Life
1919
Give the player a limited health-like meter that must always stay above 0 to prevent the player from dying.
@@ -33,7 +33,7 @@ Disturb the player's accessibility to the gameplay.
3333
#### Misc
3434
Probably the worst of it all...
3535

36-
> ![⚠️](frame:geode.loader/info-warning.png?scale=0.375) <cy>*Please keep in mind that certain hacks from mod menus may interfere with this mod's functionality.*</c>
36+
> ![⚠️](frame:geode.loader/info-warning.png?scale=0.375) <cy>*Please keep in mind that certain game settings and hacks from mod menus may interfere with parts of this mod's functionality.*</c>
3737
3838
---
3939

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"description": "Change the size of the floating button.",
9797
"default": 1.0,
9898
"min": 0.5,
99-
"max": 3.0,
99+
"max": 2.5,
100100
"control": {
101101
"input": true,
102102
"slider": true,

src/classes/Randng.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace horrible {
1717
typename T = int,
1818
typename = std::enable_if_t<std::is_arithmetic_v<T>>
1919
>
20-
inline T get(T max = static_cast<T>(200), T min = static_cast<T>(0)) {
20+
inline T get(T max, T min = static_cast<T>(0)) {
2121
return utils::random::generate<T>(min, max + static_cast<T>(1));
2222
};
2323

@@ -48,7 +48,6 @@ namespace horrible {
4848
typename = std::enable_if_t<std::is_floating_point_v<F>>
4949
>
5050
inline F pc() {
51-
// fast<int>() is integral; cast its result to the floating return type
5251
return static_cast<F>(fast<int>()) / static_cast<F>(100);
5352
};
5453
};

src/classes/ui/src/SpamChallenge.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ bool SpamChallenge::init() {
3434

3535
setID("spam-jumps"_spr);
3636

37-
m_impl->m_inputTarget = randng::get(75, 25);
37+
// increase spam target for mobile players
38+
m_impl->m_inputTarget = randng::get(50, 15) * GEODE_PLATFORM_TARGET & PlatformID::Mobile ? 2 : 1;
3839

3940
auto const winSize = CCDirector::get()->getWinSize();
4041

@@ -50,7 +51,8 @@ bool SpamChallenge::init() {
5051
auto descLabel = CCLabelBMFont::create("Use your mouse button or tap the screen to increase the count.", "chatFont.fnt");
5152
descLabel->setID("description-label");
5253
descLabel->setWidth(getScaledContentWidth() - 1.25f);
53-
descLabel->setPosition({ winSize.width / 2.f, label->getPositionX() - label->getScaledContentHeight() - 8.75f });
54+
descLabel->setPosition({ winSize.width / 2.f, 25.f });
55+
descLabel->setAnchorPoint({ 0.5, 0 });
5456
descLabel->setColor({ 250, 250, 25 });
5557

5658
addChild(descLabel, 1);
@@ -60,8 +62,8 @@ bool SpamChallenge::init() {
6062
m_impl->m_counter->setScale(2.5f);
6163
m_impl->m_counter->setPosition({ winSize.width / 2.f, (winSize.height / 2.f) - 6.25f });
6264

63-
auto moveUp = CCEaseSineInOut::create(CCEaseSineInOut::create(CCMoveBy::create(1.25f, ccp(0, 12.5f))));
64-
auto moveDown = CCEaseSineInOut::create(CCEaseSineInOut::create(CCMoveBy::create(1.25f, ccp(0, -12.5f))));
65+
auto moveUp = CCEaseSineInOut::create(CCMoveBy::create(1.25f, ccp(0, 12.5f)));
66+
auto moveDown = CCEaseSineInOut::create(CCMoveBy::create(1.25f, ccp(0, -12.5f)));
6567

6668
auto seq = CCSequence::createWithTwoActions(moveUp, moveDown);
6769

@@ -94,7 +96,7 @@ void SpamChallenge::setCallback(std::function<void(bool)> const& cb) {
9496
bool SpamChallenge::ccTouchBegan(CCTouch* touch, CCEvent* event) {
9597
if (m_impl->m_timeRemaining > 0.f && m_impl->m_inputTarget > m_impl->m_inputCount) {
9698
m_impl->m_inputCount++;
97-
if (m_impl->m_counter) m_impl->m_counter->setCString(fmt::format("{} / {}", m_impl->m_inputCount, m_impl->m_inputTarget).data());
99+
if (m_impl->m_counter) m_impl->m_counter->setString(fmt::format("{} / {}", m_impl->m_inputCount, m_impl->m_inputTarget).data());
98100

99101
if (m_impl->m_inputCount >= m_impl->m_inputTarget) {
100102
unscheduleUpdate();

src/hooks/PlayLayer/BlackScreen.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ class $modify(BlackScreenPlayLayer, PlayLayer) {
1919
log::info("playlayer init called {}", rnd);
2020

2121
if (m_fields->enabled) {
22-
log::debug("black screen enabled, init scheduling black screen");
23-
2422
// random delay between 0 and 5 seconds
2523
float delay = static_cast<float>(rnd);
2624
log::debug("Black screen will appear after {} seconds", delay);
@@ -45,11 +43,11 @@ class $modify(BlackScreenPlayLayer, PlayLayer) {
4543
addChild(blackScreen, 99);
4644

4745
// Schedule removal after 0.5 seconds, then schedule to show again after a random delay
48-
blackScreen->runAction(
49-
CCSequence::create(
50-
CCDelayTime::create(0.25f),
51-
CCCallFuncN::create(this, callfuncN_selector(BlackScreenPlayLayer::removeBlackScreen)),
52-
nullptr));
46+
blackScreen->runAction(CCSequence::create(
47+
CCDelayTime::create(0.25f),
48+
CCCallFuncN::create(this, callfuncN_selector(BlackScreenPlayLayer::removeBlackScreen)),
49+
nullptr
50+
));
5351
};
5452
};
5553

src/hooks/PlayLayer/Confetti.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ class $modify(ConfettiPlayLayer, PlayLayer) {
3232

3333
void setupHasCompleted() {
3434
PlayLayer::setupHasCompleted();
35-
if (m_fields->enabled) nextConfetti();
35+
if (m_fields->enabled) scheduleOnce(schedule_selector(ConfettiPlayLayer::nextConfetti), randng::get(0.125f));
3636
};
3737

38-
void nextConfetti() {
38+
void nextConfetti(float) {
3939
auto delay = randng::get(10.f, 1.f);
4040
log::debug("scheduling confetti in {}s", delay);
4141

@@ -51,7 +51,7 @@ class $modify(ConfettiPlayLayer, PlayLayer) {
5151
for (int i = 0; i < randng::get(125, 75); i++) createConfetti();
5252
};
5353

54-
nextConfetti();
54+
scheduleOnce(schedule_selector(ConfettiPlayLayer::nextConfetti), randng::get(0.125f));;
5555
};
5656

5757
void createConfetti() {

src/hooks/PlayLayer/Earthquake.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ class $modify(EarthquakePlayLayer, PlayLayer) {
1313
};
1414

1515
void setupHasCompleted() {
16-
if (m_fields->enabled) nextQuake();
16+
if (m_fields->enabled) scheduleOnce(schedule_selector(EarthquakePlayLayer::nextQuake), 0.125f);
1717
PlayLayer::setupHasCompleted();
1818
};
1919

20-
void nextQuake() {
20+
void nextQuake(float) {
2121
auto delay = randng::get(3.f, 1.f);
2222
log::debug("scheduling quake in {}s", delay);
2323

@@ -29,12 +29,9 @@ class $modify(EarthquakePlayLayer, PlayLayer) {
2929
// shake the camera randomly based on intensity
3030
int rnd = randng::fast();
3131

32-
auto shakeX = (static_cast<float>(rnd % 25)) * 1.25f;
33-
auto shakeY = (static_cast<float>(rnd % 25)) * 1.25f;
34-
35-
shakeCamera(shakeX, shakeY, 0.1f);
32+
shakeCamera(randng::get(5.f, 1.f), randng::get(10.f, 1.f), 0.0125f);
3633
};
3734

38-
nextQuake();
35+
scheduleOnce(schedule_selector(EarthquakePlayLayer::nextQuake), 0.125f);
3936
};
4037
};

src/hooks/PlayLayer/Health.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class $modify(HealthPlayLayer, PlayLayer) {
8585
m_player1->playSpawnEffect();
8686
m_player2->playSpawnEffect();
8787

88-
shakeCamera(1.25f, 5.f, 0.125f);
88+
shakeCamera(1.25f, 2.5f, 0.0125f);
8989

9090
if (m_fields->m_healthLabel) {
9191
auto const hp = fmt::format("HP\n{}%", static_cast<int>(m_fields->m_health));

src/hooks/PlayLayer/Motivation.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ class $modify(MotivationPlayLayer, PlayLayer) {
9191
"This is fine.",
9292
"Still at it, huh?",
9393
"Nothing beats a Jet2 holiday!",
94+
"Beats me...",
95+
"Have you ever made an omelette?",
96+
"GO!",
97+
"Have you made it past 67% yet?",
98+
"I think you could use some ASMR.",
99+
"You gotta chill...",
94100
};
95101
};
96102

0 commit comments

Comments
 (0)