Skip to content

Commit

Permalink
gg ez
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Aug 14, 2024
1 parent 3e98223 commit fb2a732
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 4 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.5.7

- Fixed Mouse Cursor not disappearing when closing the menu while in a level
- Added a secret if you type ":3" into the vault of secrets
- Added **Force Ghost Trail On and Off**

# 1.5.6

- Fixed Force Platformer not showing platformer UI on mobile
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.6",
"version": "v1.5.7",
"gd": {
"win": "2.206",
"android": "2.206",
Expand Down
30 changes: 29 additions & 1 deletion src/Client/AndroidBall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bool AndroidBall::init()
//l = CCLabelBMFont::create(">_", "bigFont.fnt");
//l->setAnchorPoint(ccp(0.5f, 0.35f));

btnOverlay = CCSprite::create("qolmodButtonOverlay.png"_spr);
btnOverlay = CCSprite::create(isColonThreeEnabled() ? "qolmodButtonOverlaycolonthree.png"_spr : "qolmodButtonOverlay.png"_spr);

btn = CCSprite::create("qolmodButtonBG.png"_spr);
btn->addChildAtPosition(btnOverlay, Anchor::Center);
Expand Down Expand Up @@ -235,6 +235,34 @@ float AndroidBall::clampf(float v, float min, float max)
return v;
}

bool AndroidBall::isColonThreeEnabled()
{
return Mod::get()->getSavedValue<bool>("colon-three-secwet-uwu-:3", false);
}

void AndroidBall::setColonThreeEnabled()
{
Mod::get()->setSavedValue<bool>("colon-three-secwet-uwu-:3", !isColonThreeEnabled());

auto spr = CCSprite::create(isColonThreeEnabled() ? "qolmodButtonOverlaycolonthree.png"_spr : "qolmodButtonOverlay.png"_spr)->getTexture();
btnOverlay->setTexture(spr);

#ifndef GEODE_IS_IOS
auto over = CCClippingNode::create(btn);
over->setAlphaThreshold(0.9f);

auto inner = CCLayerColor::create(ccc4(255, 255, 255, 255));
inner->setAnchorPoint(ccp(0.5f, 0.5f));
inner->setContentSize(ccp(100, 100));
inner->ignoreAnchorPointForPosition(false);
inner->runAction(CCFadeOut::create(1));

over->addChild(inner);

menu->addChild(over);
#endif
}

class $modify (CCScene)
{
int getHighestChildZ()
Expand Down
3 changes: 3 additions & 0 deletions src/Client/AndroidBall.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class AndroidBall : public CCLayer
CREATE_FUNC(AndroidBall);
static AndroidBall* get();

bool isColonThreeEnabled();
void setColonThreeEnabled();

void onOpenMenu();

virtual bool init();
Expand Down
3 changes: 3 additions & 0 deletions src/Client/ClientSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ class ClientUtils
cosmetic->modules.push_back(new Module("Force Trail On", "trail-on", "Forces the trail on"));
cosmetic->modules.push_back(new Module("Force Trail Off", "trail-off", "Forces the trail off"));

cosmetic->modules.push_back(new Module("Force Ghost On", "ghost-on", "Forces the ghost trail on"));
cosmetic->modules.push_back(new Module("Force Ghost Off", "ghost-off", "Forces the ghost trail off"));

cosmetic->modules.push_back(new Module("No Glow", "no-glow", "Disables Object Glow"));
cosmetic->modules.push_back(new Module("No Respawn Blink", "no-blink", "Disables the blinking when the player respawns"));

Expand Down
64 changes: 64 additions & 0 deletions src/ColonThree.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/SecretLayer2.hpp>
#include "Client/AndroidBall.h"
#include <random>

using namespace geode::prelude;

class $modify (SecretLayer2)
{
std::string getColonThreeLabel()
{
if (!AndroidBall::get()->isColonThreeEnabled())
return "No more :3 :(";

std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distr(1, 9);

switch (distr(gen))
{
default:
return "";

case 1:
return ":3-olmod has been enabled :3";
case 2:
return fmt::format("{} the cute one :3", GameManager::get()->m_playerName);
case 3:
return "meow";
case 4:
return "purr";
case 5:
return "mrrow";
case 6:
return ":3";
case 7:
return ";3";
case 8:
return "Ultimate catgirl mode enabled :3";
case 9:
return "you're cute :3";
}
}

void onSubmit(cocos2d::CCObject* sender)
{
bool inp = false;

if (auto input = getChildOfType<CCTextInputNode>(this, 0))
{
if (input->getString() != ":3")
return SecretLayer2::onSubmit(sender);

inp = true;

if (auto ball = AndroidBall::get())
ball->setColonThreeEnabled();
}

SecretLayer2::onSubmit(sender);

updateMessageLabel(getColonThreeLabel());
}
};
19 changes: 19 additions & 0 deletions src/Hacks/ForceGhost.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/PlayerObject.hpp>
#include "../Client/Client.h"

using namespace geode::prelude;

class $modify (PlayerObject)
{
void toggleGhostEffect(GhostType p0)
{
if (Client::GetModuleEnabled("ghost-on"))
p0 = GhostType::Enabled;

if (Client::GetModuleEnabled("ghost-off"))
p0 = GhostType::Disabled;

PlayerObject::toggleGhostEffect(p0);
}
};
4 changes: 3 additions & 1 deletion src/Hacks/Patches/EditorExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ using namespace geode::prelude;
std::vector<geode::Patch*> patches = {};
#ifdef GEODE_IS_WINDOWS
//patches.push_back(createPatchSafe(reinterpret_cast<void*>(geode::base::get() + 0x5ed33c), { 0x1, 0x0, 0x0, 0x0 }));
#endif
#ifdef GEODE_IS_ANDROID32
patches.push_back(createPatchSafe(reinterpret_cast<void*>(geode::base::get() + 0x5ed33c), { 0x1, 0x0, 0x0, 0x0 }));
#endif
Loader::get()->queueInMainThread([patches]{
Expand Down
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class $modify (CCKeyboardDispatcher)
return CCKeyboardDispatcher::dispatchKeyboardMSG(key, down, idk);

if (!getChildOfType<LoadingLayer>(CCScene::get(), 0) && !getChildOfType<RecordKeyPopup>(CCScene::get(), 0))
{
{
bool v = false;

std::vector<int> btns = { enumKeyCodes::KEY_Tab, enumKeyCodes::KEY_Insert };
Expand All @@ -49,6 +49,9 @@ class $modify (CCKeyboardDispatcher)
if (auto ui = getChildOfType<AndroidUI>(CCScene::get(), 0))
{
ui->onClose(nullptr);

if (PlayLayer::get() && !PlayLayer::get()->m_isPaused && !GameManager::sharedState()->getGameVariable("0024"))
PlatformToolbox::hideCursor();
}
else
{
Expand Down

0 comments on commit fb2a732

Please sign in to comment.