Skip to content

Commit

Permalink
2 11
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Oct 5, 2024
1 parent 61a5ac4 commit a9a7a1e
Show file tree
Hide file tree
Showing 39 changed files with 309 additions and 23 deletions.
3 changes: 2 additions & 1 deletion data/mods.list.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.10.1-list1",
"version": "v2.11.0-list1",
"list": [

"https://github.com/MathieuAR-GDPSFH/Gauntlets-Position-Fix/releases/latest/download/jecket.gauntlets_position_fix.geode",
Expand All @@ -13,6 +13,7 @@
"https://github.com/Capeling/Hide-Main-Menu-UI/releases/latest/download/capeling.hide_main_menu_ui.geode",
"https://github.com/cgytrus/SmoothParticles/releases/latest/download/cgytrus.smooth-particles.geode",

"https://api.geode-sdk.org/v1/mods/hiimjustin000.more_icons/versions/latest/download",
"https://github.com/user95401/GemetryTrash/releases/latest/download/user95401.gemetry_trash.geode",
"https://raw.githubusercontent.com/user95401/GemetryTrash/main/data/mods/user95401.mainlevelseditor.geode"

Expand Down
Binary file modified data/mods/user95401.mainlevelseditor.geode
Binary file not shown.
20 changes: 19 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.10.1",
"version": "v2.11.0",
"developer": "user95401",
"description": "",
"early-load": true,
Expand Down Expand Up @@ -159,6 +159,24 @@
"description": "Update Scene Scale By Screen View.",
"type": "bool",
"default": true
},
"Editor Cave Sounds": {
"name": "Editor Cave Sounds",
"description": "Editor Cave Sounds.",
"type": "bool",
"default": true
},
"Show Random Meme After Loading": {
"name": "Show Random Meme After Loading",
"description": "Show Random Meme After Loading.",
"type": "bool",
"default": true
},
"soggy cat?": {
"name": "soggy cat?",
"description": "soggy cat???",
"type": "bool",
"default": true
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added resources/sounds/SogLoop.mp3
Binary file not shown.
Binary file added resources/sounds/cave/cave1.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave10.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave11.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave12.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave13.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave2.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave3.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave4.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave5.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave6.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave7.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave8.ogg
Binary file not shown.
Binary file added resources/sounds/cave/cave9.ogg
Binary file not shown.
Binary file added resources/sounds/grunt01.ogg
Binary file not shown.
Binary file added resources/sounds/grunt02.ogg
Binary file not shown.
Binary file added resources/sounds/grunt03.ogg
Binary file not shown.
Binary file not shown.
Binary file added resources/sprites/Screenshot_64.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 removed resources/sprites/island_2.png~
Binary file not shown.
Binary file removed resources/sprites/island_3.png~
Binary file not shown.
Binary file removed resources/sprites/island_4.png~
Binary file not shown.
Binary file removed resources/sprites/island_5.png~
Binary file not shown.
54 changes: 50 additions & 4 deletions src/_main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,54 @@ namespace geode::utils {
}
};

struct GJScoreKey {
inline static auto TotalJumps = "1";
inline static auto TotalAttempts = "2";
inline static auto CompletedLevels = "3";
inline static auto CompletedOnlineLevels = "4";
inline static auto Demons = "5";
inline static auto Stars = "6";
inline static auto CompletedMapPacksCount = "7";
inline static auto GoldCoins = "8";
inline static auto PlayersDestroyed = "9";
inline static auto LikedLevelsCount = "10";
inline static auto RatedLevelsCount = "11";
inline static auto UserCoins = "12";
inline static auto Diamonds = "13";
inline static auto CurrentOrbs = "14";
inline static auto DailyCompletionCount = "15";
inline static auto FireShards = "16";
inline static auto IceShards = "17";
inline static auto PoisonShards = "18";
inline static auto ShadowShards = "19";
inline static auto LavaShards = "20";
inline static auto DemonKeys = "21";
inline static auto TotalOrbs = "22";
inline static auto EarthShards = "23";
inline static auto BloodShards = "24";
inline static auto MetalShards = "25";
inline static auto LightShards = "26";
inline static auto SoulShards = "27";
inline static auto Moons = "28";
inline static auto DiamondShards = "29";
inline static auto FirePathStarProgress = "30";
inline static auto IcePathStarProgress = "31";
inline static auto PoisonPathStarProgress = "32";
inline static auto ShadowPathStarProgress = "33";
inline static auto LavaPathStarProgress = "34";
inline static auto EarthPathStarProgress = "35";
inline static auto BloodPathStarProgress = "36";
inline static auto MetalPathStarProgress = "37";
inline static auto LightPathStarProgress = "38";
inline static auto SoulPathStarProgress = "39";
inline static auto CompletedGauntlets = "40";
inline static auto ListRewardsCollected = "41";
};

#ifdef GEODE_IS_ANDROID
#define debug error
#endif // GEODE_IS_ANDROID


inline auto repo = std::string("user95401/GemetryTrash");
inline auto repobranch = std::string("user95401/GemetryTrash/main");
inline auto repo_lnk = std::string("https://github.com/" + repo);
Expand All @@ -136,12 +179,15 @@ inline auto raw_content_repo_lnk = std::string("https://raw.githubusercontent.co
#include "special_sprites.hpp"
#include "hackpro.hpp"
#include "globed.hpp"
#include "random_shit/event_level.hpp"
#include "random_shit/LocalGameModes.hpp"
#include "random_shit/PopupRandomMeme.hpp"
#include "random_shit/EditorCaveSounds.hpp"
#include "random_shit/ShopkepperEyebrow.hpp"
#include "random_shit/SoggyPop.hpp"
#include "random_shit/event_level.hpp"
#include "random_shit/gtasa_map.hpp"
#include "random_shit/menulayer_ruinify.hpp"
#include "random_shit/menuitems.hpp"
#include "random_shit/loadinglayer_ruinify.hpp"
#include "random_shit/second_floor.hpp"
#include "random_shit/game_ruinify.hpp"
#include "random_shit/LocalGameModes.hpp"
#include "random_shit/game_ruinify.hpp"
24 changes: 24 additions & 0 deletions src/random_shit/EditorCaveSounds.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once
#include <_main.hpp>

#include <Geode/modify/CCScene.hpp>
class $modify(EditorCaveSounds, CCScene) {
void random(float) {
if (auto editor = GameManager::get()->m_levelEditorLayer) {
if (editor->isRunning()) {
srand(time(0));
if ((rand() % 100 < 38)) {
auto sound_name = fmt::format("cave{}.ogg", rand() % 14);
FMODAudioEngine::get()->playEffect(sound_name);
}
}
}
};
$override static CCScene* create(void) {
auto __this = CCScene::create();
if (SETTING(bool, "Editor Cave Sounds")) {
__this->schedule(schedule_selector(EditorCaveSounds::random), 12.f);
};
return __this;
}
};
99 changes: 82 additions & 17 deletions src/random_shit/LocalGameModes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,19 @@ class IslandsLayer : public CCLayer {
};

#include <Geode/modify/GJBaseGameLayer.hpp>
class $modify(GJBaseGameLayerInfinityMode, GJBaseGameLayer) {
class $modify(InfinityMode, GJBaseGameLayer) {
inline static int current_deaths = 0;
inline static int current_amo_for_reward = 0;
inline static int next_amount_for_reward = 12;
inline static int next_amount_for_reward = 5;
inline static int mltp_amount_for_reward = 1;
static void open() {
InfinityMode::current_deaths = 0;
auto level = GameLevelManager::get()->getMainLevel(1337, false);
cocos2d::CCDirector::get()->replaceScene(
cocos2d::CCTransitionFade::create(0.5f, PlayLayer::scene(level, false, false))
);
GameManager::get()->m_playLayer->addChild(createDataNode("INFINITY_MODE_MARK"));
}
bool ENABLED() {
return nullptr != this->getChildByIDRecursive("INFINITY_MODE_MARK");
}
Expand All @@ -75,47 +84,96 @@ class $modify(GJBaseGameLayerInfinityMode, GJBaseGameLayer) {
//log::debug("{}->{}({}, {}, {}, {}, {})", this, __func__, p0, p1, p2, p3, p4, p5);
if (p0 == 21) {
if (current_amo_for_reward == next_amount_for_reward) {
auto orbs = 8;
auto moons = 2;
auto diamonds = 4;

auto stats = GameStatsManager::sharedState();
stats->incrementStat(GJScoreKey::TotalOrbs, orbs);
stats->incrementStat(GJScoreKey::Moons, moons);
stats->incrementStat(GJScoreKey::Diamonds, diamonds);

auto rwdl = CurrencyRewardLayer::create(
4, 0, 1, 2,
orbs, 0, moons, diamonds,
CurrencySpriteType::Icon, 0,
CurrencySpriteType::Icon, 0,
m_player1->convertToWorldSpace(m_player1->getPosition()),
(CurrencyRewardType)0,
1.f, 1.f
);
this->addChild(rwdl);

std::vector<std::string> aaa = {
"buyItem01.ogg", "buyItem03.ogg", "gold01.ogg", "gold02.ogg", "highscoreGet02.ogg"
};
FMODAudioEngine::get()->playEffect(*select_randomly(aaa.begin(), aaa.end()));
FMODAudioEngine::get()->playEffect("achievement_01.ogg");

current_amo_for_reward = 0;
}
else {
++current_amo_for_reward;
}
}
Notification* plr_ntfy = nullptr;
auto obj = [](int key) {
auto rtn = GameObject::createWithKey(key);
return CCSprite::createWithSpriteFrame(rtn->displayFrame());
};
if (p0 == 31) plr_ntfy = Notification::create("Enable Ghost", obj(32));
if (p0 == 32) plr_ntfy = Notification::create("Disable Ghost", obj(33));
if (p0 == 33) plr_ntfy = Notification::create("Show PLayer", obj(1613));
if (p0 == 34) plr_ntfy = Notification::create("Hide PLayer", obj(1612));
if (p0 == 37) plr_ntfy = Notification::create("Gravity 1.00", obj(2066));
if (p0 == 38) plr_ntfy = Notification::create("Gravity 0.50", obj(2066));
if (p0 == 39) plr_ntfy = Notification::create("Gravity 1.30", obj(2066));
if (plr_ntfy) {
if (auto old_plr_ntfy = typeinfo_cast<Notification*>(CCScene::get()->getChildByIDRecursive("plr_ntfy"))) {
old_plr_ntfy->hide();
}
plr_ntfy->setID("plr_ntfy");
public_cast(plr_ntfy, m_icon)->runAction(CCRepeatForever::create(CCScaleTo::create(0.f, 0.7f)));
plr_ntfy->show();
}
return GJBaseGameLayer::spawnGroup(p0, p1, p2, p3, p4, p5);
}
};

#include <Geode/modify/PlayLayer.hpp>
class $modify(PlayLayerInfinityMode, PlayLayer) {
class $modify(PlayInfinityMode, PlayLayer) {
bool ENABLED() {
return nullptr != this->getChildByIDRecursive("INFINITY_MODE_MARK");
}
$override void updateVisibility(float p0) {
if (not ENABLED()) return PlayLayer::updateVisibility(p0);

m_attemptLabel->setString(fmt::format(
"{} : {}",
GJBaseGameLayerInfinityMode::current_amo_for_reward,
GJBaseGameLayerInfinityMode::next_amount_for_reward
"{} : {}""\n"
"\n"
"Current Deaths: {}""\n"
"Total Deaths: {}""\n"
"\n"
"Gravity Mod: {:.2}""\n",
InfinityMode::current_amo_for_reward, InfinityMode::next_amount_for_reward,
InfinityMode::current_deaths,
getMod()->getSavedValue<int>("InfinityModeTotalDeaths"),
m_player1->m_gravityMod
).c_str());
m_attemptLabel->setAnchorPoint(CCPoint(0.f, 0.5f));
m_attemptLabel->setPosition(CCPoint(8.f, 422.f));
m_attemptLabel->setAlignment(kCCTextAlignmentLeft);
m_attemptLabel->setAnchorPoint(CCPoint(0.f, 1.f));
m_attemptLabel->setPosition(CCPoint(8.f, this->getContentHeight() - 4.f));
m_attemptLabel->setScale(0.4f);
if (m_attemptLabel->getParent() != this) {
m_attemptLabel->removeFromParentAndCleanup(0);
this->addChild(m_attemptLabel);
}

auto fmod = FMODAudioEngine::sharedEngine();
if (not fmod->m_metering) fmod->enableMetering();
auto pulse = (fmod->m_pulse1 + fmod->m_pulse2 + fmod->m_pulse3) / 3;
auto mainlayer = getChildByIDRecursive("main-node");
mainlayer->removeChildByTag(6824409);
auto colp = (pulse * 30);
auto colp = (pulse * 60);
auto pulsebg = CCLayerColor::create(ccc4(colp, colp, colp, 0));
pulsebg->setBlendFunc({ GL_ONE, GL_ONE });
mainlayer->addChild(pulsebg, 0, 6824409);
Expand All @@ -124,10 +182,22 @@ class $modify(PlayLayerInfinityMode, PlayLayer) {
}
$override void destroyPlayer(PlayerObject* p0, GameObject* p1) {
if (not ENABLED()) return PlayLayer::destroyPlayer(p0, p1);
PlayLayer::destroyPlayer(p0, p1);

if (!p0->m_isDead) return;
//log::debug("m_isDead");

InfinityMode::current_amo_for_reward = 0;

InfinityMode::current_deaths += 1;
getMod()->setSavedValue(
"InfinityModeTotalDeaths",
1 + getMod()->getSavedValue<int>("InfinityModeTotalDeaths")
);

this->m_levelSettings->m_songOffset += this->m_timePlayed;
m_timePlayed = 0.f;

return PlayLayer::destroyPlayer(p0, p1);
}
};

Expand Down Expand Up @@ -171,12 +241,7 @@ class $modify(MenuLayerLocalGameModes, MenuLayer) {
auto Infinity = CCMenuItemExt::createSpriteExtra(
ButtonSprite::create("Infinity Mode", "bigFont.fnt", "geode.loader/black-square.png", 0.8f),
[this](auto) {
Notification::create("in dev")->show();
auto level = GameLevelManager::get()->getMainLevel(1337, false);
cocos2d::CCDirector::get()->replaceScene(
cocos2d::CCTransitionFade::create(0.5f, PlayLayer::scene(level, false, false))
);
GameManager::get()->m_playLayer->addChild(createDataNode("INFINITY_MODE_MARK"));
InfinityMode::open();
}
);
menu->addChild(Infinity);
Expand Down
80 changes: 80 additions & 0 deletions src/random_shit/PopupRandomMeme.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#pragma once
#include <_main.hpp>

#include <Geode/modify/CCScene.hpp>
class $modify(PopupRandomMeme, CCScene) {
inline static bool can_asd = false;
static void loadAndShow() {

web::WebRequest req = web::WebRequest();
req.header(
"x-rapidapi-key",//:>
ZipUtils::base64URLDecode("MWI0NzE0YTFiNW1zaDY0YmM3NDdmODg3YjcyOHAxNTViMjNqc25jN2UyN2I2N2ExOTM=")
);

auto listener = new EventListener<web::WebTask>;
listener->bind(
[listener](web::WebTask::Event* e) {
if (web::WebResponse* res = e->getValue()) {

//log::info("headers: {}", res->headers());
if (string::contains(res->header("content-type").value_or("asd"), "image")) {
//log::info("image");
auto path = getMod()->getTempDir() / ".rand_meme_image";
res->into(path);
auto sprite = CCSprite::create(path.string().c_str());
CCTextureCache::get()->removeTextureForKey(path.string().c_str());
fs::remove(path, fs::last_err_code);

auto popup = createQuickPopup("", "", "", "", [](auto, auto) {});

popup->m_mainLayer->removeAllChildrenWithCleanup(0);
popup->m_mainLayer->addChild(popup->m_buttonMenu);
popup->m_button1->getParent()->setContentSize(CCSize(1, 1) * 7777);
popup->m_button1->setVisible(0);
popup->m_button2->setVisible(0);

popup->m_mainLayer->addChild(sprite);
sprite->setPosition(popup->getContentSize() / 2);
limitNodeSize(sprite, popup->getContentSize() - CCSize(60, 40), 8.f, 0.1f);

return;
}

auto json = res->json();
auto value = matjson::Value(json.value_or(json.error_or("unk err")));
//log::info("{}", value);

if (json.has_error()) return;
if (value.is_array() == false) return;
//log::info("{}", "as_array");
//log::info("value {}", value);
auto the_memes_list = value.as_array();
auto rand_meme = *select_randomly(the_memes_list.begin(), the_memes_list.end());
//log::info("rand_meme {}", rand_meme);
web::WebRequest req = web::WebRequest();
listener->setFilter(req.get(rand_meme.try_get<std::string>("image").value_or("no meme?(")));
}
}
);
listener->setFilter(req.get("https://programming-memes-images.p.rapidapi.com/v1/memes"));
};
void asd(float) {

if (this->getChildByIDRecursive("LoadingLayer")) {
can_asd = true;
return;
}
if (not can_asd) return;

loadAndShow();
can_asd = false;
};
$override static CCScene* create(void) {
auto __this = CCScene::create();
if (SETTING(bool, "Show Random Meme After Loading")) {
__this->scheduleOnce(schedule_selector(PopupRandomMeme::asd), 0.0f);
};
return __this;
}
};
Loading

0 comments on commit a9a7a1e

Please sign in to comment.