aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic2/GameManager.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-04-26 01:26:33 +0200
committer GitHub <noreply@github.com>2023-04-26 01:26:33 +0200
commit10053cf259c55ee45803268a844edf1011d8a16b (patch)
treefcf86e6fac31430ba537a0d056e97f901ad76dd7 /extension/src/openvic2/GameManager.cpp
parent639f86febf39184cccde9f898fc328375048233f (diff)
parent563834e7e6f9ce565bbfd553a0d9ff80a98c677d (diff)
Merge pull request #98 from OpenVic2Project/some-cleanup
Req comments + cleanup + c++ registry refactoring
Diffstat (limited to 'extension/src/openvic2/GameManager.cpp')
-rw-r--r--extension/src/openvic2/GameManager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/extension/src/openvic2/GameManager.cpp b/extension/src/openvic2/GameManager.cpp
index da742ca..78992f1 100644
--- a/extension/src/openvic2/GameManager.cpp
+++ b/extension/src/openvic2/GameManager.cpp
@@ -5,7 +5,7 @@
using namespace OpenVic2;
GameManager::GameManager(state_updated_func_t state_updated_callback)
- : clock{ [this]() { tick(); }, [this]() { update_state(); }, true }, today{ 1836 }, state_updated{ state_updated_callback } {}
+ : clock{ [this]() { tick(); }, [this]() { update_state(); } }, state_updated{ state_updated_callback } {}
void GameManager::set_needs_update() {
needs_update = true;
@@ -27,8 +27,11 @@ void GameManager::tick() {
set_needs_update();
}
-void GameManager::finished_loading_data() {
- map.generate_province_buildings(building_manager);
+return_t GameManager::setup() {
+ clock.reset();
+ today = { 1836 };
+ set_needs_update();
+ return map.generate_province_buildings(building_manager);
}
Date const& GameManager::get_today() const {