diff options
author | hop311 <hop3114@gmail.com> | 2024-08-15 01:13:54 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-08-15 01:13:54 +0200 |
commit | 7c85ab11e840c281a2499dcc6dd3219c33e7d37f (patch) | |
tree | 84460d9e4c3af8656604add874fc9a379a0adc4a /extension/src/openvic-extension/singletons/GameSingleton.cpp | |
parent | 82b16bcca7c74607a8885b882ec36f5202e7ef70 (diff) |
Add GUITextLabel (colour code + currency icon support)
Diffstat (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/GameSingleton.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extension/src/openvic-extension/singletons/GameSingleton.cpp b/extension/src/openvic-extension/singletons/GameSingleton.cpp index 5268789..13324d0 100644 --- a/extension/src/openvic-extension/singletons/GameSingleton.cpp +++ b/extension/src/openvic-extension/singletons/GameSingleton.cpp @@ -597,7 +597,7 @@ Error GameSingleton::set_compatibility_mode_roots(PackedStringArray const& file_ Error GameSingleton::load_defines_compatibility_mode() { Error err = OK; auto add_message = std::bind_front(&LoadLocalisation::add_message, LoadLocalisation::get_singleton()); - + if (!game_manager.load_definitions(add_message)) { UtilityFunctions::push_error("Failed to load defines!"); err = FAILED; @@ -616,6 +616,12 @@ Error GameSingleton::load_defines_compatibility_mode() { err = FAILED; } + AssetManager* asset_manager = AssetManager::get_singleton(); + if (asset_manager == nullptr || asset_manager->preload_textures() != OK) { + UtilityFunctions::push_error("Failed to preload assets!"); + err = FAILED; + } + return err; } |