Skip to content

Commit

Permalink
Merge pull request #77729 from Milopetilo/radio-tower
Browse files Browse the repository at this point in the history
Add a radio tower palette and make them use it
  • Loading branch information
Night-Pryanik authored Nov 11, 2024
2 parents 441046f + b3939ce commit 9ac0424
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 66 deletions.
30 changes: 3 additions & 27 deletions data/json/mapgen/bugs/wasp_tower.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,7 @@
" ",
" "
],
"terrain": {
" ": [ "t_region_groundcover" ],
"#": "t_concrete_wall",
"R": "t_radio_tower",
"2": "t_chaingate_c",
"|": "t_chainfence",
"6": "t_radio_controls",
"_": "t_pavement",
"<": "t_stairs_up"
},
"palettes": [ "radio_tower_palette" ],
"nested": {
" ": { "chunks": [ [ "null", 50 ], [ "wasp_gibs", 10 ] ] },
"_": { "chunks": [ [ "null", 50 ], [ "wasp_gibs", 10 ] ] }
Expand Down Expand Up @@ -81,25 +72,11 @@
" ",
" "
],
"palettes": [ "radio_tower_palette" ],
"terrain": {
" ": [ "t_region_groundcover" ],
"#": "t_concrete_wall",
"R": "t_radio_tower",
"2": "t_chaingate_c",
"|": "t_chainfence",
"6": "t_radio_controls",
"_": "t_pavement",
"+": [ "t_door_c", [ "t_door_b", 3 ], [ "t_door_frame", 3 ] ],
"4": "t_gutter_downspout",
"<": "t_stairs_up",
"w": [ "t_window", [ "t_window_frame", 3 ], [ "t_window_empty", 3 ] ]
},
"furniture": { "C": "f_counter", "r": "f_rack", "h": "f_chair", "l": "f_locker" },
"items": {
"C": { "item": "radio", "chance": 80, "repeat": [ 1, 2 ] },
"r": { "item": "recycle_electronic", "chance": 80, "repeat": [ 1, 2 ] },
"l": { "item": "clothing_work_set", "chance": 80 }
},
"nested": {
" ": { "chunks": [ [ "null", 50 ], [ "wasp_gibs", 10 ] ] },
"_": { "chunks": [ [ "null", 50 ], [ "wasp_gibs", 10 ] ] }
Expand Down Expand Up @@ -138,8 +115,7 @@
" ",
" "
],
"palettes": [ "roof_palette" ],
"terrain": { "R": "t_radio_tower", "a": "t_railing", ",": "t_metal_floor_no_roof", "<": "t_stairs_up" }
"palettes": [ "radio_tower_palette", "roof_palette" ]
}
},
{
Expand Down
46 changes: 7 additions & 39 deletions data/json/mapgen/radio_tower.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,7 @@
" ",
" "
],
"terrain": {
" ": "t_region_groundcover",
"#": "t_concrete_wall",
"R": "t_radio_tower",
"2": "t_chaingate_c",
"|": "t_chainfence",
"6": "t_radio_controls",
"_": "t_concrete",
"<": "t_stairs_up"
}
"palettes": [ "radio_tower_palette" ]
}
},
{
Expand Down Expand Up @@ -77,25 +68,7 @@
" ",
" "
],
"terrain": {
" ": "t_region_groundcover",
"#": "t_concrete_wall",
"R": "t_radio_tower",
"2": "t_chaingate_c",
"|": "t_chainfence",
"6": "t_radio_controls",
"_": "t_concrete",
"+": "t_door_c",
"4": "t_gutter_downspout",
"<": "t_ladder_up",
"w": "t_window"
},
"furniture": { "C": "f_counter", "r": "f_rack", "h": "f_chair", "l": "f_locker" },
"items": {
"C": { "item": "radio", "chance": 80, "repeat": [ 1, 2 ] },
"r": { "item": "recycle_electronic", "chance": 80, "repeat": [ 1, 2 ] },
"l": { "item": "clothing_work_set", "chance": 80 }
}
"palettes": [ "radio_tower_palette" ]
}
},
{
Expand Down Expand Up @@ -130,8 +103,7 @@
" ",
" "
],
"palettes": [ "roof_palette" ],
"terrain": { "R": "t_radio_tower", "a": "t_railing", ",": "t_metal_floor_no_roof", "≷": "t_ladder_up_down", "&": "t_flat_roof" }
"palettes": [ "radio_tower_palette", "roof_palette" ]
}
},
{
Expand Down Expand Up @@ -166,8 +138,7 @@
" ",
" "
],
"palettes": [ "roof_palette" ],
"terrain": { "R": "t_radio_tower", "a": "t_railing", ",": "t_metal_floor_no_roof", "≷": "t_ladder_up_down" }
"palettes": [ "radio_tower_palette", "roof_palette" ]
}
},
{
Expand Down Expand Up @@ -202,8 +173,7 @@
" ",
" "
],
"palettes": [ "roof_palette" ],
"terrain": { "R": "t_radio_tower", "a": "t_railing", ",": "t_metal_floor_no_roof", "≷": "t_ladder_up_down" },
"palettes": [ "radio_tower_palette", "roof_palette" ],
"nested": { ",": { "chunks": [ [ "null", 190 ], [ "roof_1x1_birdnest", 10 ] ] } }
}
},
Expand Down Expand Up @@ -239,8 +209,7 @@
" ",
" "
],
"palettes": [ "roof_palette" ],
"terrain": { "R": "t_radio_tower", "a": "t_railing", ",": "t_metal_floor_no_roof", "≷": "t_ladder_up_down" },
"palettes": [ "radio_tower_palette", "roof_palette" ],
"nested": { ",": { "chunks": [ [ "null", 200 ], [ "roof_1x1_birdnest", 10 ] ] } }
}
},
Expand Down Expand Up @@ -276,8 +245,7 @@
" ",
" "
],
"palettes": [ "roof_palette" ],
"terrain": { "R": "t_radio_tower", "a": "t_railing", ",": "t_metal_floor_no_roof" },
"palettes": [ "radio_tower_palette", "roof_palette" ],
"place_nested": [
{
"chunks": [
Expand Down
36 changes: 36 additions & 0 deletions data/json/mapgen_palettes/radio_tower_palette.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"type": "palette",
"id": "radio_tower_palette",
"palettes": [ "parametrized_walls_palette" ],
"parameters": {
"chaingate_type": {
"type": "ter_str_id",
"scope": "overmap_special",
"default": { "distribution": [ [ "t_chaingate_c", 1 ], [ "t_chaingate_l", 3 ] ] }
}
},
"terrain": {
" ": "t_region_groundcover",
"R": "t_radio_tower",
"2": { "param": "chaingate_type", "fallback": "t_chaingate_l" },
"|": "t_chainfence",
"6": "t_radio_controls",
"_": "t_concrete",
"+": [ [ "t_door_c", 1 ], [ "t_door_locked", 2 ], [ "t_door_elocked", 1 ] ],
"4": "t_gutter_downspout",
"<": "t_ladder_up",
"a": "t_railing",
",": "t_metal_floor_no_roof",
"≷": "t_ladder_up_down",
"&": "t_flat_roof",
"w": "t_window"
},
"furniture": { "C": "f_counter", "r": "f_rack", "h": "f_chair", "l": "f_locker" },
"items": {
"C": { "item": "radio", "chance": 80, "repeat": [ 1, 2 ] },
"r": { "item": "recycle_electronic", "chance": 80, "repeat": [ 1, 2 ] },
"l": { "item": "clothing_work_set", "chance": 80 }
}
}
]

0 comments on commit 9ac0424

Please sign in to comment.