From 8a481ee97360bf35c19dbdd9720f86616b2d8647 Mon Sep 17 00:00:00 2001 From: hop311 Date: Fri, 6 Sep 2024 21:16:31 +0100 Subject: Update openvic-simulation to OpenVicProject/OpenVic-Simulation@d360457 --- extension/src/openvic-extension/singletons/GameSingleton.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (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 13324d0..24d8a73 100644 --- a/extension/src/openvic-extension/singletons/GameSingleton.cpp +++ b/extension/src/openvic-extension/singletons/GameSingleton.cpp @@ -69,7 +69,7 @@ void GameSingleton::_bind_methods() { OV_BIND_METHOD(GameSingleton::set_selected_province, { "index" }); OV_BIND_METHOD(GameSingleton::unset_selected_province); - OV_BIND_METHOD(GameSingleton::try_tick); + OV_BIND_METHOD(GameSingleton::update_clock); ADD_SIGNAL(MethodInfo(_signal_gamestate_updated())); ADD_SIGNAL(MethodInfo(_signal_province_selected(), PropertyInfo(Variant::INT, "index"))); @@ -349,11 +349,8 @@ void GameSingleton::unset_selected_province() { set_selected_province(ProvinceDefinition::NULL_INDEX); } -void GameSingleton::try_tick() { - InstanceManager* instance_manager = get_instance_manager(); - ERR_FAIL_NULL(instance_manager); - - instance_manager->get_simulation_clock().conditionally_advance_game(); +Error GameSingleton::update_clock() { + return ERR(game_manager.update_clock()); } Error GameSingleton::_load_map_images() { -- cgit v1.2.3-56-ga3b1