Skip to content

Commit 0db8ef2

Browse files
committed
stuff
1 parent 8ca0d44 commit 0db8ef2

57 files changed

Lines changed: 736 additions & 257 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

changelog.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 2.8.5
2+
3+
- Added Show Trajectory hitbox trail
4+
- Added menu snow, december snow is now togglable so you can have snowy menus all of the year
5+
- Added customizable shortcut animations
6+
- Added Keybind Hold mode
7+
- Removed unused language font to save on storage
8+
- Fixed mouse scrolling not working on mobile
9+
- Fixed rare crash with show trajectory
10+
- Fixed Run Info From in Percentage option not working
11+
- Fixed Speedhack and Safe Mode not appearing as red in the mod menu
12+
- Fixed Shortcut configs resetting when pressing escape instead of the OK button
13+
- Fixed Shortcuts not working during scene transitions
14+
115
# 2.8.4
216

317
- Added Gravity Arrow

mod-2.2074.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"geode": "4.10.0",
3-
"version": "v2.8.4-beta.1",
3+
"version": "v2.8.5-beta.1",
44
"gd": {
55
"win": "2.2074",
66
"android": "2.2074",
@@ -20,8 +20,6 @@
2020
"files": [
2121
"resources/fonts/kosugimaru/*.fnt",
2222
"resources/fonts/kosugimaru/*.png",
23-
"resources/fonts/chirongo/*.fnt",
24-
"resources/fonts/chirongo/*.png",
2523
"resources/fonts/lexend/*.fnt",
2624
"resources/fonts/lexend/*.png",
2725
"resources/fonts/notosans/*.fnt",

mod.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"geode": "5.5.3",
3-
"version": "v2.8.4",
3+
"version": "v2.8.5",
44
"gd": {
55
"win": "2.2081",
66
"android": "2.2081",
@@ -20,8 +20,6 @@
2020
"files": [
2121
"resources/fonts/kosugimaru/*.fnt",
2222
"resources/fonts/kosugimaru/*.png",
23-
"resources/fonts/chirongo/*.fnt",
24-
"resources/fonts/chirongo/*.png",
2523
"resources/fonts/lexend/*.fnt",
2624
"resources/fonts/lexend/*.png",
2725
"resources/fonts/notosans/*.fnt",

resources/translations

src/Client/EnumModule.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,14 @@ std::map<int, std::string> EnumModule::getDisplayNames()
4141
ModuleNode* EnumModule::getNode()
4242
{
4343
return EnumModuleNode::create(this);
44+
}
45+
46+
void EnumModule::setNext()
47+
{
48+
setValue(std::next(listedValues.find(value))->first);
49+
}
50+
51+
void EnumModule::setPrev()
52+
{
53+
setValue(std::prev(listedValues.find(value))->first);
4454
}

src/Client/EnumModule.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@ class EnumModule : public Module
3838

3939
std::map<int, std::string> getDisplayNames();
4040

41+
void setNext();
42+
void setPrev();
43+
4144
virtual ModuleNode* getNode();
4245
};

src/Client/EnumModuleNode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ void EnumModuleNode::onLeft(CCObject* sender)
6262
{
6363
auto mod = static_cast<EnumModule*>(module);
6464

65-
mod->setValue(mod->getValue() - 1);
65+
mod->setPrev();
6666
updateNode();
6767
}
6868

6969
void EnumModuleNode::onRight(CCObject* sender)
7070
{
7171
auto mod = static_cast<EnumModule*>(module);
7272

73-
mod->setValue(mod->getValue() + 1);
73+
mod->setNext();
7474
updateNode();
7575
}

src/Client/Module.cpp

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,36 @@ void Module::removeKeybind()
295295

296296
void Module::onKeybindActivated(KeyState state)
297297
{
298-
this->setUserEnabled(!getUserEnabled());
298+
bool en = getUserEnabled();
299+
300+
switch (keyConfig.type)
301+
{
302+
case KeybindType::Toggle:
303+
en = !getUserEnabled();
304+
305+
if (!state.isDown && !state.isRepeat)
306+
return;
307+
break;
308+
309+
case KeybindType::Hold:
310+
en = state.isDown;
311+
312+
if (state.isRepeat)
313+
return;
314+
break;
315+
316+
case KeybindType::HoldInverted:
317+
en = !state.isDown;
318+
319+
if (state.isRepeat)
320+
return;
321+
break;
322+
}
323+
324+
if (getUserEnabled() == en)
325+
return;
326+
327+
this->setUserEnabled(en);
299328

300329
onToggle();
301330
ModuleNode::updateAllNodes(nullptr);
@@ -346,6 +375,7 @@ void Module::saveShortcutConfig()
346375
conf["colour_opacity"] = shortcutConf.colour.opacity;
347376
conf["colour_chromaspeed"] = shortcutConf.colour.chromaSpeed;
348377
conf["colour_type"] = (int)shortcutConf.colour.type;
378+
conf["animation"] = (int)shortcutConf.animation;
349379

350380
Mod::get()->setSavedValue<matjson::Value>(fmt::format("{}_shortcutconf", getID()), conf);
351381
}
@@ -375,6 +405,7 @@ void Module::loadShortcutConfig()
375405
conf.colour.opacity = json["colour_opacity"].asDouble().unwrapOr(1);
376406
conf.colour.chromaSpeed = json["colour_chromaspeed"].asDouble().unwrapOr(1);
377407
conf.colour.type = (ColourConfigType)json["colour_type"].asInt().unwrapOr(0);
408+
conf.animation = (FloatingButtonAnimationType)json["animation"].asInt().unwrapOr(0);
378409

379410
setShortcutConfig(Mod::get()->getSavedValue<bool>(fmt::format("{}_shortcutenabled", getID()), false), conf);
380411
}
@@ -399,6 +430,7 @@ void Module::setShortcutConfig(bool enabled, ModuleShortcutConfig conf)
399430
btn->setMovable(shortcutConf.isMovable);
400431
btn->setBaseScale(shortcutConf.scale);
401432
btn->setBaseOpacity(shortcutConf.opacity);
433+
btn->setAnimation(shortcutConf.animation);
402434

403435
shortcutNode = btn;
404436
}

src/Client/ModuleNode.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void ModuleNode::setup()
6969

7070
void ModuleNode::onUpdateLabelColour(float dt)
7171
{
72-
auto col = SeperateColourCheatNames::get()->getRealEnabled() && (module->getSafeModeTrigger() != SafeModeTrigger::None) ? CheatNameColour::get()->getColour() : ccWHITE;
72+
auto col = SeperateColourCheatNames::get()->getRealEnabled() && shouldAppearCheat() ? CheatNameColour::get()->getColour() : ccWHITE;
7373

7474
if (isDisabled())
7575
{
@@ -246,5 +246,21 @@ bool ModuleNode::altClickBegan(int button, cocos2d::CCPoint point)
246246
return true;
247247
}
248248

249+
return false;
250+
}
251+
252+
bool ModuleNode::shouldAppearCheat()
253+
{
254+
if (module->getID() == "safe-mode")
255+
return true;
256+
257+
if (module->getID() == "speedhack/enabled")
258+
return true;
259+
260+
return (module->getSafeModeTrigger() != SafeModeTrigger::None);
261+
}
262+
263+
bool ModuleNode::shouldAppearDisabled()
264+
{
249265
return false;
250266
}

src/Client/ModuleNode.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class ModuleNode : public qolmod::CCMenuExt, public qolmod::AltMouseDelegate
2020
bool disabled = false;
2121

2222
virtual bool altClickBegan(int button, cocos2d::CCPoint point);
23+
virtual void draw();
2324

2425
~ModuleNode();
2526

@@ -37,7 +38,9 @@ class ModuleNode : public qolmod::CCMenuExt, public qolmod::AltMouseDelegate
3738
void onUpdateLabelColour(float dt);
3839
bool isDisabled();
3940

41+
virtual bool shouldAppearCheat();
42+
virtual bool shouldAppearDisabled();
43+
4044
virtual void updateNode();
41-
virtual void draw();
4245
bool init(Module* module);
4346
};

0 commit comments

Comments
 (0)