finally a use for the stable and pasture.
This commit is contained in:
@@ -608,6 +608,8 @@ void reset_game_state() {
|
||||
residents_count = 0;
|
||||
undead_residents_count = 0;
|
||||
undead_residents_pending = 0;
|
||||
horses_count = 0;
|
||||
livestock_count = 0;
|
||||
|
||||
current_hour = 8;
|
||||
current_day = 1;
|
||||
@@ -902,6 +904,8 @@ bool save_game_state() {
|
||||
saveData.set("world_residents_count", residents_count);
|
||||
saveData.set("world_undead_residents_count", undead_residents_count);
|
||||
saveData.set("world_undead_residents_pending", undead_residents_pending);
|
||||
saveData.set("world_horses_count", horses_count);
|
||||
saveData.set("world_livestock_count", livestock_count);
|
||||
saveData.set("world_expanded_terrain_types", join_string_array(expanded_terrain_types));
|
||||
|
||||
string[] treeData;
|
||||
@@ -1043,6 +1047,12 @@ bool load_game_state_from_file(const string&in filename) {
|
||||
if (undead_residents_count < 0) undead_residents_count = 0;
|
||||
undead_residents_pending = int(get_number(saveData, "world_undead_residents_pending", 0));
|
||||
if (undead_residents_pending < 0) undead_residents_pending = 0;
|
||||
horses_count = int(get_number(saveData, "world_horses_count", 0));
|
||||
livestock_count = int(get_number(saveData, "world_livestock_count", 0));
|
||||
if (horses_count < 0) horses_count = 0;
|
||||
if (livestock_count < 0) livestock_count = 0;
|
||||
if (horses_count > MAX_HORSES) horses_count = MAX_HORSES;
|
||||
if (livestock_count > MAX_LIVESTOCK) livestock_count = MAX_LIVESTOCK;
|
||||
if (!barricade_initialized) {
|
||||
init_barricade();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user