Oh wow, I thought I already pushed some of this stuff. Let's see if I can remember it all. Undead residents added. Whights added, Vampyrs added. Bandit Hideout adventure added.
This commit is contained in:
@@ -606,6 +606,8 @@ void reset_game_state() {
|
||||
barricade_health = 0;
|
||||
barricade_initialized = false;
|
||||
residents_count = 0;
|
||||
undead_residents_count = 0;
|
||||
undead_residents_pending = 0;
|
||||
|
||||
current_hour = 8;
|
||||
current_day = 1;
|
||||
@@ -868,6 +870,10 @@ bool save_game_state() {
|
||||
saveData.set("time_invasion_scheduled_hour", invasion_scheduled_hour);
|
||||
saveData.set("time_invasion_enemy_type", invasion_enemy_type);
|
||||
saveData.set("quest_roll_done_today", quest_roll_done_today);
|
||||
saveData.set("wight_spawn_chance", wight_spawn_chance);
|
||||
saveData.set("wight_spawned_this_night", wight_spawned_this_night);
|
||||
saveData.set("vampyr_spawn_chance", vampyr_spawn_chance);
|
||||
saveData.set("vampyr_spawned_this_night", vampyr_spawned_this_night);
|
||||
string[] questData;
|
||||
for (uint i = 0; i < quest_queue.length(); i++) {
|
||||
questData.insert_last("" + quest_queue[i]);
|
||||
@@ -882,6 +888,8 @@ bool save_game_state() {
|
||||
saveData.set("world_barricade_initialized", barricade_initialized);
|
||||
saveData.set("world_barricade_health", barricade_health);
|
||||
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_expanded_terrain_types", join_string_array(expanded_terrain_types));
|
||||
|
||||
string[] treeData;
|
||||
@@ -1019,6 +1027,10 @@ bool load_game_state_from_file(const string&in filename) {
|
||||
barricade_health = int(get_number(saveData, "world_barricade_health", BARRICADE_BASE_HEALTH));
|
||||
residents_count = int(get_number(saveData, "world_residents_count", 0));
|
||||
if (residents_count < 0) residents_count = 0;
|
||||
undead_residents_count = int(get_number(saveData, "world_undead_residents_count", 0));
|
||||
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;
|
||||
if (!barricade_initialized) {
|
||||
init_barricade();
|
||||
} else {
|
||||
@@ -1276,6 +1288,14 @@ bool load_game_state_from_file(const string&in filename) {
|
||||
if (invasion_scheduled_hour < -1) invasion_scheduled_hour = -1;
|
||||
if (invasion_scheduled_hour > 23) invasion_scheduled_hour = -1;
|
||||
quest_roll_done_today = get_bool(saveData, "quest_roll_done_today", false);
|
||||
wight_spawn_chance = int(get_number(saveData, "wight_spawn_chance", WIGHT_SPAWN_CHANCE_START));
|
||||
wight_spawned_this_night = get_bool(saveData, "wight_spawned_this_night", false);
|
||||
if (wight_spawn_chance < WIGHT_SPAWN_CHANCE_START) wight_spawn_chance = WIGHT_SPAWN_CHANCE_START;
|
||||
if (wight_spawn_chance > 100) wight_spawn_chance = 100;
|
||||
vampyr_spawn_chance = int(get_number(saveData, "vampyr_spawn_chance", VAMPYR_SPAWN_CHANCE_START));
|
||||
vampyr_spawned_this_night = get_bool(saveData, "vampyr_spawned_this_night", false);
|
||||
if (vampyr_spawn_chance < VAMPYR_SPAWN_CHANCE_START) vampyr_spawn_chance = VAMPYR_SPAWN_CHANCE_START;
|
||||
if (vampyr_spawn_chance > 100) vampyr_spawn_chance = 100;
|
||||
|
||||
quest_queue.resize(0);
|
||||
string[] loadedQuests = get_string_list_or_split(saveData, "quest_queue");
|
||||
|
||||
Reference in New Issue
Block a user