Skip to content

Commit f6d6a50

Browse files
committed
私は救いが入り用です
1 parent 9433412 commit f6d6a50

File tree

87 files changed

+317
-309
lines changed

Some content is hidden

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

87 files changed

+317
-309
lines changed

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 1.7.9(1)
1+
# 1.7.9(2)
22

33
- Removed Comment Emojis integration to fix lag
44
- Improved Performance

include/QOLModExt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Window* windowFromWindowExt(WindowExt* wndExt)
6565

6666
new EventListener<EventFilter<ToggleModuleEvent>>(+[](ToggleModuleEvent* ev)
6767
{
68-
auto mod = Client::GetModule(ev->id);
68+
auto mod = Module::get(ev->id);
6969

7070
if (mod->enabled != ev->enabled)
7171
mod->onToggleAndroid(nullptr);

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"geode": "4.4.0",
3-
"version": "v1.7.91",
3+
"version": "v1.7.92",
44
"gd": {
55
"win": "2.2074",
66
"android": "2.2074",

src/Client/AndroidBall.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ bool AndroidBall::init()
1717

1818
instance = this;
1919

20-
mod = Client::GetModule("hide-btn");
21-
mod2 = Client::GetModule("instant-fade");
22-
canDrag = Client::GetModule("allow-dragging");
20+
mod = Module::get("hide-btn");
21+
mod2 = Module::get("instant-fade");
22+
canDrag = Module::get("allow-dragging");
2323

2424
menu = CCMenu::create();
2525
menu->setPosition(position);
@@ -100,7 +100,7 @@ bool AndroidBall::_ccTouchEnded(cocos2d::CCTouch* touch, cocos2d::CCEvent* event
100100

101101
doingThing = false;
102102

103-
if (Client::GetModuleEnabled("save-pos"))
103+
if (Module::get("save-pos")->enabled)
104104
{
105105
Mod::get()->setSavedValue("posX", position.x);
106106
Mod::get()->setSavedValue("posY", position.y);
@@ -165,10 +165,10 @@ void AndroidBall::UpdateVisible(bool i)
165165
{
166166
bool vis = true;
167167

168-
if (Client::GetModuleEnabled("disable-gp") && this->getParent())
168+
if (Module::get("disable-gp")->enabled && this->getParent())
169169
vis = !(this->getParent()->getChildByType<PlayLayer>(0) && !this->getParent()->getChildByType<PauseLayer>(0));
170170

171-
if (Client::GetModuleEnabled("disable-editor") && this->getParent() && this->getParent()->getChildByType<LevelEditorLayer>(0))
171+
if (Module::get("disable-editor")->enabled && this->getParent() && this->getParent()->getChildByType<LevelEditorLayer>(0))
172172
vis = editorShouldBeVisible();
173173

174174
#ifdef GEODE_IS_DESKTOP

src/Client/AndroidUI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bool AndroidUI::setup()
1717
this->setID("QOLModUI");
1818
this->runAction(CCFadeTo::create(0.5f, 100));
1919

20-
if (Client::GetModuleEnabled("menu-bg-blur") && !LaunchArgs::get()->hasLaunchArg("--qolmod:no-blur"))
20+
if (Module::get("menu-bg-blur")->enabled && !LaunchArgs::get()->hasLaunchArg("--qolmod:no-blur"))
2121
{
2222
auto blur = BlurLayer::create();
2323
blur->setID("blur-layer");
@@ -200,7 +200,7 @@ bool AndroidUI::setup()
200200
updateSearchBox();
201201
updateVersionLabel();
202202

203-
//if (Client::GetModuleEnabled("npesta-width"))
203+
//if (Module::get("npesta-width")->enabled)
204204
//{
205205
// panel->setPositionX(panel->getPositionX() + 5);
206206
// panel->setContentSize(panel->getContentSize() + ccp(10, 0));
@@ -613,7 +613,7 @@ void AndroidUI::keyDown(cocos2d::enumKeyCodes key)
613613

614614
void AndroidUI::updateSearchBox()
615615
{
616-
auto en = Client::GetModuleEnabled("ui-search-box");
616+
auto en = Module::get("ui-search-box")->enabled;
617617

618618
versionInfo->setVisible(!en);
619619
inputField->setVisible(en);

src/Client/Client.cpp

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void Client::initImGui()
120120

121121
void Client::drawImGui()
122122
{
123-
if (Client::GetModuleEnabled("menu-bg-blur") && !LaunchArgs::get()->hasLaunchArg("--qolmod:no-blur"))
123+
if (Module::get("menu-bg-blur")->enabled && !LaunchArgs::get()->hasLaunchArg("--qolmod:no-blur"))
124124
blurLayer->visit();
125125

126126
// ImGui::GetStyle().Alpha = bgOpacity->getDisplayedOpacity() / 255.0f;
@@ -436,41 +436,4 @@ void Client::loadImGuiTheme(std::string theme)
436436
THEME_COLOUR(NavWindowingHighlight);
437437
THEME_COLOUR(NavWindowingDimBg);
438438
THEME_COLOUR(ModalWindowDimBg);
439-
}
440-
441-
bool Client::GetModuleEnabled(std::string id)
442-
{
443-
auto mod = GetModule(id);
444-
445-
return mod ? mod->enabled : false;
446-
}
447-
448-
Module* Client::GetModule(std::string id)
449-
{
450-
if (!instance)
451-
return nullptr;
452-
453-
for (auto wnd : instance->windows)
454-
{
455-
for (auto mod : wnd->modules)
456-
{
457-
if (!mod->id.compare(id))
458-
{
459-
return mod;
460-
}
461-
462-
for (auto option : mod->options)
463-
{
464-
if (option)
465-
{
466-
if (!option->id.compare(id))
467-
{
468-
return option;
469-
}
470-
}
471-
}
472-
}
473-
}
474-
475-
return nullptr;
476439
}

src/Client/Client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Client
7171
std::vector<std::filesystem::path> getLanguages();
7272

7373
//[[deprecated("GetModuleEnabled has been deprecated due to lag, please rember to cache the module :3")]]
74-
static bool GetModuleEnabled(std::string id);
74+
// static bool GetModuleEnabled(std::string id);
7575

76-
static Module* GetModule(std::string id);
76+
// static Module* GetModule(std::string id);
7777
};

src/Client/ClientSetup.h

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -145,57 +145,57 @@ class ClientUtils
145145
Client::instance->windows.push_back(level);
146146

147147

148-
Client::GetModule("noclip")->options.push_back(new Module("Tint on death", "noclip-death-tint", "Tints the screen red when you die in noclip"));
149-
Client::GetModule("noclip")->options.push_back(new SliderModule("Tint Opacity:", "tint-opacity", 0.25f));
150-
Client::GetModule("noclip")->options.push_back(new ColourModule("Tint Colour:", "noclip-tint-colour", ccc3(255, 0, 0)));
151-
Client::GetModule("noclip")->options.push_back(nullptr);
152-
Client::GetModule("noclip")->options.push_back(new Module("Minimum Accuracy", "noclip-min-accuracy-toggle", "Allows you to die if your noclip accuracy drops below this value"));
153-
Client::GetModule("noclip")->options.push_back(new InputModule("Min Accuracy:", "noclip-min-accuracy", "95.0"));
154-
Client::GetModule("noclip")->options.push_back(new Module("Player 1", "noclip-player1", "Apply noclip to player 1", true));
155-
Client::GetModule("noclip")->options.push_back(new Module("Player 2", "noclip-player2", "Apply noclip to player 2", true));
156-
Client::GetModule("noclip")->options.push_back(new SFXModule("Player 1 SFX:", "noclip-player1-sfx"));
157-
Client::GetModule("noclip")->options.push_back(new SFXModule("Player 2 SFX:", "noclip-player2-sfx"));
148+
Module::get("noclip")->options.push_back(new Module("Tint on death", "noclip-death-tint", "Tints the screen red when you die in noclip"));
149+
Module::get("noclip")->options.push_back(new SliderModule("Tint Opacity:", "tint-opacity", 0.25f));
150+
Module::get("noclip")->options.push_back(new ColourModule("Tint Colour:", "noclip-tint-colour", ccc3(255, 0, 0)));
151+
Module::get("noclip")->options.push_back(nullptr);
152+
Module::get("noclip")->options.push_back(new Module("Minimum Accuracy", "noclip-min-accuracy-toggle", "Allows you to die if your noclip accuracy drops below this value"));
153+
Module::get("noclip")->options.push_back(new InputModule("Min Accuracy:", "noclip-min-accuracy", "95.0"));
154+
Module::get("noclip")->options.push_back(new Module("Player 1", "noclip-player1", "Apply noclip to player 1", true));
155+
Module::get("noclip")->options.push_back(new Module("Player 2", "noclip-player2", "Apply noclip to player 2", true));
156+
Module::get("noclip")->options.push_back(new SFXModule("Player 1 SFX:", "noclip-player1-sfx"));
157+
Module::get("noclip")->options.push_back(new SFXModule("Player 2 SFX:", "noclip-player2-sfx"));
158158

159159

160-
Client::GetModule("kill-after")->options.push_back(new InputModule("Percent:", "death-percent", "100"));
161-
Client::GetModule("kill-after")->options.push_back(new InputModule("Time:", "death-time", "6.9"));
160+
Module::get("kill-after")->options.push_back(new InputModule("Percent:", "death-percent", "100"));
161+
Module::get("kill-after")->options.push_back(new InputModule("Time:", "death-time", "6.9"));
162162

163-
Client::GetModule("coin-tracers")->options.push_back(new ColourModule("Line Colour:", "coin-tracers-colour", ccc3(255, 0, 0)));
163+
Module::get("coin-tracers")->options.push_back(new ColourModule("Line Colour:", "coin-tracers-colour", ccc3(255, 0, 0)));
164164

165-
Client::GetModule("show-layout")->options.push_back(new Module("Keep Camera Triggers", "layout-retain-camera", "Keeps the 2.2 camera triggers in the level", true));
166-
Client::GetModule("show-layout")->options.push_back(new ColourModule("BG Colour:", "show-layout-bg", ccc3(40, 125, 255)));
167-
Client::GetModule("show-layout")->options.push_back(new ColourModule("Ground Colour:", "show-layout-g", ccc3(0, 102, 255)));
165+
Module::get("show-layout")->options.push_back(new Module("Keep Camera Triggers", "layout-retain-camera", "Keeps the 2.2 camera triggers in the level", true));
166+
Module::get("show-layout")->options.push_back(new ColourModule("BG Colour:", "show-layout-bg", ccc3(40, 125, 255)));
167+
Module::get("show-layout")->options.push_back(new ColourModule("Ground Colour:", "show-layout-g", ccc3(0, 102, 255)));
168168

169169

170170
auto decimals = new InputModule("Decimal Places:", "accurate-percentage-places", "2");
171171
decimals->allowedChars = "1234567890";
172-
Client::GetModule("accurate-percentage")->options.push_back(decimals);
172+
Module::get("accurate-percentage")->options.push_back(decimals);
173173

174174
auto seed = new InputModule("Seed:", "rand-seed-seed", "69420");
175175
seed->allowedChars = "1234567890";
176176
seed->maxSize = 16;
177-
Client::GetModule("rand-seed")->options.push_back(seed);
177+
Module::get("rand-seed")->options.push_back(seed);
178178

179179
auto cdownT = new InputModule("Time:", "countdown-time", "3");
180180
cdownT->allowedChars = "1234567890";
181181
cdownT->maxSize = 4;
182-
Client::GetModule("pause-countdown")->options.push_back(cdownT);
182+
Module::get("pause-countdown")->options.push_back(cdownT);
183183

184-
Client::GetModule("startpos-switcher")->options.push_back(new SliderModule("Opacity:", "startpos-opacity", 50.0f / 255.0f));
185-
Client::GetModule("frame-stepper")->options.push_back(new Module("unused", "unused-module", "this is here because i need a module for the popup"));
186-
//Client::GetModule("smart-startpos")->options.push_back(new SmartStartposUIModule());
187-
//Client::GetModule("smart-startpos")->optionSizeForce = Client::GetModule("smart-startpos")->options[0]->sizeForOptionsPage();
184+
Module::get("startpos-switcher")->options.push_back(new SliderModule("Opacity:", "startpos-opacity", 50.0f / 255.0f));
185+
Module::get("frame-stepper")->options.push_back(new Module("unused", "unused-module", "this is here because i need a module for the popup"));
186+
//Module::get("smart-startpos")->options.push_back(new SmartStartposUIModule());
187+
//Module::get("smart-startpos")->optionSizeForce = Module::get("smart-startpos")->options[0]->sizeForOptionsPage();
188188

189-
Client::GetModule("custom-respawn-time")->options.push_back(new InputModule("Delay:", "respawn-time-delay", "4.2069"));
189+
Module::get("custom-respawn-time")->options.push_back(new InputModule("Delay:", "respawn-time-delay", "4.2069"));
190190

191-
Client::GetModule("auto-clicker")->options.push_back(new InputModule("Interval", "auto-clicker-delay", "6"));
192-
Client::GetModule("auto-clicker")->options.push_back(new InputModule("Hold For", "auto-clicker-hold-for", "3"));
193-
Client::GetModule("auto-clicker")->options.push_back(new Module("Player 1", "auto-clicker-player1", "Should it click for player 1", true));
194-
Client::GetModule("auto-clicker")->options.push_back(new Module("Player 2", "auto-clicker-player2", "Should it click for player 2", true));
195-
as<InputModule*>(Client::GetModule("auto-clicker")->options[0])->allowedChars = "0123456789";
196-
as<InputModule*>(Client::GetModule("auto-clicker")->options[1])->allowedChars = "0123456789";
191+
Module::get("auto-clicker")->options.push_back(new InputModule("Interval", "auto-clicker-delay", "6"));
192+
Module::get("auto-clicker")->options.push_back(new InputModule("Hold For", "auto-clicker-hold-for", "3"));
193+
Module::get("auto-clicker")->options.push_back(new Module("Player 1", "auto-clicker-player1", "Should it click for player 1", true));
194+
Module::get("auto-clicker")->options.push_back(new Module("Player 2", "auto-clicker-player2", "Should it click for player 2", true));
195+
as<InputModule*>(Module::get("auto-clicker")->options[0])->allowedChars = "0123456789";
196+
as<InputModule*>(Module::get("auto-clicker")->options[1])->allowedChars = "0123456789";
197197

198-
if (auto hitboxMult = Client::GetModule("hitbox-multiplier"))
198+
if (auto hitboxMult = Module::get("hitbox-multiplier"))
199199
{
200200
hitboxMult->options.push_back(new InputModule("Player", "hitbox-multiplier-player", "1.0"));
201201
hitboxMult->options.push_back(nullptr);
@@ -275,17 +275,17 @@ class ClientUtils
275275

276276
auto tps = new InputModule("Ticks:", "tps-bypass-value", "240");
277277
tps->maxSize = 11;
278-
Client::GetModule("tps-bypass")->options.push_back(tps);
278+
Module::get("tps-bypass")->options.push_back(tps);
279279

280-
Client::GetModule("custom-trans")->options.push_back(new TransCustomizerModule());
281-
Client::GetModule("custom-trans")->optionSizeForce = ccp(350, 180);
282-
//Client::GetModule("custom-trans")->options.push_back(nullptr);
283-
//Client::GetModule("custom-trans")->options.push_back(new InputModule("Time Mod (*)", "transition-time-modifier", "1.0"));
284-
//Client::GetModule("custom-trans")->options.push_back(new ColourModule("Fade Colour:", "transition-fade-colour", ccc3(0, 0, 0)));
280+
Module::get("custom-trans")->options.push_back(new TransCustomizerModule());
281+
Module::get("custom-trans")->optionSizeForce = ccp(350, 180);
282+
//Module::get("custom-trans")->options.push_back(nullptr);
283+
//Module::get("custom-trans")->options.push_back(new InputModule("Time Mod (*)", "transition-time-modifier", "1.0"));
284+
//Module::get("custom-trans")->options.push_back(new ColourModule("Fade Colour:", "transition-fade-colour", ccc3(0, 0, 0)));
285285

286286
auto pitch = new InputModule("Pitch:", "pitch-shifter-value", "1.0");
287287
pitch->maxSize = 6;
288-
Client::GetModule("pitch-shifter")->options.push_back(pitch);
288+
Module::get("pitch-shifter")->options.push_back(pitch);
289289
}
290290

291291
static void SetupCreator()
@@ -398,7 +398,7 @@ class ClientUtils
398398
Client::instance->windows.push_back(cosmetic);
399399

400400

401-
Client::GetModule("no-wave-pulse")->options.push_back(new SliderModule("Pulse Size:", "wave-pulse-size", 0.5f));
401+
Module::get("no-wave-pulse")->options.push_back(new SliderModule("Pulse Size:", "wave-pulse-size", 0.5f));
402402
}
403403

404404
static void SetupIconEffects()
@@ -498,7 +498,7 @@ class ClientUtils
498498

499499
for (auto hack : macInc)
500500
{
501-
auto mod = Client::GetModule(hack);
501+
auto mod = Module::get(hack);
502502

503503
if (mod)
504504
{
@@ -511,65 +511,65 @@ class ClientUtils
511511

512512
#ifdef GEODE_IS_IOS
513513

514-
Client::GetModule("custom-trans")->setIncompatible("This mod does not <cg>yet</c> support <cl>iOS</c>");
514+
Module::get("custom-trans")->setIncompatible("This mod does not <cg>yet</c> support <cl>iOS</c>");
515515

516516
#endif
517517

518518
#ifndef GEODE_IS_WINDOWS
519-
//Client::GetModule("custom-obj-limit")->setIncompatible("This mod only supports <cl>Windows</c> <cg>currently</c>");
519+
//Module::get("custom-obj-limit")->setIncompatible("This mod only supports <cl>Windows</c> <cg>currently</c>");
520520
#endif
521521

522522
#ifndef QOLMOD_AUTOSONG
523-
Client::GetModule("auto-song")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
523+
Module::get("auto-song")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
524524
#endif
525525

526526
#ifndef QOLMOD_NOJUSTDONT
527-
Client::GetModule("just-dont")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
527+
Module::get("just-dont")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
528528
#endif
529529

530530
#ifndef QOLMOD_VERIFYHACK
531-
Client::GetModule("verify-hack")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
531+
Module::get("verify-hack")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
532532
#endif
533533

534534
#ifndef QOLMOD_PULSINGMENU
535-
Client::GetModule("menu-pulse")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
535+
Module::get("menu-pulse")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
536536
#endif
537537

538538
#ifndef NO_ROTATION_BUILD
539-
Client::GetModule("no-rot")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
539+
Module::get("no-rot")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>");
540540
#endif
541541

542542
#ifdef GEODE_IS_WINDOWS
543543

544544
#endif
545545

546-
//Client::GetModule("rand-seed")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.206</c>");
547-
//Client::GetModule("show-trajectory")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.206</c>");
546+
//Module::get("rand-seed")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.206</c>");
547+
//Module::get("show-trajectory")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.206</c>");
548548

549549
#ifdef GEODE_IS_ARM_MAC
550-
Client::GetModule("tps-bypass")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>ARM Mac</c>");
551-
Client::GetModule("editor-wave-trail")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>ARM Mac</c>");
552-
Client::GetModule("editor-extension")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>ARM Mac</c>");
550+
Module::get("tps-bypass")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>ARM Mac</c>");
551+
Module::get("editor-wave-trail")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>ARM Mac</c>");
552+
Module::get("editor-extension")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>ARM Mac</c>");
553553
#endif
554554

555555
#ifdef GEODE_IS_MACOS
556-
Client::GetModule("smart-startpos")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>MacOS</c>");
556+
Module::get("smart-startpos")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>MacOS</c>");
557557
#endif
558558

559559
#ifndef QOLMOD_ALL_MODES_PLATFORMER
560-
Client::GetModule("all-plat")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>.");
560+
Module::get("all-plat")->setIncompatible("This mod has <cr>not yet</c> been ported to <cl>2.2074</c>.");
561561
#endif
562562

563-
Client::GetModule("menu-bg-blur")->setIncompatible("Blur BG is temporarily disabled because i broke it :(.");
563+
Module::get("menu-bg-blur")->setIncompatible("Blur BG is temporarily disabled because i broke it :(.");
564564

565565
if (auto nodeIDs = Loader::get()->getInstalledMod("geode.node-ids"))
566566
{
567567
if (!nodeIDs->isOrWillBeEnabled())
568-
Client::GetModule("unlock-gauntlets")->setIncompatible("This mod requires the <cc>Node IDs</c> mod to be enabled!");
568+
Module::get("unlock-gauntlets")->setIncompatible("This mod requires the <cc>Node IDs</c> mod to be enabled!");
569569
}
570570
else
571571
{
572-
Client::GetModule("unlock-gauntlets")->setIncompatible("This mod requires the <cc>Node IDs</c> mod to be installed!");
572+
Module::get("unlock-gauntlets")->setIncompatible("This mod requires the <cc>Node IDs</c> mod to be installed!");
573573
}
574574
}
575575

src/Client/HitboxesModule.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ class Hitboxes : public Module
3333

3434

3535
this->load();
36+
37+
addToCache();
3638
}
3739
};

0 commit comments

Comments
 (0)