From 1838e79d6af83dbed2f1b387acf02aacca0eb4bc Mon Sep 17 00:00:00 2001 From: BrickPi <49528459+BrickPi@users.noreply.github.com> Date: Sun, 7 May 2023 12:41:44 -0500 Subject: Implement session start (SS-54) (#1) --- src/openvic2/GameManager.cpp | 1 + src/openvic2/GameManager.hpp | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/openvic2/GameManager.cpp b/src/openvic2/GameManager.cpp index 58e40bb..da775ba 100644 --- a/src/openvic2/GameManager.cpp +++ b/src/openvic2/GameManager.cpp @@ -28,6 +28,7 @@ void GameManager::tick() { } return_t GameManager::setup() { + session_start = time(nullptr); clock.reset(); today = { 1836 }; set_needs_update(); diff --git a/src/openvic2/GameManager.hpp b/src/openvic2/GameManager.hpp index 70e98bd..fc5d344 100644 --- a/src/openvic2/GameManager.hpp +++ b/src/openvic2/GameManager.hpp @@ -10,6 +10,7 @@ namespace OpenVic2 { Map map; BuildingManager building_manager; GameAdvancementHook clock; + time_t session_start; /* SS-54, as well as allowing time-tracking */ private: Date today; state_updated_func_t state_updated; -- cgit v1.2.3-56-ga3b1