Skip to content

Commit

Permalink
l
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Aug 15, 2024
1 parent 10a4213 commit 6be51a6
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 17 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.9

- Added **Gold User Coins**
- Added **No Ship Fire**
- Added **24 Hour Time** for clock label

# 1.5.8

- Fixed not being able to use checkpoints in platformer with all modes platformer enabled
Expand Down
5 changes: 5 additions & 0 deletions src/Client/ClientSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ class ClientUtils
cosmetic->modules.push_back(new Module("Longer Trail", "longer-trail", "Lengthens your player's trail length by a factor of 3x"));
cosmetic->modules.push_back(new Module("No Dash Fire", "no-dash-fire", "Hides the fire behind your icon when using a dash orb"));

cosmetic->modules.push_back(new Module("Gold User Coins", "gold-user-coins", "Makes user coins appear as if they are gold robtop coins"));
cosmetic->modules.push_back(new Module("No Ship Fire", "no-ship-fire", "Hides the fire behind the ship while it's flying"));


//cosmetic->modules.push_back(new Module("No Camera Movement", "no-camera", "Disables camera movements that are made with <cl>triggers</c>"));
//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 Expand Up @@ -405,6 +408,8 @@ class ClientUtils
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"));

Client::GetModule("status-clock")->options.push_back(new Module("24 Hour Time", "status-clock-24h-time", "Uses 24 hour time instead of 12 hour time"));

#ifdef STATUS_TEXTS
StatusNode::postSetup(replay);
#endif
Expand Down
56 changes: 56 additions & 0 deletions src/Hacks/GoldUserCoins.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/CCSpriteFrameCache.hpp>
#include <Geode/modify/EnhancedGameObject.hpp>
#include <Geode/modify/GJBaseGameLayer.hpp>
#include "../Client/Client.h"

using namespace geode::prelude;

class $modify (CCSpriteFrameCache)
{
CCSpriteFrame* spriteFrameByName(const char *pszName)
{
if (std::string(pszName).starts_with("secretCoin_2"))
pszName = utils::string::replace(std::string(pszName), "_2", "").c_str();

return CCSpriteFrameCache::spriteFrameByName(pszName);
}

QOLMOD_MOD_ALL_HOOKS("gold-user-coins")
};

bool is;
int objID;

class $modify (GJBaseGameLayer)
{
bool hasUniqueCoin(EffectGameObject* p0)
{
auto v = GJBaseGameLayer::hasUniqueCoin(p0);

if (is)
p0->m_objectID = 142;

return v;
}

QOLMOD_MOD_ALL_HOOKS("gold-user-coins")
};

class $modify (EnhancedGameObject)
{
void updateUserCoin()
{
objID = m_objectID;
is = true;

EnhancedGameObject::updateUserCoin();

this->setColor(ccc3(255, 255, 255));

is = false;
m_objectID = objID;
}

QOLMOD_MOD_ALL_HOOKS("gold-user-coins")
};
16 changes: 1 addition & 15 deletions src/Hacks/LongerTrail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,9 @@ using namespace geode::prelude;

class $modify (CCMotionStreak)
{
struct Fields
{
int update = 3;
};

virtual void update(float delta)
{
if (m_fields->update != 3)
{
m_fields->update++;
return;
}
else
{
m_fields->update = 0;
CCMotionStreak::update(delta);
}
CCMotionStreak::update(delta / 3);
}

QOLMOD_MOD_HOOK("longer-trail", "cocos2d::CCMotionStreak::update")
Expand Down
18 changes: 18 additions & 0 deletions src/Hacks/NoShipFire.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/PlayerObject.hpp>
#include "../Client/Client.h"

using namespace geode::prelude;

class $modify (PlayerObject)
{
virtual void update(float dt)
{
PlayerObject::update(dt);

if (m_shipStreak)
m_shipStreak->setVisible(false);
}

QOLMOD_MOD_ALL_HOOKS("no-ship-fire")
};
6 changes: 4 additions & 2 deletions src/Labels/Labels.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ class StatusNode : public CCNode
// Create a string stream to format the time
std::ostringstream oss;

// Format time as HH:MM:SS AM/PM
oss << std::put_time(localTime, "%I:%M:%S %p");
if (Client::GetModuleEnabled("status-clock-24h-time"))
oss << std::put_time(localTime, "%H:%M:%S");
else
oss << std::put_time(localTime, "%I:%M:%S %p");

// Return the formatted time as a string
return oss.str();
Expand Down

0 comments on commit 6be51a6

Please sign in to comment.