Skip to content

Commit

Permalink
v3 final
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Dec 11, 2024
1 parent 7eea198 commit 46288bb
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 27 deletions.
14 changes: 2 additions & 12 deletions data/mods.list.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
{
"version": "3.0.0 final. list1",
"version": "v2 warn",
"list": [

"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",
"https://github.com/geode-sdk/CustomKeybinds/releases/latest/download/geode.custom-keybinds.geode",
"https://github.com/Cvolton/miscbugfixes-geode/releases/latest/download/cvolton.misc_bugfixes.geode",
"https://github.com/Weebifying/restartbutton-geode/releases/latest/download/weebify.restartbtn.geode",

"https://github.com/user95401/GemetryTrash/releases/latest/download/user95401.gemetry_trash.geode",
"https://raw.githubusercontent.com/user95401/GemetryTrash/main/data/mods/user95401.mainlevelseditor.geode"

"OUTDATED!!! INSTALL NEW MAJOR VERSION FROM GITHUB"
]
}
16 changes: 16 additions & 0 deletions data/mods.list.v3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "3.0.0 final. list1",
"list": [

"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",
"https://github.com/geode-sdk/CustomKeybinds/releases/latest/download/geode.custom-keybinds.geode",
"https://github.com/Cvolton/miscbugfixes-geode/releases/latest/download/cvolton.misc_bugfixes.geode",
"https://github.com/Weebifying/restartbutton-geode/releases/latest/download/weebify.restartbtn.geode",

"https://github.com/user95401/GemetryTrash/releases/latest/download/user95401.gemetry_trash.geode",
"https://raw.githubusercontent.com/user95401/GemetryTrash/main/data/mods/user95401.mainlevelseditor.geode"

]
}
13 changes: 11 additions & 2 deletions src/_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,35 @@ class $modify(FLAlertLayerShowupStartPointExt, CCNode) {
}
};
};
#ifdef GEODE_IS_WINDOWS
if (auto casted = typeinfo_cast<MenuGameLayer*>(this)) {
if (casted->getContentSize().equals(CCDirector::get()->getWinSize())) {
casted->setAnchorPoint(toCocos(ImGui::GetMousePos()) / casted->getContentSize());
if (SETTING(bool, "Animate Menu Game")) void();
casted->setScale(1.005f);
}
};
#endif
}
};

#ifdef GEODE_IS_WINDOWS

#include <Geode/modify/AppDelegate.hpp>
class $modify(WindowNameExt, AppDelegate) {
void updateForegroundWindow() {
SetWindowTextA(GetForegroundWindow(), fmt::format(
"{} {}",
getMod()->getName(),
getMod()->getVersion().toVString()
).data());
}
$override void applicationWillEnterForeground() {
SetWindowTextA(GetForegroundWindow(), Mod::get()->getName().data());
updateForegroundWindow();
return AppDelegate::applicationWillEnterForeground();
};
$override bool applicationDidFinishLaunching() {
SetWindowTextA(GetForegroundWindow(), Mod::get()->getName().data());
updateForegroundWindow();
return AppDelegate::applicationDidFinishLaunching();
};
};
Expand Down
12 changes: 7 additions & 5 deletions src/_main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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 @@ -172,6 +172,8 @@ inline auto repobranch = std::string("user95401/GemetryTrash/main");
inline auto repo_lnk = std::string("https://github.com/" + repo);
inline auto raw_content_repo_lnk = std::string("https://raw.githubusercontent.com/" + repobranch);

auto pLoadingLayerRef = Ref<LoadingLayer>(nullptr);

#include "dialogs.hpp"
#include "settings.hpp"
#include "download_mods.hpp"
Expand All @@ -184,11 +186,11 @@ inline auto raw_content_repo_lnk = std::string("https://raw.githubusercontent.co
#include "random_shit/PopupRandomMeme.hpp"
#include "random_shit/EditorCaveSounds.hpp"
#include "random_shit/ShopkepperEyebrow.hpp"
#include "random_shit/loadinglayer_ruinify.hpp"
#include "random_shit/menulayer_ruinify.hpp"
#include "random_shit/game_ruinify.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/second_floor.hpp"
2 changes: 1 addition & 1 deletion src/dialogs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class $modify(CCSceneDialogs, CCScene) {
//Who did the bite of 87
{
CCArray* arr = CCArray::create();
arr->addObject(DialogObject::create("Scratch", "Who did the bite of 87?", 13, 1.f, 0, ccWHITE));
arr->addObject(DialogObject::create("Scratch", rndb() ? pLoadingLayerRef->getLoadingString() : "Who did the bite of 87?", 13, 1.f, 0, ccWHITE));
dailogs.push_back(arr);
}
auto dailog = *select_randomly(dailogs.begin(), dailogs.end());
Expand Down
11 changes: 7 additions & 4 deletions src/download_mods.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ inline void downloadModsFromList(int id = 0, int attempts = 0, bool failed = 0)
auto req = web::WebRequest();
auto listener = new EventListener<web::WebTask>;
listener->bind(
[id, attempts, failed, filename](web::WebTask::Event* e) {
auto gonext = [id, attempts, failed](bool retry = false) {
[id, attempts, failed, filename, url](web::WebTask::Event* e) {
auto gonext = [id, attempts, failed, filename, url](bool retry = false) {
statusLabel->setText(fmt::format(
"{}\nurl: {}\nid: {}, attempts: {}, was failed: {}", filename, url, id, attempts, failed
).c_str());
auto nextid = id + 1;
auto isfailed = failed;
if (retry and attempts <= 6) nextid = id;
Expand Down Expand Up @@ -97,7 +100,7 @@ inline void getListAndStartDownloadingMods() {
log::debug("current_ver=\"{}\"", current_ver);

if (std::string(mods_list_version) == std::string(current_ver))
return log::debug("last list was installed");
return log::debug("{}", "last list was installed");
}
auto popup = createQuickPopup(
"Downloading mods...",
Expand Down Expand Up @@ -128,7 +131,7 @@ inline void getListAndStartDownloadingMods() {
}
);
listener->setFilter(req.send(
"GET", (raw_content_repo_lnk + "/data/" + "/mods.list.json")
"GET", (raw_content_repo_lnk + "/data/" + "/mods.list.v3.json")
));
}

Expand Down
3 changes: 2 additions & 1 deletion src/random_shit/loadinglayer_ruinify.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class $modify(LoadingLayerExt, LoadingLayer) {
$override bool init(bool p0) {
srand(time(0)); //bool(rand() % 2)

auto rtn = LoadingLayer::init(p0);
auto rtn = LoadingLayer::init(p0);
pLoadingLayerRef.swap(this);

auto bg = typeinfo_cast<CCSprite*>(this->getChildByID("bg-texture"));
if (bg) {
Expand Down
4 changes: 2 additions & 2 deletions src/random_shit/menuitems.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class $modify(CCMenuItemDialogExt, CCMenuItem) {
$override void activate() {
if (SETTING(bool, "No Button UDare Dialog")) return CCMenuItem::activate();
srand(time(0));
if (!rndb(12) or findDataNode(this, "hasDialog")) {
if (!rndb(25) or findDataNode(this, "hasDialog")) {
return CCMenuItem::activate();
}
if (auto spriteitem = typeinfo_cast<CCMenuItemSpriteExtra*>(this)) {
Expand All @@ -32,7 +32,7 @@ class $modify(CCMenuItemDialogExt, CCMenuItem) {
auto* dialog = DialogLayer::createDialogLayer(
DialogObject::create(
"Button",
"<cr>You dare touch me!?</c>\n<d100>Ok.",
rndb(3) ? pLoadingLayerRef->getLoadingString() : "<cr>You dare touch me!?</c>\n<d100>Ok.",
5, 1, false, ccc3(255, 255, 255)
),
nullptr, 1 // idk, Background
Expand Down

0 comments on commit 46288bb

Please sign in to comment.