Fix a missing detail in saved game serialization

The translatable string explaining why you can't currently end your turn was missing from the saved game. This fixes that.
This commit is contained in:
Celtic Minstrel 2021-07-13 01:17:23 -04:00
parent 5c31e17e4f
commit d7c148c3b4

View file

@ -38,6 +38,7 @@ game_data::game_data(const config& level)
, variables_(level.child_or_empty("variables"))
, phase_(INITIAL)
, can_end_turn_(level["can_end_turn"].to_bool(true))
, cannot_end_turn_reason_(level["cannot_end_turn_reason"])
, next_scenario_(level["next_scenario"])
, id_(level["id"])
, theme_(level["theme"])
@ -131,6 +132,7 @@ void game_data::write_snapshot(config& cfg) const
cfg["victory_music"] = utils::join(victory_music_);
cfg["can_end_turn"] = can_end_turn_;
cfg["cannot_end_turn_reason"] = cannot_end_turn_reason_;
cfg["random_seed"] = rng_.get_random_seed_str();
cfg["random_calls"] = rng_.get_random_calls();