mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-23 09:02:38 +08:00
refactor!: File Manager (#1633)
* feat(vscode): added launch.json to dbg * feat(file_manager): Make use of a global instance * feat(file_manager): Allow for file and folder instances to be empty * refactor(GlobalsService): Update code of global service (untested)
This commit is contained in:
@ -30,8 +30,8 @@ namespace big
|
||||
}
|
||||
|
||||
gta_data_service::gta_data_service() :
|
||||
m_peds_cache(g_file_manager->get_project_file("./cache/peds.bin"), 5),
|
||||
m_vehicles_cache(g_file_manager->get_project_file("./cache/vehicles.bin"), 4),
|
||||
m_peds_cache(g_file_manager.get_project_file("./cache/peds.bin"), 5),
|
||||
m_vehicles_cache(g_file_manager.get_project_file("./cache/vehicles.bin"), 4),
|
||||
m_update_state(eGtaDataUpdateState::IDLE)
|
||||
{
|
||||
if (!is_cache_up_to_date())
|
||||
@ -161,7 +161,7 @@ namespace big
|
||||
m_peds_cache.load();
|
||||
m_vehicles_cache.load();
|
||||
|
||||
auto weapons_file = g_file_manager->get_project_file("./cache/weapons.json");
|
||||
auto weapons_file = g_file_manager.get_project_file("./cache/weapons.json");
|
||||
if (weapons_file.exists())
|
||||
{
|
||||
std::ifstream file(weapons_file.get_path());
|
||||
@ -593,7 +593,7 @@ namespace big
|
||||
m_weapons_cache.weapon_components.insert({weapon_component.m_name, weapon_component});
|
||||
}
|
||||
|
||||
auto weapons_file = big::g_file_manager->get_project_file("./cache/weapons.json");
|
||||
auto weapons_file = g_file_manager.get_project_file("./cache/weapons.json");
|
||||
std::ofstream file(weapons_file.get_path());
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user