diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-10-30 23:41:44 +0100 |
---|---|---|
committer | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-11-01 16:27:42 +0100 |
commit | a1a9d2d6ce3c94bccf224efcffd4c7e11eebe1e1 (patch) | |
tree | b4f65a01c830f7e7c7cc10385a0442bfa05264a9 /extension/src/openvic-extension/singletons/MenuSingleton.cpp | |
parent | 2558a8fb10eb2f6adc01653bc0d4da73141efb67 (diff) |
Fix UI bindings after RGO PRfix_ui_binding_after_rgo_pr
Diffstat (limited to 'extension/src/openvic-extension/singletons/MenuSingleton.cpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/MenuSingleton.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/extension/src/openvic-extension/singletons/MenuSingleton.cpp b/extension/src/openvic-extension/singletons/MenuSingleton.cpp index 8d7f9fe..cabe82b 100644 --- a/extension/src/openvic-extension/singletons/MenuSingleton.cpp +++ b/extension/src/openvic-extension/singletons/MenuSingleton.cpp @@ -2,8 +2,10 @@ #include <godot_cpp/variant/utility_functions.hpp> +#include <openvic-simulation/economy/GoodDefinition.hpp> #include <openvic-simulation/GameManager.hpp> #include <openvic-simulation/modifier/Modifier.hpp> +#include <openvic-simulation/types/fixed_point/FixedPoint.hpp> #include "openvic-extension/classes/GFXPieChartTexture.hpp" #include "openvic-extension/classes/GUINode.hpp" @@ -472,10 +474,10 @@ Dictionary MenuSingleton::get_province_info_from_index(int32_t index) const { ret[province_info_controller_key] = Utilities::std_to_godot_string(controller->get_identifier()); } - GoodDefinition const* rgo = province->get_rgo(); - if (rgo != nullptr) { - ret[province_info_rgo_name_key] = Utilities::std_to_godot_string(rgo->get_identifier()); - ret[province_info_rgo_icon_key] = static_cast<int32_t>(rgo->get_index()); + GoodDefinition const* const rgo_good = province->get_rgo_good(); + if (rgo_good != nullptr) { + ret[province_info_rgo_name_key] = Utilities::std_to_godot_string(rgo_good->get_identifier()); + ret[province_info_rgo_icon_key] = static_cast<int32_t>(rgo_good->get_index()); } Crime const* crime = province->get_crime(); |