Skip to content

Commit

Permalink
Separate shelter types (#39427)
Browse files Browse the repository at this point in the history
* Initial test for new shelter type

* Some more updates, unable to generate starting location still

* Forgot to change the other weights

* Working mapgen, removed extra roof overmap terrains

* Linted json and removed extra shelter definitions.

* Removed extra name definition
  • Loading branch information
kevingranade authored Apr 18, 2020
2 parents 1870fbb + 8a2af89 commit 5738946
Show file tree
Hide file tree
Showing 7 changed files with 197 additions and 26 deletions.
6 changes: 3 additions & 3 deletions data/json/mapgen/nested/shelter_nested.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "shelter_nest_vandalized",
"nested_mapgen_id": "shelter_nest_vandal",
"object": {
"mapgensize": [ 24, 24 ],
"rows": [
Expand Down Expand Up @@ -264,7 +264,7 @@
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "shelter_1_nest_vandalized",
"nested_mapgen_id": "shelter_1_nest_vandal",
"object": {
"mapgensize": [ 24, 24 ],
"rows": [
Expand Down Expand Up @@ -422,7 +422,7 @@
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "shelter_2_nest_vandalized",
"nested_mapgen_id": "shelter_2_nest_vandal",
"object": {
"mapgensize": [ 24, 24 ],
"rows": [
Expand Down
145 changes: 124 additions & 21 deletions data/json/mapgen/shelter.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@
" |----:--+-:----|4 "
],
"palettes": [ "shelter" ],
"place_nested": [
{
"chunks": [ [ "shelter_nest_base", 25 ], [ "shelter_nest_used", 45 ], [ "shelter_nest_vandalized", 30 ] ],
"x": 0,
"y": 0
}
]
"place_nested": [ { "chunks": [ [ "shelter_nest_base", 50 ], [ "shelter_nest_used", 50 ] ], "x": 0, "y": 0 } ]
}
},
{
Expand Down Expand Up @@ -155,13 +149,7 @@
" |----:--+-:----| "
],
"palettes": [ "shelter" ],
"place_nested": [
{
"chunks": [ [ "shelter_1_nest_base", 25 ], [ "shelter_1_nest_used", 45 ], [ "shelter_1_nest_vandalized", 30 ] ],
"x": 0,
"y": 0
}
]
"place_nested": [ { "chunks": [ [ "shelter_1_nest_base", 50 ], [ "shelter_1_nest_used", 50 ] ], "x": 0, "y": 0 } ]
}
},
{
Expand Down Expand Up @@ -245,13 +233,7 @@
" |-:-+-:-| "
],
"palettes": [ "shelter" ],
"place_nested": [
{
"chunks": [ [ "shelter_2_nest_base", 25 ], [ "shelter_2_nest_used", 45 ], [ "shelter_2_nest_vandalized", 30 ] ],
"x": 0,
"y": 0
}
],
"place_nested": [ { "chunks": [ [ "shelter_2_nest_base", 50 ], [ "shelter_2_nest_used", 50 ] ], "x": 0, "y": 0 } ],
"computers": {
"6": {
"name": "Evac shelter computer",
Expand Down Expand Up @@ -311,6 +293,127 @@
"place_items": [ { "item": "roof_trash", "x": [ 8, 15 ], "y": [ 7, 22 ], "chance": 50, "repeat": [ 1, 3 ] } ]
}
},
{
"type": "mapgen",
"method": "json",
"weight": 100,
"om_terrain": [ "shelter_vandal" ],
"object": {
"fill_ter": "t_floor",
"rows": [
" !!!!!!!!!!!!!!!! ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" &&&&&&&&&&&&&&&& ",
" |----:-++-:----| ",
" |.............6| ",
" |..............| ",
" |..............| ",
" |..............| ",
" :..............: ",
" |..............| ",
" |......>>......| ",
" |......>>......| ",
" |..............| ",
" :..............: ",
" |..............| ",
" |..............| ",
" |||............| ",
" |*=...........6| ",
" |----:--+-:----|4 "
],
"palettes": [ "shelter" ],
"place_nested": [ { "chunks": [ [ "shelter_nest_vandal", 100 ] ], "x": 0, "y": 0 } ]
}
},
{
"type": "mapgen",
"method": "json",
"weight": 100,
"om_terrain": [ "shelter_1_vandal" ],
"object": {
"fill_ter": "t_floor",
"rows": [
" !!!!!!!!!!!!!!!! ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" &&&|---++---|&&& ",
" |........| ",
" |-:|........| ",
" |...........|:-| ",
" |.............6| ",
" |..............| ",
" :..............: ",
" |..............| ",
" |..............| ",
" |........|||...| ",
" |.-----..|*=...| ",
" :........|||...: ",
" |..........|-+-| ",
" |..........|...| ",
" |..........|>..| ",
" |..........|>..|4 ",
" |----:--+-:----| "
],
"palettes": [ "shelter" ],
"place_nested": [ { "chunks": [ [ "shelter_1_nest_vandal", 100 ] ], "x": 0, "y": 0 } ]
}
},
{
"type": "mapgen",
"method": "json",
"weight": 100,
"om_terrain": [ "shelter_2_vandal" ],
"object": {
"fill_ter": "t_floor",
"rows": [
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" `!!!!`!!!!`!!!!` ",
" &&&&&&&&&&&&&&&& ",
" |-:-++-:-| ",
" ||------|........| ",
" |*|..............| ",
" |.=..............| ",
" |--|.............--| ",
" |..................| ",
" :..................: ",
" |..................| ",
" |.......|--|.......| ",
" |........>>........| ",
" |........>>........| ",
" :.......|--|.......: ",
" |..................| ",
" |..................| ",
" |--..............--| ",
" |................|4 ",
" |--------|.......| ",
" |-:-+-:-| "
],
"palettes": [ "shelter" ],
"place_nested": [ { "chunks": [ [ "shelter_2_nest_vandal", 100 ] ], "x": 0, "y": 0 } ],
"computers": {
"6": {
"name": "Evac shelter computer",
"options": [
{ "name": "Emergency Message", "action": "emerg_mess" },
{ "name": "Disable External Power", "action": "complete_disable_external_power" },
{ "name": "Contact Us", "action": "emerg_ref_center" }
]
}
}
}
},
{
"type": "mapgen",
"method": "json",
Expand Down
45 changes: 45 additions & 0 deletions data/json/overmap/overmap_special/specials.json
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,51 @@
"occurrences": [ 1, 3 ],
"flags": [ "CLASSIC", "URBAN" ]
},
{
"type": "overmap_special",
"id": "Evac Shelter Vandalized",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "shelter_vandal_north" },
{ "point": [ 0, 0, -1 ], "overmap": "shelter_under_north" },
{ "point": [ 0, 0, 1 ], "overmap": "shelter_roof_north" }
],
"connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "connection": "local_road", "from": [ 0, 0, 0 ] } ],
"locations": [ "wilderness" ],
"city_distance": [ 5, 10 ],
"city_sizes": [ 4, 12 ],
"occurrences": [ 1, 3 ],
"flags": [ "CLASSIC", "URBAN" ]
},
{
"type": "overmap_special",
"id": "Evac Shelter Vandalized 2",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "shelter_1_vandal_north" },
{ "point": [ 0, 0, -1 ], "overmap": "shelter_under_north" },
{ "point": [ 0, 0, 1 ], "overmap": "shelter_roof_1_north" }
],
"connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "connection": "local_road", "from": [ 0, 0, 0 ] } ],
"locations": [ "wilderness" ],
"city_distance": [ 5, 10 ],
"city_sizes": [ 4, 12 ],
"occurrences": [ 1, 3 ],
"flags": [ "CLASSIC", "URBAN" ]
},
{
"type": "overmap_special",
"id": "Evac Shelter Vandalized 3",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "shelter_2_vandal_north" },
{ "point": [ 0, 0, -1 ], "overmap": "shelter_under_north" },
{ "point": [ 0, 0, 1 ], "overmap": "shelter_roof_2_north" }
],
"connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "connection": "local_road", "from": [ 0, 0, 0 ] } ],
"locations": [ "wilderness" ],
"city_distance": [ 5, 10 ],
"city_sizes": [ 4, 12 ],
"occurrences": [ 1, 3 ],
"flags": [ "CLASSIC", "URBAN" ]
},
{
"type": "overmap_special",
"id": "Cave",
Expand Down
15 changes: 15 additions & 0 deletions data/json/overmap/overmap_terrain/overmap_terrain_military.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@
"color": "white",
"see_cost": 2
},
{
"type": "overmap_terrain",
"id": "shelter_vandal",
"copy-from": "shelter"
},
{
"type": "overmap_terrain",
"id": "shelter_1_vandal",
"copy-from": "shelter_1"
},
{
"type": "overmap_terrain",
"id": "shelter_2_vandal",
"copy-from": "shelter_2"
},
{
"type": "overmap_terrain",
"id": "shelter_under",
Expand Down
4 changes: 3 additions & 1 deletion data/json/recipes/basecamps/recipe_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
{ "id": "faction_base_modular_hub_field_0", "description": "Field Camp", "om_terrains": [ "field" ] },
{ "id": "faction_base_firestation_0", "description": "Firestation Base", "om_terrains": [ "fire_station" ] },
{ "id": "faction_base_shelter_0", "description": "Evac Shelter Base", "om_terrains": [ "shelter" ] },
{ "id": "faction_base_shelter_1_0", "description": "Evac Shelter Base", "om_terrains": [ "shelter_1" ] }
{ "id": "faction_base_shelter_0", "description": "Evac Shelter Base", "om_terrains": [ "shelter_vandal" ] },
{ "id": "faction_base_shelter_1_0", "description": "Evac Shelter Base", "om_terrains": [ "shelter_1" ] },
{ "id": "faction_base_shelter_1_0", "description": "Evac Shelter Base", "om_terrains": [ "shelter_1_vandal" ] }
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Evacuee",
"points": 0,
"description": "You have survived the initial wave of panic, and have achieved (relative) safety in one of the many government evac shelters.",
"allowed_locs": [ "sloc_shelter" ],
"allowed_locs": [ "sloc_shelter", "sloc_shelter_vandalized" ],
"start_name": "Evac Shelter",
"flags": [ "CITY_START" ]
},
Expand Down
6 changes: 6 additions & 0 deletions data/json/start_locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"name": "Shelter",
"terrain": [ "shelter", "shelter_1", "shelter_2" ]
},
{
"type": "start_location",
"id": "sloc_shelter_vandalized",
"name": "Shelter (Vandalized)",
"terrain": [ "shelter_vandal", "shelter_1_vandal", "shelter_2_vandal" ]
},
{
"type": "start_location",
"id": "sloc_refugee_center",
Expand Down

0 comments on commit 5738946

Please sign in to comment.