Skip to content

Commit

Permalink
jhgjghgfuhfutyutty
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Aug 6, 2024
1 parent 01ba039 commit 16e412e
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 6 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.5.4

- Fixed Dropdown's not being clickable
- Fixed not being able to search for module options
- Added **Customizable Noclip Tint Colour**
- Added **CPS Counter instant colour fade**
- Added **Customizable Pause Countdown Time**

# 1.5.3

- Fixed Crash pressing Q or E in the editor with startpos switcher enabled
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"geode": "3.4.0",
"version": "v1.5.3",
"version": "v1.5.4",
"gd": {
"win": "2.206",
"android": "2.206",
Expand Down
9 changes: 9 additions & 0 deletions src/Client/AndroidUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,15 @@ void AndroidUI::textChanged(CCTextInputNode* p0)
if (!(module->id.starts_with("anim-speed")))
modules.push_back(module);
}

for (auto option : module->options)
{
if (string::toLower(option->name).find(string::toLower(std::string(p0->getString()))) != std::string::npos)
{
if (!(option->id.starts_with("anim-speed")))
modules.push_back(option);
}
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/Client/ClientSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class ClientUtils

Client::GetModule("noclip")->options.push_back(new Module("Tint on death", "noclip-death-tint", "Tints the screen red when you die in noclip"));
Client::GetModule("noclip")->options.push_back(new SliderModule("Tint Opacity:", "tint-opacity", 0.25f));
Client::GetModule("noclip")->options.push_back(new ColourModule("Tint Colour:", "noclip-tint-colour", ccc3(255, 0, 0)));


Client::GetModule("kill-after")->options.push_back(new InputModule("Percent:", "death-percent", "100"));
Expand All @@ -151,6 +152,11 @@ class ClientUtils
seed->maxSize = 16;
Client::GetModule("rand-seed")->options.push_back(seed);

auto cdownT = new InputModule("Time:", "countdown-time", "3");
cdownT->allowedChars = "1234567890";
cdownT->maxSize = 4;
Client::GetModule("pause-countdown")->options.push_back(cdownT);

Client::GetModule("startpos-switcher")->options.push_back(new SliderModule("Opacity:", "startpos-opacity", 50.0f / 255.0f));

Client::GetModule("custom-respawn-time")->options.push_back(new InputModule("Delay:", "respawn-time-delay", "4.2069"));
Expand Down Expand Up @@ -246,6 +252,8 @@ class ClientUtils
creator->modules.push_back(new Module("Editor Wave Trail", "editor-wave-trail", "Shows the wave trail in the editor"));
creator->modules.push_back(new Module("Smooth Editor Trail", "smooth-editor-trail", "Updates the editor trail at your screen refresh rate instead of 30 fps"));

//creator->modules.push_back(new Module("Editor Extension", "editor-extension", "Editor Extension Help :)"));

//auto misc = new Module("Misc Bypasses", "misc-bypass", "Random <cl>Client Side</c> bypasses / unlocks to random editor limits");
//misc->options.push_back(new Module("Zoom Limit", "zoom-limit", "Bypass the editor zoom limit", true));
//creator->modules.push_back(misc);
Expand Down Expand Up @@ -389,6 +397,7 @@ class ClientUtils
messageOption->maxSize = 48; // its just a bit before it overflows on 16:9, perfect
Client::GetModule("status-message")->options.push_back(messageOption);
Client::GetModule("status-cps")->options.push_back(new Module("Total CPS", "status-cps-total", "Shows the total clicks in the attempt"));
Client::GetModule("status-cps")->options.push_back(new Module("Instant Fade Transition", "status-cps-instant-fade", "Makes the green fade transition when clicking instant"));

#ifdef STATUS_TEXTS
StatusNode::postSetup(replay);
Expand Down
5 changes: 5 additions & 0 deletions src/Client/Dropdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ bool Dropdown::init(CCSize size, std::vector<std::string> strs, cocos2d::SEL_Men
return true;
}

void Dropdown::registerWithTouchDispatcher()
{
CCTouchDispatcher::get()->addTargetedDelegate(this, -512, true);
}

Dropdown* Dropdown::create(CCSize size, std::vector<std::string> strs, cocos2d::SEL_MenuHandler callback, int sel) {
Dropdown* ret = new Dropdown();
if (ret && ret->init(size, strs, callback, sel)) {
Expand Down
1 change: 1 addition & 0 deletions src/Client/Dropdown.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class Dropdown : public CCMenu {
}

void visit();
virtual void registerWithTouchDispatcher();

static Dropdown* create(CCSize size, std::vector<std::string> strs, cocos2d::SEL_MenuHandler callback, int sel = 0);
};
38 changes: 35 additions & 3 deletions src/Client/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ bool Module::touchEndedOrCancelled(CCPoint point, CCTouch* touch, bool cancelled
else
disableHooks();

if (enabled)
enablePatches();
else
disablePatches();

mouseHeldDown = false;
}

Expand Down Expand Up @@ -179,9 +184,16 @@ void Module::addHook(Hook* hook)
}
}

void Module::addPatch(Patch* hook)
void Module::addPatch(Patch* patch)
{
if (patch)
{
patches.push_back(patch);
patch->setAutoEnable(false);

if (!enabled)
patch->disable();
}
}

void Module::disableHooks()
Expand Down Expand Up @@ -216,10 +228,30 @@ void Module::enableHooks()

void Module::disablePatches()
{

for (auto patch : patches)
{
if (patch)
{
auto v = patch->disable();
if (v.has_error())
{
log::error("Error Disabling patch: {}, {}", patch->getAddress(), v.err());
}
}
}
}

void Module::enablePatches()
{

for (auto patch : patches)
{
if (patch)
{
auto v = patch->enable();
if (v.has_error())
{
log::error("Error Enabling patch: {}, {}", patch->getAddress(), v.err());
}
}
}
}
2 changes: 1 addition & 1 deletion src/Client/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Module : public UIComponent
void addHookRaw(Result<Hook*> hook);

void addHook(Hook* hook);
void addPatch(Patch* hook);
void addPatch(Patch* patch);

void disableHooks();
void enableHooks();
Expand Down
2 changes: 2 additions & 0 deletions src/Hacks/Noclip/Noclip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ void NoclipPlayLayer::destroyPlayer(PlayerObject* p0, GameObject* p1)
m_fields->tint->stopAllActions();
m_fields->tint->setOpacity(m_fields->tintOpacity->value * 255);
m_fields->tint->runAction(CCFadeTo::create(0.35f, 0));

m_fields->tint->setColor(as<ColourModule*>(Client::GetModule("noclip")->options[2])->colour);
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions src/Hacks/Pause Countdown/CountdownLayer.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
#include "CountdownLayer.hpp"

CountdownLayer* countdownInstance;

CountdownLayer* CountdownLayer::get()
{
return countdownInstance;
}

bool CountdownLayer::init()
{
if (!CCLayer::init())
return false;

countdownInstance = this;
count = as<InputModule*>(Client::GetModule("pause-countdown")->options[0])->getIntValue();

this->setKeypadEnabled(true);
this->schedule(schedule_selector(CountdownLayer::onDecrement), 1);

Expand Down Expand Up @@ -51,4 +61,9 @@ void CountdownLayer::keyBackClicked()
PlayLayer::get()->pauseGame(false);

this->removeFromParent();
}

CountdownLayer::~CountdownLayer()
{
countdownInstance = nullptr;
}
3 changes: 3 additions & 0 deletions src/Hacks/Pause Countdown/CountdownLayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ class CountdownLayer : public CCLayer
virtual void onCountReachedZero();
virtual void keyBackClicked();

~CountdownLayer();

CREATE_FUNC(CountdownLayer);
static CountdownLayer* get();
};
12 changes: 12 additions & 0 deletions src/Hacks/Pause Countdown/PauseCountdown.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/PauseLayer.hpp>
#include <Geode/modify/UILayer.hpp>
#include "../../Client/Client.h"
#include "CountdownLayer.hpp"

Expand All @@ -17,4 +18,15 @@ class $modify (PauseLayer)
}

QOLMOD_MOD_ALL_HOOKS("pause-countdown")
};

class $modify (UILayer)
{
void onPause(cocos2d::CCObject* sender)
{
if (CountdownLayer::get())
return CountdownLayer::get()->keyBackClicked();

UILayer::onPause(sender);
}
};
6 changes: 5 additions & 1 deletion src/Labels/Labels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@ class $modify (PlayerObject)
if (auto stn = StatusNode::get())
{
stn->sLabels[8]->stopAllActions();
stn->sLabels[8]->runAction(CCTintTo::create(1, 255, 255, 255));

if (Client::GetModuleEnabled("status-cps-instant-fade"))
stn->sLabels[8]->setColor(ccc3(255, 255, 255));
else
stn->sLabels[8]->runAction(CCTintTo::create(1, 255, 255, 255));
}
}
}
Expand Down

0 comments on commit 16e412e

Please sign in to comment.