2323
2424local function parse_gather_props (zone_data , props )
2525 if props .pick_trees == ' false' then
26- ensure_keys (zone_data , ' zone_settings' , ' gather' ).pick_trees = false
26+ ensure_keys (zone_data , ' zone_settings' , ' gather' , ' flags ' ).pick_trees = false
2727 props .pick_trees = nil
2828 end
2929 if props .pick_shrubs == ' false' then
30- ensure_keys (zone_data , ' zone_settings' , ' gather' ).pick_shrubs = false
30+ ensure_keys (zone_data , ' zone_settings' , ' gather' , ' flags ' ).pick_shrubs = false
3131 props .pick_shrubs = nil
3232 end
3333 if props .gather_fallen == ' false' then
34- ensure_keys (zone_data , ' zone_settings' , ' gather' ).gather_fallen = false
34+ ensure_keys (zone_data , ' zone_settings' , ' gather' , ' flags ' ).gather_fallen = false
3535 props .gather_fallen = nil
3636 end
3737end
@@ -105,9 +105,9 @@ local zone_db_raw = {
105105 b = {label = ' Bedroom' , default_data = {type = df .civzone_type .Bedroom }},
106106 h = {label = ' Dining Hall' , default_data = {type = df .civzone_type .DiningHall }},
107107 n = {label = ' Pen/Pasture' , default_data = {type = df .civzone_type .Pen ,
108- assign = {zone_settings = {pen = {unk = 1 }}}}},
108+ assign = {zone_settings = {pen = {check_occupants = true }}}}},
109109 p = {label = ' Pit/Pond' , props_fn = parse_pit_pond_props , default_data = {type = df .civzone_type .Pond ,
110- assign = {zone_settings = {pit_pond = df . building_civzonest . T_zone_settings . T_pit_pond . top_of_pit }}}},
110+ assign = {zone_settings = {pond = { flag = { keep_filled = true }} }}}},
111111 w = {label = ' Water Source' , default_data = {type = df .civzone_type .WaterSource }},
112112 j = {label = ' Dungeon' , default_data = {type = df .civzone_type .Dungeon }},
113113 f = {label = ' Fishing' , default_data = {type = df .civzone_type .FishingArea }},
@@ -122,12 +122,13 @@ local zone_db_raw = {
122122 T = {label = ' Tomb' , props_fn = parse_tomb_props , default_data = {type = df .civzone_type .Tomb ,
123123 assign = {zone_settings = {tomb = {whole = 1 }}}}},
124124 g = {label = ' Gather/Pick Fruit' , props_fn = parse_gather_props , default_data = {type = df .civzone_type .PlantGathering ,
125- assign = {zone_settings = {gather = {pick_trees = true , pick_shrubs = true , gather_fallen = true }}}}},
125+ assign = {zone_settings = {gather = {flags = { pick_trees = true , pick_shrubs = true , gather_fallen = true } }}}}},
126126 c = {label = ' Clay' , default_data = {type = df .civzone_type .ClayCollection }},
127127}
128128for _ , v in pairs (zone_db_raw ) do
129129 utils .assign (v , zone_template )
130- ensure_key (v .default_data , ' assign' ).is_active = 8 -- set to active by default
130+ -- set to active by default
131+ ensure_keys (v .default_data , ' assign' , ' spec_sub_flag' ).active = true
131132end
132133
133134-- we may want to offer full name aliases for the single letter ones above
@@ -241,7 +242,7 @@ local function parse_zone_config(c, props)
241242 utils .assign (zone_data , db_entry .default_data )
242243 zone_data .location = parse_location_props (props )
243244 if props .active == ' false' then
244- zone_data . is_active = 0
245+ ensure_key ( zone_data , ' spec_sub_flag ' ). active = false
245246 props .active = nil
246247 end
247248 if props .name then
0 commit comments