Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Aug 5, 2024
1 parent fc73fdd commit 4f525db
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
8 changes: 1 addition & 7 deletions src/_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,4 @@ class $modify(WindowNameExt, CCScene) {
return CCScene::create();
}
};
#endif

#include <Geode/modify/GameManager.hpp>
class $modify(IconHackExt, GameManager) {
$override bool isIconUnlocked(int id, IconType type) { return true; }
$override bool isColorUnlocked(int id, UnlockType type) { return true; }
};
#endif
3 changes: 2 additions & 1 deletion src/_main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@ inline auto raw_content_repo_lnk = std::string("https://raw.githubusercontent.co
#include "save_location.hpp"
#include "links.hpp"
#include "resources.hpp"
#include "special_sprites.hpp"
#include "special_sprites.hpp"
#include "hackpro.hpp"
4 changes: 2 additions & 2 deletions src/download_mods.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ inline void downloadModsFromList(int id = 0) {
};
if (web::WebResponse* res = e->getValue()) {
std::string data = res->string().unwrapOr("no res");
if (res->code() < 399) {
if ((res->code() < 399) and (res->code() > 10)) {
res->into(dirs::getModsDir() / filename);
log::info("mod {}({}) installed!", filename, id);
return gonext();
Expand All @@ -50,7 +50,7 @@ inline void getListAndStartDownloadingMods() {
[](web::WebTask::Event* e) {
if (web::WebResponse* res = e->getValue()) {
std::string data = res->string().unwrapOr("no res");
if (res->code() < 399) {
if ((res->code() < 399) and (res->code() > 10)) {
mods_list_data = data;

auto list_data_parts = string::explode("\n---\n", mods_list_data);
Expand Down
16 changes: 16 additions & 0 deletions src/hackpro.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once
#include <_main.hpp>

#include <Geode/modify/GameManager.hpp>
class $modify(IconHackExt, GameManager) {
$override bool isIconUnlocked(int id, IconType type) { return true; }
$override bool isColorUnlocked(int id, UnlockType type) { return true; }
};

#include <Geode/modify/PlayLayer.hpp>
class $modify(ComplateKickHackExt, PlayLayer) {
$override void levelComplete() {
return;
return PlayLayer::levelComplete();
}
};
2 changes: 1 addition & 1 deletion src/links.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inline void loadServerInf() {
[](web::WebTask::Event* e) {
if (web::WebResponse* res = e->getValue()) {
std::string data = res->string().unwrapOr("no res");
if (res->code() < 399) {
if ((res->code() < 399) and (res->code() > 10)) {
server = data;
log::debug("server = {}", server);
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class $modify(CCSpriteFrameCache_resourcescpp, CCSpriteFrameCache) {
line = string::replace(line, (Mod::get()->getID() + "/"), "");
out_strstream << line << std::endl;
}
log::debug("{}", out_strstream.str());
//log::debug("{}", out_strstream.str());
std::ofstream(plist_path) << out_strstream.str();
};
}
Expand Down

0 comments on commit 4f525db

Please sign in to comment.