Skip to content

Commit

Permalink
Made carpets deconstructable, added different carpet terrains for dif…
Browse files Browse the repository at this point in the history
…ferent floor types (#41496)

* Carpet variants for different flooring

Added carpet variants for metal flooring and concrete flooring

* Added ter_set for specific types

* Added deconstruct

* Added deconstruction option in construction menu

* Fixed typos

* New carpet terrains to mapgen and palletes

* Made use of copy_from

* Update construction.json

* Big fix to line encoding

* Fixed typo T-T

* Found how carpets can be deconstructed. fixed everything to work

* Linted

* Fixed not setting proper floor after bashing

* Made carpets easy deconstructs and removed flammabel from carpets on metal

* Lint

* Type; "count" -> "charges"
  • Loading branch information
Medecube committed Jun 26, 2020
1 parent d668569 commit 55df0e4
Show file tree
Hide file tree
Showing 24 changed files with 361 additions and 265 deletions.
11 changes: 0 additions & 11 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -2435,17 +2435,6 @@
"pre_flags": "CHIP",
"post_terrain": "t_wall"
},
{
"type": "construction",
"id": "constr_revert_carpet",
"description": "Remove Carpet",
"category": "DECORATE",
"required_skills": [ [ "fabrication", 0 ] ],
"time": "10 m",
"qualities": [ [ { "id": "HAMMER", "level": 2 } ] ],
"pre_flags": "RUG",
"post_terrain": "t_floor"
},
{
"type": "construction",
"id": "constr_carpet_red",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,125 +386,215 @@
},
{
"type": "terrain",
"id": "t_carpet_concrete",
"name": "industrial carpet",
"description": "Firm, low-pile, high-durability carpet in a neutral gray color, for laying down on bare concrete.",
"id": "t_carpet_base",
"name": "carpet",
"description": "Base carpet!",
"symbol": ".",
"color": "light_gray",
"looks_like": "t_carpet_red",
"color": "red",
"move_cost": 2,
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ],
"roof": "t_flat_roof",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"bash": {
"sound": "SMASH!",
"ter_set": "t_null",
"str_min": 100,
"str_max": 400,
"str_min_supported": 150,
"items": [
{ "item": "rock", "count": [ 5, 10 ] },
{ "item": "scrap", "count": [ 5, 8 ] },
{ "item": "rebar", "count": [ 0, 2 ] }
]
}
},
{
"type": "terrain",
"id": "t_carpet_metal",
"name": "bunker carpet",
"description": "Firm, low-pile, totally non-flammable carpet in a neutral cream color, with an insulation layer beneath.",
"symbol": ".",
"color": "white",
"looks_like": "t_carpet_yellow",
"move_cost": 2,
"flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ],
"bash": {
"sound": "thump",
"ter_set": "t_null",
"str_min": 200,
"str_max": 500,
"str_min_supported": 200,
"items": [
{ "item": "steel_lump", "count": [ 1, 4 ] },
{ "item": "steel_chunk", "count": [ 3, 12 ] },
{ "item": "scrap", "count": [ 9, 36 ] }
]
}
"ter_set": "t_floor",
"str_min": 5,
"str_max": 15,
"str_min_supported": 100,
"items": [ { "item": "rag", "count": [ 10, 20 ] }, { "item": "nail", "charges": [ 1, 3 ] } ]
},
"deconstruct": { "items": [ { "item": "r_carpet", "count": 1 }, { "item": "nail", "count": [ 2, 5 ] } ], "ter_set": "t_floor" }
},
{
"type": "terrain",
"id": "t_carpet_red",
"name": "red carpet",
"description": "Soft red carpet.",
"copy-from": "t_carpet_base",
"name": "carpet",
"symbol": ".",
"color": "red",
"move_cost": 2,
"roof": "t_flat_roof",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ],
"bash": {
"sound": "SMASH!",
"ter_set": "t_null",
"str_min": 50,
"str_max": 400,
"str_min_supported": 100,
"items": [ { "item": "splinter", "count": [ 2, 8 ] }, { "item": "nail", "charges": [ 6, 13 ] } ]
}
"description": "Soft red carpet.",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "ter_set": "t_floor", "items": [ { "item": "r_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ] }
},
{
"type": "terrain",
"id": "t_carpet_yellow",
"copy-from": "t_carpet_base",
"name": "yellow carpet",
"description": "Soft yellow carpet.",
"symbol": ".",
"color": "yellow",
"move_cost": 2,
"roof": "t_flat_roof",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ],
"bash": {
"sound": "SMASH!",
"ter_set": "t_null",
"str_min": 50,
"str_max": 400,
"str_min_supported": 100,
"items": [ { "item": "splinter", "count": [ 2, 8 ] }, { "item": "nail", "charges": [ 6, 13 ] } ]
}
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "y_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_floor" }
},
{
"type": "terrain",
"id": "t_carpet_green",
"copy-from": "t_carpet_base",
"name": "green carpet",
"description": "Soft green carpet.",
"symbol": ".",
"color": "green",
"move_cost": 2,
"roof": "t_flat_roof",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ],
"bash": {
"sound": "SMASH!",
"ter_set": "t_null",
"str_min": 50,
"str_max": 400,
"str_min_supported": 100,
"items": [ { "item": "splinter", "count": [ 2, 8 ] }, { "item": "nail", "charges": [ 6, 13 ] } ]
}
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "g_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_floor" }
},
{
"type": "terrain",
"id": "t_carpet_purple",
"copy-from": "t_carpet_base",
"name": "purple carpet",
"description": "Soft purple carpet.",
"symbol": ".",
"color": "magenta",
"move_cost": 2,
"roof": "t_flat_roof",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ],
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "p_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_floor" }
},
{
"type": "terrain",
"id": "t_carpet_base_concrete",
"name": "Carpet",
"symbol": ".",
"color": "red",
"move_cost": 2,
"copy-from": "t_carpet_base",
"description": "Base concrete carpet!",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"bash": {
"sound": "SMASH!",
"ter_set": "t_null",
"str_min": 50,
"str_max": 400,
"ter_set": "t_thconc_floor",
"str_min": 5,
"str_max": 15,
"str_min_supported": 100,
"items": [ { "item": "splinter", "count": [ 2, 8 ] }, { "item": "nail", "charges": [ 6, 13 ] } ]
}
"items": [ { "item": "rag", "count": [ 10, 20 ] }, { "item": "nail", "charges": [ 1, 3 ] } ]
},
"deconstruct": { "items": [ { "item": "r_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_thconc_floor" }
},
{
"type": "terrain",
"id": "t_carpet_concrete_red",
"copy-from": "t_carpet_base_concrete",
"name": "industrial red carpet",
"alias": "t_carpet_concrete",
"symbol": ".",
"color": "red",
"move_cost": 2,
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"description": "Firm, low-pile, high-durability carpet in a red color, for laying down on bare concrete."
},
{
"type": "terrain",
"id": "t_carpet_concrete_yellow",
"copy-from": "t_carpet_base_concrete",
"name": "industrial yellow carpet",
"description": "Firm, low-pile, high-durability carpet in a yellow color, for laying down on bare concrete.",
"symbol": ".",
"color": "yellow",
"move_cost": 2,
"looks_like": "t_carpet_yellow",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "y_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_thconc_floor" }
},
{
"type": "terrain",
"id": "t_carpet_concrete_green",
"copy-from": "t_carpet_base_concrete",
"name": "industrial green carpet",
"description": "Firm, low-pile, high-durability carpet in a green color, for laying down on bare concrete.",
"symbol": ".",
"color": "green",
"move_cost": 2,
"looks_like": "t_carpet_green",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "g_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_thconc_floor" }
},
{
"type": "terrain",
"id": "t_carpet_concrete_purple",
"copy-from": "t_carpet_base_concrete",
"name": "industrial purple carpet",
"description": "Firm, low-pile, high-durability carpet in a purple color, for laying down on bare concrete.",
"symbol": ".",
"color": "magenta",
"move_cost": 2,
"looks_like": "t_carpet_purple",
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "p_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_thconc_floor" }
},
{
"type": "terrain",
"id": "t_carpet_base_metal",
"name": "carpet",
"copy-from": "t_carpet_base",
"description": "Base metal carpet!",
"symbol": ".",
"color": "red",
"move_cost": 2,
"flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"bash": {
"sound": "SMASH!",
"ter_set": "t_metal_floor",
"str_min": 5,
"str_max": 15,
"str_min_supported": 100,
"items": [ { "item": "rag", "count": [ 10, 20 ] }, { "item": "nail", "charges": [ 1, 3 ] } ]
},
"deconstruct": { "items": [ { "item": "r_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_metal_floor" }
},
{
"type": "terrain",
"id": "t_carpet_metal_red",
"copy-from": "t_carpet_base_metal",
"name": "bunker red carpet",
"symbol": ".",
"color": "red",
"move_cost": 2,
"description": "Firm, low-pile, totally non-flammable carpet in a red color, with an insulation layer beneath.",
"flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "r_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_metal_floor" }
},
{
"type": "terrain",
"id": "t_carpet_metal_yellow",
"copy-from": "t_carpet_base_metal",
"name": "bunker yellow carpet",
"alias": "t_carpet_metal",
"description": "Firm, low-pile, totally non-flammable carpet in a yellow color, with an insulation layer beneath.",
"symbol": ".",
"color": "yellow",
"move_cost": 2,
"looks_like": "t_carpet_yellow",
"flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "y_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_metal_floor" }
},
{
"type": "terrain",
"id": "t_carpet_metal_green",
"copy-from": "t_carpet_base_metal",
"name": "bunker green carpet",
"description": "Firm, low-pile, totally non-flammable carpet in a green color, with an insulation layer beneath.",
"symbol": ".",
"color": "green",
"move_cost": 2,
"looks_like": "t_carpet_green",
"flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "g_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_metal_floor" }
},
{
"type": "terrain",
"id": "t_carpet_metal_purple",
"copy-from": "t_carpet_base_metal",
"name": "bunker carpet purple",
"description": "Firm, low-pile, totally non-flammable carpet in a purple color, with an insulation layer beneath.",
"symbol": ".",
"color": "magenta",
"move_cost": 2,
"looks_like": "t_carpet_purple",
"flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG", "EASY_DECONSTRUCT" ],
"deconstruct": { "items": [ { "item": "p_carpet", "charges": 1 }, { "item": "nail", "charges": 5 } ], "ter_set": "t_metal_floor" }
},
{
"type": "terrain",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"type": "mapgen",
"weight": 250,
"object": {
"fill_ter": "t_carpet_green",
"fill_ter": "t_carpet_concrete_green",
"rows": [
"________________________________________________",
"________________________________________________",
Expand Down Expand Up @@ -338,8 +338,8 @@
"palettes": [ "standard_domestic_palette" ],
"liquids": { ")": { "liquid": "water", "amount": [ 0, 1000 ] } },
"terrain": {
"=": "t_carpet_green",
" ": "t_carpet_green",
"=": "t_carpet_concrete_green",
" ": "t_carpet_concrete_green",
"_": "t_open_air",
"`": "t_gutter_north",
"/": "t_gutter_drop",
Expand Down
20 changes: 10 additions & 10 deletions data/json/mapgen/city_blocks/urban_14_dense_house_mart_food.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"palettes": [ "standard_domestic_palette" ],
"terrain": {
"%": "t_rock",
"=": "t_carpet_yellow",
"I": "t_carpet_yellow",
"h": "t_carpet_yellow",
"s": "t_carpet_yellow",
"y": "t_carpet_yellow",
"E": "t_carpet_yellow",
"T": "t_carpet_yellow",
"d": "t_carpet_yellow",
"@": "t_carpet_yellow",
"=": "t_carpet_concrete_yellow",
"I": "t_carpet_concrete_yellow",
"h": "t_carpet_concrete_yellow",
"s": "t_carpet_concrete_yellow",
"y": "t_carpet_concrete_yellow",
"E": "t_carpet_concrete_yellow",
"T": "t_carpet_concrete_yellow",
"d": "t_carpet_concrete_yellow",
"@": "t_carpet_concrete_yellow",
"~": "t_dirtfloor",
"$": "t_sai_box",
":": "t_wall_glass",
Expand Down Expand Up @@ -103,7 +103,7 @@
"F": "t_concrete",
"a": "t_window_bars_domestic",
"b": "t_door_metal_pickable",
"=": "t_carpet_yellow",
"=": "t_carpet_concrete_yellow",
"_": "t_pavement",
"[": "t_pavement",
"(": "t_pavement",
Expand Down
2 changes: 1 addition & 1 deletion data/json/mapgen/homeless_shelter.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"i": "t_ladder_up",
"!": "t_ladder_down",
"z": "t_flat_roof",
"_": "t_carpet_red",
"_": "t_carpet_concrete_red",
"3": "t_concrete",
"L": "t_thconc_floor",
"R": "t_thconc_floor",
Expand Down
4 changes: 2 additions & 2 deletions data/json/mapgen/house/house_garage_prepper.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"om_terrain": [ "house_prepper2" ],
"weight": 100,
"object": {
"fill_ter": "t_carpet_red",
"fill_ter": "t_carpet_concrete_red",
"rows": [
"..%%%%```%%%%p```````...",
".##$$##*##$$##=======##.",
Expand Down Expand Up @@ -41,7 +41,7 @@
"=": "t_door_metal_locked",
"&": "t_gates_control_brick",
"~": "t_thconc_floor",
" ": "t_carpet_red",
" ": "t_carpet_concrete_red",
"`": "t_concrete",
"q": "t_thconc_floor",
"W": "t_thconc_floor",
Expand Down
Loading

0 comments on commit 55df0e4

Please sign in to comment.