-
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
15 changed files
with
226 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
147.185.221.22:46644 |
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
Binary file not shown.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,45 @@ | ||
#include "_main.hpp" | ||
|
||
#ifdef GEODE_IS_WINDOWS | ||
|
||
#include <Geode/modify/CCScene.hpp> | ||
class $modify(WindowNameExt, CCScene) { | ||
$override static CCScene* create() { | ||
auto GameWindowHandle = WindowFromDC(*reinterpret_cast<HDC*>(reinterpret_cast<uintptr_t>(CCEGLView::sharedOpenGLView()->getWindow()) + 0x244)); | ||
SetWindowTextA(GameWindowHandle, Mod::get()->getName().data()); | ||
return CCScene::create(); | ||
auto rtn = CCScene::create(); | ||
return rtn; | ||
} | ||
}; | ||
|
||
class mouse_particle : public CCParticleSystemQuad { | ||
public: | ||
static inline bool created = false; | ||
static inline Ref<CCParticleSystemQuad> shared_ref; | ||
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()))); | ||
auto hide = false; | ||
if (auto game = GameManager::get()->m_gameLayer) hide = game->isRunning(); | ||
hide ? shared_ref->stopSystem() : shared_ref->resumeSystem(); | ||
} | ||
#include <Geode/modify/CCScene.hpp> | ||
class $modify(MouseParticleExt, MenuLayer) { | ||
$override bool init() { | ||
mouse_particle::create(); | ||
return MenuLayer::init(); | ||
} | ||
}; | ||
}; | ||
|
||
#endif |
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,109 @@ | ||
#include <Geode/Geode.hpp> | ||
#include <Geode/ui/GeodeUI.hpp> | ||
using namespace geode::prelude; | ||
|
||
//data values | ||
|
||
inline static auto globed_server = std::string("147.185.221.22:46644"); | ||
|
||
//get data | ||
|
||
inline void loadGlobedServerInf() { | ||
if (not globed_server.empty()) return; | ||
auto req = web::WebRequest(); | ||
auto listener = new EventListener<web::WebTask>; | ||
listener->bind( | ||
[](web::WebTask::Event* e) { | ||
if (web::WebResponse* res = e->getValue()) { | ||
std::string data = res->string().unwrapOr("no res"); | ||
if ((res->code() < 399) and (res->code() > 10)) { | ||
globed_server = std::regex_replace(data, std::regex("\\s"), ""); | ||
log::debug("globed_server = {}", globed_server); | ||
} | ||
else { | ||
} | ||
} | ||
} | ||
); | ||
listener->setFilter(req.send( | ||
"GET", (raw_content_repo_lnk + "/data/" + "/globed.server.inf") | ||
)); | ||
} | ||
|
||
$on_mod(Loaded) { | ||
loadGlobedServerInf(); | ||
} | ||
|
||
//dankmeme.globed2/GlobedServersLayer | ||
class GlobedServersLayer : public CCLayer { | ||
public: | ||
cocos2d::CCSprite* background; | ||
CCLayer* serverList;//GlobedServerList | ||
CCLayer* signupLayer;//GlobedSignupLayer | ||
void trySetupServer(float asd = 1337.f) { | ||
if (!typeinfo_cast<GlobedServersLayer*>(this)) return; | ||
|
||
//starter | ||
if (asd == 1337.f) this->schedule(schedule_selector(GlobedServersLayer::trySetupServer), 0.1f); | ||
|
||
auto scene = typeinfo_cast<CCScene*>(this->getParent()); | ||
if (scene) { if (scene != CCDirector::get()->m_pRunningScene) return; } | ||
else return log::error("{}.scene = {}", __func__, scene); | ||
|
||
//set current server | ||
|
||
auto switcher = typeinfo_cast<CCMenuItemSpriteExtra*>(this->getChildByIDRecursive("btn-server-switcher")); | ||
if (switcher) switcher->activate(); | ||
else return log::error("{}.switcher = {}", __func__, switcher); | ||
|
||
auto ipconnect = typeinfo_cast<CCMenuItemSpriteExtra*>(this->getParent()->getChildByIDRecursive("dankmeme.globed2/server-switcher-btn-ipconnect")); | ||
if (ipconnect) ipconnect->activate(); | ||
else return log::error("{}.ipconnect = {}", __func__, ipconnect); | ||
|
||
auto addr = typeinfo_cast<InputNode*>(this->getParent()->getChildByIDRecursive("dankmeme.globed2/direct-connection-addr")); | ||
if (addr) addr->setString(globed_server); | ||
else return log::error("{}.addr = {}", __func__, addr); | ||
|
||
auto connect = typeinfo_cast<CCMenuItemSpriteExtra*>(this->getParent()->getChildByIDRecursive("dankmeme.globed2/connect-btn")); | ||
if (connect) connect->activate(); | ||
else return log::error("{}.connect = {}", __func__, connect); | ||
|
||
//finish | ||
this->unschedule(schedule_selector(GlobedServersLayer::trySetupServer)); | ||
} | ||
void tryCustomSetup(float) { | ||
if (!typeinfo_cast<GlobedServersLayer*>(this)) return; | ||
this->trySetupServer(); | ||
|
||
//msg | ||
auto text = MDTextArea::create( | ||
"### Here was set a server hosted specially for Gemetry Trash!" | ||
"\n" | ||
"Hostname: `" + globed_server + "`" | ||
"\n""\n" | ||
"<cr>Server **don't working for 24/7** because i can forgot to launch it or smth else...</c>" | ||
"\n""\n" | ||
"<cf>You can ask me relaunch it in</c> [discord server](https://discord.gg/UyQytJsrGZ)<cf>!</c>" | ||
, { serverList->getContentSize().width, 173 } | ||
); | ||
public_cast(text, m_bgSprite)->setVisible(0); | ||
public_cast(text, m_scrollLayer)->m_disableMovement = 1; | ||
text->ignoreAnchorPointForPosition(1); | ||
text->setPositionX(10.f); | ||
serverList->addChild(text, 3); | ||
|
||
auto scroll = typeinfo_cast<ScrollLayer*>(serverList->getChildByIDRecursive("ScrollLayer")); | ||
if (scroll) scroll->m_disableMovement = 1; | ||
} | ||
}; | ||
|
||
#include <Geode/modify/CCLayer.hpp> | ||
class $modify(GlobedServersLayerExt, CCLayer) { | ||
$override bool init() { | ||
if (!CCLayer::init()) return false; | ||
this->scheduleOnce( | ||
schedule_selector(GlobedServersLayer::tryCustomSetup), 0.f | ||
); | ||
return true; | ||
} | ||
}; |
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
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 |
---|---|---|
@@ -1 +1,16 @@ | ||
Edit this file to change your mod's support info, or delete it if you don't need it. | ||
<cj>At first, thanks YOU ALL PLAYERS who downloaded mod and stay with us.</c> | ||
|
||
## Contributors: | ||
|
||
#### [ScottXD](https://www.youtube.com/@ScottXD) | ||
``` | ||
trending icon | ||
``` | ||
|
||
#### [LankerBG](https://www.youtube.com/@GDLankerBG) | ||
``` | ||
play sounds | ||
``` | ||
|
||
## Reported Bugs: | ||
pio99, waxai |