-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
309 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file added
BIN
+4.05 MB
resources/sounds/InfinityModeMusic/InfinityModeMusic_rand - 9.11 playa - DA PARK.mp3
Binary file not shown.
Binary file added
BIN
+5.44 MB
resources/sounds/InfinityModeMusic/InfinityModeMusic_rand - 9.11 playa - LAKE HUNTERS 2.mp3
Binary file not shown.
Binary file added
BIN
+10.9 MB
resources/sounds/InfinityModeMusic/InfinityModeMusic_rand - The Light in Me.mp3
Binary file not shown.
Binary file added
BIN
+5.14 MB
...ounds/InfinityModeMusic/InfinityModeMusic_rand - kangi mzlff stedd burya metel i mgla.mp3
Binary file not shown.
Binary file added
BIN
+5.88 MB
resources/sounds/InfinityModeMusic/InfinityModeMusic_rand - mzlff STEDD - anabioz.mp3
Binary file not shown.
Binary file added
BIN
+6.29 MB
resources/sounds/InfinityModeMusic/InfinityModeMusic_rand - wtf happened last april.mp3
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 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 not shown.
Binary file not shown.
Binary file not shown.
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
}; |
Oops, something went wrong.