working on refactoring

This commit is contained in:
Vladislav Khorev committed 2026-10-24 22:37:20 +06:00
1 parent 9b71ee447a
commit d5ef126264
12 files changed
+309 -219

No files matched your search

+6 -1
View File
@@ -36,9 +36,13 @@ using LocationMap = std::unordered_map<std::string, std::shared_ptr<Location>>;
struct GameState : public ISaveable {
// --- World ---
// Campaign being played (see CampaignRegistry); `locations` holds that campaign's locations.
// Campaign being played (see CampaignRegistry).
std::string campaignId = "main";
// The campaign's loaded location(s); only the one the player is in is kept loaded.
LocationMap locations;
// Saved state (Location::save) of the campaign's locations that are not loaded,
// applied when one is loaded again. save()/load() cover both maps.
std::unordered_map<std::string, nlohmann::json> storedLocationStates;
std::string currentLocationName;
bool isDarklands = false;
bool isNight = false;
@@ -63,6 +67,7 @@ struct GameState : public ISaveable {
bool tutorialPhoneChatScreenOpened = false; // "open the messenger" hint is done
bool tutorialJournalScreenOpened = false; // "open the journal" hint is done
bool tutorialNeedOpenTaxiScreen = false; // "call a taxi" hint is showing
bool tutorialTaxiHintDone = false; // a taxi was ordered; never show the hint again
bool isTutorialActive() const { return tutorialStep != TutorialStep::Completed; }
// Moves to the next step if `step` is the current one; returns whether it did.