geode/loader/src/hooks/updateResources.cpp

21 lines
401 B
C++
Raw Normal View History

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