geode/loader/src/hooks/updateResources.cpp

23 lines
507 B
C++
Raw Normal View History

2022-07-30 12:24:03 -04:00
#include <Geode/loader/Loader.hpp>
USE_GEODE_NAMESPACE();
2022-10-13 04:31:23 -04:00
#include <codegenned/modify/GameManager.hpp>
2022-07-30 12:24:03 -04:00
class $modify(GameManager) {
void reloadAllStep2() {
GameManager::reloadAllStep2();
Loader::get()->updateResourcePaths();
}
};
2022-10-13 04:31:23 -04:00
#include <codegenned/modify/LoadingLayer.hpp>
2022-07-30 12:24:03 -04:00
class $modify(LoadingLayer) {
void loadAssets() {
LoadingLayer::loadAssets();
if (this->m_loadStep == 5) {
Loader::get()->updateResourcePaths();
2022-07-30 12:24:03 -04:00
Loader::get()->updateResources();
}
}
};