Skip to content

Commit 871e79a

Browse files
committed
Fix type in some switch statements, add missing case
switch_source needs the case to be present, even if its *_null We were using f_null when the type is ter_str_id (should be t_*) fixes #83613
1 parent 2a2718f commit 871e79a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

data/json/mapgen_palettes/apartment_complex.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,26 @@
8888
},
8989
"furniture": {
9090
"Ŧ": {
91-
"switch": { "param": "fencing_type", "fallback": "f_null" },
91+
"switch": { "param": "fencing_type", "fallback": "t_null" },
9292
"cases": {
9393
"t_region_shrub_decorative": "f_null",
9494
"t_region_soil": "f_hedge_short",
9595
"t_region_groundcover_urban": "f_null",
9696
"t_chainfence": "f_null",
9797
"t_fence": "f_null",
9898
"t_privacy_fence": "f_null",
99-
"t_drystone_wall_half": "f_null"
99+
"t_drystone_wall_half": "f_null",
100+
"t_null": "f_null"
100101
}
101102
},
102103
"%": {
103-
"switch": { "param": "shrubbery_type", "fallback": "f_null" },
104+
"switch": { "param": "shrubbery_type", "fallback": "t_null" },
104105
"cases": {
105106
"t_region_shrub_decorative": "f_null",
106107
"t_region_soil": "f_hedge_short",
107108
"t_region_groundcover_urban": "f_null",
108-
"t_region_groundcover": "f_region_flower_decorative"
109+
"t_region_groundcover": "f_region_flower_decorative",
110+
"t_null": "f_null"
109111
}
110112
}
111113
}

data/json/mapgen_palettes/park_palette.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,13 @@
125125
},
126126
"furniture": {
127127
"Y": {
128-
"switch": { "param": "walkway", "fallback": "f_null" },
128+
"switch": { "param": "walkway", "fallback": "t_null" },
129129
"cases": {
130130
"t_railroad_rubble": "f_null",
131131
"t_region_soil": "f_null",
132132
"t_region_groundcover_barren": "f_null",
133-
"t_concrete": "f_street_light"
133+
"t_concrete": "f_street_light",
134+
"t_null": "f_null"
134135
}
135136
},
136137
"T": "f_table",

0 commit comments

Comments
 (0)