From de2017128313b9a322eb59c40a4180099d9c18b7 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Sun, 24 Sep 2023 22:45:37 +0100 Subject: DDS load + moved terrain (type) loading to sim --- extension/deps/openvic-simulation | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extension/deps') diff --git a/extension/deps/openvic-simulation b/extension/deps/openvic-simulation index 05b6db7..8256fe4 160000 --- a/extension/deps/openvic-simulation +++ b/extension/deps/openvic-simulation @@ -1 +1 @@ -Subproject commit 05b6db7305398e12363f727a50315972cc9a5a54 +Subproject commit 8256fe4c9468e23f5397d92796a741893b9469bc -- cgit v1.2.3-56-ga3b1 From a53a1891c63cbf809c4fc5481238de6a8b12f8c1 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Tue, 26 Sep 2023 20:32:51 +0100 Subject: Updated scripts + fixed GLI submodules --- extension/deps/gli | 1 + scripts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 160000 extension/deps/gli (limited to 'extension/deps') diff --git a/extension/deps/gli b/extension/deps/gli new file mode 160000 index 0000000..779b99a --- /dev/null +++ b/extension/deps/gli @@ -0,0 +1 @@ +Subproject commit 779b99ac6656e4d30c3b24e96e0136a59649a869 diff --git a/scripts b/scripts index 925a38d..3060e56 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 925a38d4d8aef200823f50345dfa2570891454c4 +Subproject commit 3060e56388ac00d90deb6693ec19d47bad52deb2 -- cgit v1.2.3-56-ga3b1 From 90c90f2ece542c05df9e87cdf7398bbf54a87697 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Thu, 28 Sep 2023 23:28:12 +0100 Subject: Scons rearrangement --- SConstruct | 9 ++++----- extension/deps/SCsub | 9 ++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'extension/deps') diff --git a/SConstruct b/SConstruct index ee7be9d..db5d150 100644 --- a/SConstruct +++ b/SConstruct @@ -36,10 +36,9 @@ SConscript("extension/deps/SCsub", "env") # - LINKFLAGS are for linking flags # tweak this if you want to use different folders, or more folders, to store your source code in. -source_paths = ["extension/src"] -include_paths = ["extension/deps/gli", "extension/deps/gli/external"] -env.Append(CPPPATH=[[env.Dir(p) for p in source_paths + include_paths]]) -sources = env.GlobRecursive("*.cpp", source_paths) +paths = ["extension/src"] +env.Append(CPPPATH=[[env.Dir(p) for p in paths]]) +sources = env.GlobRecursive("*.cpp", paths) env.extension_sources = sources # Remove unassociated intermediate binary files if allowed, usually the result of a renamed or deleted source file @@ -50,7 +49,7 @@ if env["intermediate_delete"]: return file[:file.rindex(".")] found_one = False - for path in source_paths: + for path in paths: for obj_file in [file[:-len(".os")] for file in glob(path + "*.os", recursive=True)]: found = False for source_file in sources: diff --git a/extension/deps/SCsub b/extension/deps/SCsub index 25a3286..6a7a48d 100644 --- a/extension/deps/SCsub +++ b/extension/deps/SCsub @@ -9,4 +9,11 @@ def build_openvic_simulation(env): env.Append(CPPPATH=ovsim_env.openvic_simulation["INCPATH"]) env.openvic_simulation = ovsim_env.openvic_simulation -build_openvic_simulation(env) \ No newline at end of file +def build_gli(env): + gli_includes = ["gli", "gli/external"] + env.gli_loader = {} + env.gli_loader["INCPATH"] = [env.Dir(p) for p in gli_includes] + env.Append(CPPPATH=env.gli_loader["INCPATH"]) + +build_openvic_simulation(env) +build_gli(env) -- cgit v1.2.3-56-ga3b1 From 86dd609511b643a6556c42622ec891c092366c66 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Fri, 29 Sep 2023 00:08:15 +0100 Subject: Updated SIM submodule + building info wrapper --- extension/deps/openvic-simulation | 2 +- extension/src/openvic-extension/GameSingleton.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'extension/deps') diff --git a/extension/deps/openvic-simulation b/extension/deps/openvic-simulation index 8256fe4..0479592 160000 --- a/extension/deps/openvic-simulation +++ b/extension/deps/openvic-simulation @@ -1 +1 @@ -Subproject commit 8256fe4c9468e23f5397d92796a741893b9469bc +Subproject commit 04795924456062db1631686a90f13d963791ad34 diff --git a/extension/src/openvic-extension/GameSingleton.cpp b/extension/src/openvic-extension/GameSingleton.cpp index e0dc14e..ade6ec9 100644 --- a/extension/src/openvic-extension/GameSingleton.cpp +++ b/extension/src/openvic-extension/GameSingleton.cpp @@ -232,7 +232,7 @@ Dictionary GameSingleton::get_province_info_from_index(int32_t index) const { if (rgo != nullptr) ret[get_province_info_rgo_key()] = std_to_godot_string(rgo->get_identifier()); ret[get_province_info_life_rating_key()] = province->get_life_rating(); - + TerrainType const* terrain_type = province->get_terrain_type(); if (terrain_type != nullptr) ret[get_province_info_terrain_type_key()] = std_to_godot_string(terrain_type->get_identifier()); @@ -244,16 +244,16 @@ Dictionary GameSingleton::get_province_info_from_index(int32_t index) const { distribution_t const& cultures = province->get_culture_distribution(); if (!cultures.empty()) ret[get_province_info_pop_cultures_key()] = _distribution_to_dictionary(cultures); - std::vector const& buildings = province->get_buildings(); + std::vector const& buildings = province->get_buildings(); if (!buildings.empty()) { Array buildings_array; buildings_array.resize(buildings.size()); for (size_t idx = 0; idx < buildings.size(); ++idx) { - Building const& building = buildings[idx]; + BuildingInstance const& building = buildings[idx]; Dictionary building_dict; building_dict[get_building_info_building_key()] = std_to_godot_string(building.get_identifier()); - building_dict[get_building_info_level_key()] = static_cast(building.get_level()); + building_dict[get_building_info_level_key()] = static_cast(building.get_current_level()); building_dict[get_building_info_expansion_state_key()] = static_cast(building.get_expansion_state()); building_dict[get_building_info_start_date_key()] = std_to_godot_string(building.get_start_date().to_string()); building_dict[get_building_info_end_date_key()] = std_to_godot_string(building.get_end_date().to_string()); -- cgit v1.2.3-56-ga3b1