From 7c85ab11e840c281a2499dcc6dd3219c33e7d37f Mon Sep 17 00:00:00 2001 From: hop311 Date: Thu, 15 Aug 2024 00:13:54 +0100 Subject: Add GUITextLabel (colour code + currency icon support) --- extension/src/openvic-extension/singletons/GameSingleton.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp') 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; } -- cgit v1.2.3-56-ga3b1