Skip to content

Commit

Permalink
28
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Sep 18, 2024
1 parent 00eabe3 commit e589adc
Show file tree
Hide file tree
Showing 18 changed files with 204 additions and 45 deletions.
3 changes: 1 addition & 2 deletions data/mods.list.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"version": "v2.7.0-list1",
"version": "v2.8.0-list1",
"list": [

"https://github.com/MathieuAR-GDPSFH/Gauntlets-Position-Fix/releases/latest/download/jecket.gauntlets_position_fix.geode",

"https://github.com/user95401/UnpublishedMods/releases/latest/download/user95401.unpublished_mods.geode",
"https://github.com/Alphalaneous/HappyTextures/releases/latest/download/alphalaneous.happy_textures.geode",
"https://github.com/geode-sdk/textureldr/releases/latest/download/geode.texture-loader.geode",
"https://github.com/geode-sdk/NodeIDs/releases/latest/download/geode.node-ids.geode",
Expand Down
Binary file modified data/mods/user95401.mainlevelseditor.geode
Binary file not shown.
39 changes: 38 additions & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"id": "user95401.gemetry_trash",
"name": "Gemetry Trash",
"version": "v2.7.0",
"version": "v2.8.0",
"developer": "user95401",
"description": "",
"early-load": true,
Expand Down Expand Up @@ -41,6 +41,10 @@
]
},
"settings": {
"Buttons": {
"type": "title",
"name": "Buttons"
},
"No Button Anim": {
"name": "No Button Anim",
"description": "remove effect when btn get activated",
Expand All @@ -59,6 +63,10 @@
"type": "bool",
"default": false
},
"Main Menu": {
"type": "title",
"name": "Main Menu"
},
"No Menu Game BG Pulse": {
"name": "No Menu Game BG Pulse",
"description": "No Menu Game BG Pulse",
Expand All @@ -76,6 +84,35 @@
"description": "remove new explode effect for players in main menu",
"type": "bool",
"default": false
},
"Add Objects in Menu Game": {
"name": "Add Objects in Menu Game",
"description": "spikes and pad....",
"type": "bool",
"default": true
},
"No Platformer in Menu Game": {
"name": "No Platformer in Menu Game",
"description": "no....",
"type": "bool",
"default": false
},
"Random Shit": {
"type": "title",
"name": "Random Shit"
},
"Add Cursor Particles": {
"name": "Add Cursor Particles",
"description": "Add Cursor Particles....",
"type": "bool",
"default": true,
"requires-restart": true
},
"Break Player Rotations At Plat": {
"name": "Break Player Rotations At Plat.",
"description": "asd....",
"type": "bool",
"default": true
}
}
}
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/sprites/dialogIcons/dialogIcon_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/sprites/dialogIcons/dialogIcon_017.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/sprites/dialogIcons/dialogIcon_018.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
14 changes: 10 additions & 4 deletions src/_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,33 @@ class mouse_particle : public CCParticleSystemQuad {
public:
static inline bool created = false;
static inline Ref<CCParticleSystemQuad> shared_ref;
static inline Ref<CCMoveTo> moveactref = CCMoveTo::create(0.001f, { -10, -10 });
static void create() {
if (created) return;
created = true;
shared_ref = Ref<CCParticleSystemQuad>(GameToolbox::particleFromString(
"200a-1a0.54a0.94a-1a90a180a0a20a1a1a0a0a0a0a0a0a1a2a0a0a0.211765a0.1a0.207843a0.1a0.207843a0.1a1a0a0a0a0a0a0a0a0a0a0a0a1a0a0a0a0a0a0a0a10a0a0a0a1a1a1a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0"
, CCParticleSystemQuad::create(), 0));
shared_ref->setID("mouse_particle"_spr);
shared_ref->_setZOrder(INT_MAX);
shared_ref->schedule(schedule_selector(mouse_particle::sch));
SceneManager::get()->keepAcrossScenes(shared_ref);
}
void sch(float) {
shared_ref->runAction(CCRepeatForever::create(CCMoveTo::create(0.000f, getMousePos())));
moveactref->initWithDuration(moveactref->getDuration(), getMousePos());
shared_ref->runAction(moveactref);
auto hide = false;
if (auto game = GameManager::get()->m_gameLayer) hide = game->isRunning();
auto order = getChild(shared_ref->getParent(), -1)->getZOrder();
if (auto game = GameManager::get()->m_gameLayer) {
hide = game->isRunning();
order = 0;
}
hide ? shared_ref->stopSystem() : shared_ref->resumeSystem();
shared_ref->setZOrder(order);
}
#include <Geode/modify/CCScene.hpp>
class $modify(MouseParticleExt, MenuLayer) {
$override bool init() {
mouse_particle::create();
if (SETTING(bool, "Add Cursor Particles")) mouse_particle::create();
return MenuLayer::init();
}
};
Expand Down
19 changes: 17 additions & 2 deletions src/_main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace geode::cocos {
}
inline auto findDataNode(CCNode* parent, std::string id) {
auto node = typeinfo_cast<CCLabelBMFont*>(parent->getChildByIDRecursive(id));
if (node) log::warn("FAILED TO FIND DATA NODE! id: {}", id);
if (!node) log::warn("FAILED TO FIND DATA NODE! id: {}", id);
return node;
}
};
Expand Down Expand Up @@ -101,6 +101,19 @@ namespace geode::utils {
static std::mt19937 gen(rd());
return select_randomly(start, end, gen);
}
bool rndb(int variants = 2) {
auto varsVec = std::vector<bool>();
auto tempb = true;
auto tempvariants = variants;
while (tempvariants > 0) {
tempb = !tempb;
tempvariants = tempvariants - 1;
varsVec.push_back(tempb);
}
auto rtn = *select_randomly(varsVec.begin(), varsVec.end());
//log::debug("{}({}) = {} of {}", __func__, variants, rtn, varsVec);
return rtn;
}
};

#ifdef GEODE_IS_ANDROID
Expand All @@ -126,4 +139,6 @@ inline auto raw_content_repo_lnk = std::string("https://raw.githubusercontent.co
#include "random_shit/gtasamap.hpp"
#include "random_shit/menulayerruinify.hpp"
#include "random_shit/menuitems.hpp"
#include "random_shit/loadinglayer.hpp"
#include "random_shit/loadinglayer.hpp"
#include "random_shit/secondfloor.hpp"
#include "random_shit/breakplatshiprot.hpp"
2 changes: 2 additions & 0 deletions src/links.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class $modify(CCHttpClientLinksReplace, CCHttpClient) {
}
};

/*
inline web::WebTask web_send_replace(web::WebRequest* __this, std::string_view method, std::string_view url) {
auto newUrl = std::string(url.data());
if (not server.empty()) newUrl = std::regex_replace(
Expand All @@ -103,6 +104,7 @@ inline web::WebTask web_send_replace(web::WebRequest* __this, std::string_view m
if (hook.has_error()) log::error("hook failed: {}", hook.error_or("no error..."));
if (hook.has_value()) log::debug("{}", hook.value()->getRuntimeInfo().dump(4));
};
*/

//url open

Expand Down
16 changes: 16 additions & 0 deletions src/random_shit/breakplatshiprot.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <Geode/Geode.hpp>
#include <Geode/ui/GeodeUI.hpp>
using namespace geode::prelude;

#include <Geode/modify/PlayerObject.hpp>
class $modify(breakplatshiprot, PlayerObject) {
$override void updateRotation(float p0) {
if (SETTING(bool, "Break Player Rotations At Plat")) if (m_isPlatformer) {
m_isPlatformer = 0;
PlayerObject::updateRotation(p0);
m_isPlatformer = 1;
return;
};
PlayerObject::updateRotation(p0);
}
};
149 changes: 113 additions & 36 deletions src/random_shit/menulayerruinify.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,30 @@ class $modify(MenuGameLayerExt, MenuGameLayer) {
pulsebg->setColor({0,0,0});
m_groundLayer->addChild(pulsebg, 10);

if (SETTING(bool, "Add Objects in Menu Game")) {

auto spike1 = GameObject::createWithKey(39);
spike1->setID("spike1");
spike1->setStartPos({ 462, 96 });
this->addChild(spike1);

auto spike2 = GameObject::createWithKey(8);
spike2->setID("spike2");
spike2->setStartPos({ 491, 105 });
this->addChild(spike2);

auto bump = typeinfo_cast<EffectGameObject*>(GameObject::createWithKey(35));
bump->setID("bump");
bump->createAndAddParticle(1, "bumpEffect.plist", 1, kCCPositionTypeGrouped);
bump->setStartPos({ 426, 92 });
this->addChild(bump);
}

return init_result;
}
$override void update(float p0) {
MenuGameLayer::update(p0);

//pulse
if (SETTING(bool, "No Menu Game BG Pulse")) void();
else {
Expand All @@ -29,10 +49,65 @@ class $modify(MenuGameLayerExt, MenuGameLayer) {
pulsebg->setColor(darken3B(this->m_backgroundSprite->getColor(), 255 - pulse * 60.f));
}
}

if (SETTING(bool, "Add Objects in Menu Game")) {
auto plr = this->m_playerObject;
auto spike1 = typeinfo_cast<GameObject*>(this->getChildByID("spike1"));
auto spike2 = typeinfo_cast<GameObject*>(this->getChildByID("spike2"));
auto bump = typeinfo_cast<EffectGameObject*>(this->getChildByID("bump"));
if (spike1 and spike2 and bump) {
auto plrRect = plr->getObjectRect();
auto spike1Rect = spike1->getObjectRect();
auto spike2Rect = spike2->getObjectRect();
auto bumpRect = bump->getObjectRect();
if (spike1Rect.intersectsRect(plrRect) or spike2Rect.intersectsRect(plrRect)) {
int total = GameStatsManager::sharedState()->getStat("9");
GameStatsManager::sharedState()->setStat("9", total - 1);
auto counter_ignore_next = CCNode::create();
counter_ignore_next->setID("counter_ignore_next");
this->addChild(counter_ignore_next);
this->destroyPlayer();
this->removeChildByID("counter_ignore_next");
}
if (bumpRect.intersectsRect(plrRect)) {
plr->bumpPlayer(1.0, 1, 1, bump);
bump->playShineEffect();
}
};
};

if (SETTING(bool, "No Platformer in Menu Game")) void();
else {
m_backgroundSpeed = 0.1;
findFirstChildRecursive<CCNode>(m_groundLayer,
[](CCNode* node) {
auto parent_id = node->getParent()->getID();
auto __this_id = node->getID();
if (string::contains(parent_id, "ground-sprites")) {
//node->stopAllActions();
node->setPosition(CCPointZero);
}

return false;
}
);
};
}
$override void tryJump(float p0) {
MenuGameLayer::tryJump(p0);
cocos::findFirstChildRecursive<CCSprite>(this->m_playerObject,
auto plr = this->m_playerObject;
if (SETTING(bool, "No Platformer in Menu Game")) void();
else {
plr->m_isPlatformer = 1;
//random l/r going
if (rndb()) plr->m_holdingLeft = rndb();
else plr->m_holdingRight = rndb();
//dont go left a lot
plr->m_holdingLeft = plr->getPosition().x < 5 ? false : plr->m_holdingLeft;
plr->m_holdingRight = plr->getPosition().x < 5 ? true : plr->m_holdingRight;//go back to screen!
}
//penis
cocos::findFirstChildRecursive<CCSprite>(plr,
[this](CCSprite* node) {
node->setOpacity(255);
return false;
Expand All @@ -45,42 +120,44 @@ class $modify(MenuGameLayerExt, MenuGameLayer) {
MenuGameLayer::destroyPlayer();
if (SETTING(bool, "No Players Destroyed Counter")) void();
else {
auto counter_layer = typeinfo_cast<CCLayer*>(this->getChildByIDRecursive(
"counter_layer"
));
auto counter_label = typeinfo_cast<CCLabelBMFont*>(this->getChildByIDRecursive(
"counter_label"
));
if (not counter_layer) {
counter_layer = CCLayer::create();
counter_layer->setAnchorPoint(CCPointZero);
counter_layer->setID("counter_layer");
this->addChild(counter_layer);
counter_label = CCLabelBMFont::create("", "gjFont51.fnt");
counter_label->setID("counter_label");
counter_label->setAlignment(kCCTextAlignmentRight);
counter_label->setAnchorPoint({ 1.f,0.f });
counter_label->setScale(0.3f);
counter_label->setTag(0);
counter_layer->addChildAtPosition(
counter_label, Anchor::BottomRight, { -10.f, 100.f }
);
if (not this->getChildByID("counter_ignore_next")) {
auto counter_layer = typeinfo_cast<CCLayer*>(this->getChildByIDRecursive(
"counter_layer"
));
auto counter_label = typeinfo_cast<CCLabelBMFont*>(this->getChildByIDRecursive(
"counter_label"
));
if (not counter_layer) {
counter_layer = CCLayer::create();
counter_layer->setAnchorPoint(CCPointZero);
counter_layer->setID("counter_layer");
this->addChild(counter_layer);
counter_label = CCLabelBMFont::create("", "gjFont51.fnt");
counter_label->setID("counter_label");
counter_label->setAlignment(kCCTextAlignmentRight);
counter_label->setAnchorPoint({ 1.f,0.f });
counter_label->setScale(0.3f);
counter_label->setTag(0);
counter_layer->addChildAtPosition(
counter_label, Anchor::BottomRight, { -10.f, 100.f }
);
}
counter_label->setTag(1 + counter_label->getTag());
int total = GameStatsManager::sharedState()->getStat("9");
int now = counter_label->getTag();
counter_label->setString(fmt::format(
"Players Destroyed:\nTotally {}\nNow {}",
total, now
).data());
counter_label->stopAllActions();
counter_label->runAction(CCEaseExponentialIn::create(
CCFadeOut::create(15.f)
));
counter_label->setScale(0.36f);
counter_label->runAction(CCEaseBackOut::create(
CCScaleTo::create(0.25f, 0.3f)
));
}
counter_label->setTag(1 + counter_label->getTag());
int total = GameStatsManager::sharedState()->getStat("9");
int now = counter_label->getTag();
counter_label->setString(fmt::format(
"Players Destroyed:\nTotally {}\nNow {}",
total, now
).data());
counter_label->stopAllActions();
counter_label->runAction(CCEaseExponentialIn::create(
CCFadeOut::create(15.f)
));
counter_label->setScale(0.36f);
counter_label->runAction(CCEaseBackOut::create(
CCScaleTo::create(0.25f, 0.3f)
));
}
}
};
Expand Down
7 changes: 7 additions & 0 deletions support.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ trending icon
play sounds
```

#### waxai
```
bug reports
songs
textures
```

## Reported Bugs:
pio99, waxai

0 comments on commit e589adc

Please sign in to comment.