geode/loader/src/hooks/updateResources.cpp

23 lines
497 B
C++
Raw Normal View History

2022-07-30 12:24:03 -04:00
#include <Geode/loader/Loader.hpp>
USE_GEODE_NAMESPACE();
#include <Geode/modify/GameManager.hpp>
2022-07-30 12:24:03 -04:00
class $modify(GameManager) {
void reloadAllStep2() {
GameManager::reloadAllStep2();
Loader::get()->updateResourcePaths();
}
};
#include <Geode/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();
}
}
};