Skip to content

Commit

Permalink
safe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Jan 24, 2024
1 parent 400e1f8 commit 5c6b3c4
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/Client/ClientSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ class ClientUtils
bypass->modules.push_back(new Module("Practice Music Sync", "practice-bypass", "Unlocks the Practice Music Sync button in the pause menu options"));
bypass->modules.push_back(new Module("Unlock All Icons", "icon-bypass", "It... Unlocks all the icons, You should know what this does"));
bypass->modules.push_back(new Module("Music Unlocker", "music-bypass", "Unlocks the menu and practice music buttons"));
bypass->modules.push_back(new Module("Copy any level", "copy-hack", "Allows you to copy any level from the servers\nCode by Firee"));
bypass->modules.push_back(new Module("No Copy Mark", "noc-hack", "Hides the (c) mark from your levels on publish.\nCode by Firee"));
bypass->modules.push_back(new Module("Copy any level", "copy-hack", "Allows you to copy any level from the servers\nCode by <co>Firee</c>"));
bypass->modules.push_back(new Module("No Copy Mark", "noc-hack", "Hides the (c) mark from your levels on publish.\nCode by <co>Firee</c>"));
bypass->modules.push_back(new Module("Safe mode", "safe-mode", "Disables all progress on levels"));
bypass->modules.push_back(new Module("Auto Safe mode", "auto-safe-mode", "Automatically enables safe mode if you have cheats enabled"));
//bypass->modules.push_back(new Module("Slider Limit Bypass", "slider-limit", "Allows sliders to go beyond the limit of the slider"));
bypass->modules.push_back(new Module("Auto Safe mode", "auto-safe-mode", "Automatically enables safe mode if you have cheats enabled", true));
bypass->modules.push_back(new Module("Slider Limit Bypass", "slider-limit", "Allows sliders to go beyond the limit of the slider"));
bypass->modules.push_back(new Module("Fire in the hole!", "fire-in-the-hole", "Replaces every single sfx with\n<cr>FIRE IN THE HOLE!</c>"));


Expand All @@ -86,7 +86,7 @@ class ClientUtils
cosmetic->windowPos = ImVec2(50 + (50 + (Client::instance->tileSize.x)) * 3, 50);

//cosmetic->modules.push_back(new Module("Hide Endscreen BTN", "end-screen", "Adds an arrow to hide the end screen"));
//cosmetic->modules.push_back(new Module("No Transition", "no-trans", "Disables the fade scene transitions"));
cosmetic->modules.push_back(new Module("No Transition", "no-trans", "Disables the fade scene transitions"));
cosmetic->modules.push_back(new Module("No Player Rotation", "no-rot", "Disables rotation on players"));
//cosmetic->modules.push_back(new Module("No Player Rotation", "no-plr-rot", "Disables Player Rotation :3\nIt looks ugly imo but you do you"));

Expand Down
2 changes: 1 addition & 1 deletion src/Hacks/InstantComplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class $modify (GJBaseGameLayer)
{
if (!m_fields->fix)
{
PlayLayer::get()->playPlatformerEndAnimationToPos(ccp(0, 0), false);
PlayLayer::get()->playPlatformerEndAnimationToPos(ccp(2, 2), false);
m_fields->fix = true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Hacks/NoRotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using namespace geode::prelude;

/*class $modify (PlayerObject)
class $modify (PlayerObject)
{
void setRotation(float r)
{
Expand All @@ -14,7 +14,7 @@ using namespace geode::prelude;
else
PlayerObject::setRotation(r);
}
};*/
};

/*
class $modify (CCNode)
Expand Down
33 changes: 33 additions & 0 deletions src/Hacks/SafeMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,38 @@
#include <Geode/modify/PlayLayer.hpp>
#include "../Client/Client.h"

void updateSafemode()
{
if (!Client::GetModuleEnabled("auto-safe-mode"))
return;

std::vector<std::string> names = {
"speedhack-enabled",
"force-plat",
"noclip",
"instant"
};

bool a = false;

for (size_t i = 0; i < names.size(); i++)
{
if (Client::GetModuleEnabled(names[i]))
{
a = true;

break;
}
}

Client::GetModule("safe-mode")->enabled = a;
}

class $modify (PlayLayer)
{
TodoReturn levelComplete() {
updateSafemode();

if (!Client::GetModuleEnabled("safe-mode"))
{
PlayLayer::levelComplete();
Expand All @@ -17,13 +46,17 @@ class $modify (PlayLayer)
}

void showNewBest(bool p0, int p1, int p2, bool p3, bool p4, bool p5) {
updateSafemode();

if (!Client::GetModuleEnabled("safe-mode"))
return PlayLayer::showNewBest(p0, p1, p2, p3, p4, p5);
}
};

class $modify(GJGameLevel) {
void savePercentage(int p0, bool p1, int p2, int p3, bool p4) {
updateSafemode();

if (!Client::GetModuleEnabled("safe-mode"))
GJGameLevel::savePercentage(p0, p1, p2, p3, p4);
}
Expand Down
5 changes: 4 additions & 1 deletion src/Hacks/SliderLimit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ class $modify (SliderTouchLogic)
{
virtual void ccTouchMoved(cocos2d::CCTouch* p0, cocos2d::CCEvent* p1)
{
if (!Client::GetModuleEnabled("slider-limit"))
if (!Client::GetModuleEnabled("slider-limit"))
{
SliderTouchLogic::ccTouchMoved(p0, p1);
return;
}

float w = 100;
float x = (this->convertTouchToNodeSpace(p0).x + 100) / 2;
Expand Down
4 changes: 2 additions & 2 deletions src/Hacks/TransitionTimeCustomiser.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*#include <Geode/Geode.hpp>
#include <Geode/Geode.hpp>
#include <Geode/cocos/layers_scenes_transitions_nodes/CCTransition.h>
#include <Geode/modify/CCTransitionFade.hpp>
#include "../Client/Client.h"
Expand All @@ -18,4 +18,4 @@ class $modify (cocos2d::CCTransitionFade)

return CCTransitionFade::create(duration * mod, scene);
}
};*/
};

0 comments on commit 5c6b3c4

Please sign in to comment.