Skip to content

Commit

Permalink
Flagpoles and hoisting flags (CleverRaven#61551)
Browse files Browse the repository at this point in the history
* allow for sub-variants and offset in layer variants/contexts

* add flagpole furniture to place a flag on

* document the new layering JSON parameters for offset

* add a constructable wooden flagpole

* add flagpoles to police stations and dept, add wooden version to farm houses and shooting range

* add flagpoles to some more buildings, fix description

* change back traffic light color; change was accidential

* fix school palette

* fix clang-tidy complains by using a point object for the offset

* add furnitrue IDs for flagpoles

* add digging, smash to chunks instead of pipes, mix in other flags
  • Loading branch information
mlange-42 authored Oct 11, 2022
1 parent c12b0ce commit 61572ad
Show file tree
Hide file tree
Showing 21 changed files with 255 additions and 90 deletions.
17 changes: 17 additions & 0 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -6769,6 +6769,23 @@
"pre_terrain": "f_hay",
"post_terrain": "f_archery_target_bale"
},
{
"type": "construction",
"id": "constr_wooden_flagpole",
"group": "build_flagpole",
"category": "CONSTRUCT",
"time": "30 m",
"required_skills": [ [ "fabrication", 0 ] ],
"qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "DIG", "level": 1 } ] ],
"components": [
[ [ "long_pole", 2 ] ],
[ [ "rope_makeshift_6", 3 ], [ "rope_6", 3 ], [ "vine_6", 3 ] ],
[ [ "nail", 6 ], [ "string_36", 2 ], [ "cordage_36", 2 ] ]
],
"pre_flags": "DIGGABLE",
"pre_special": "check_empty",
"post_terrain": "f_wooden_flagpole"
},
{
"type": "construction",
"id": "constr_clayoven",
Expand Down
5 changes: 5 additions & 0 deletions data/json/construction_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -1649,6 +1649,11 @@
"id": "build_archery_target_bale",
"name": "Mark Hay Bale For Archery"
},
{
"type": "construction_group",
"id": "build_flagpole",
"name": "Build a Flagpole"
},
{
"type": "construction_group",
"id": "build_clay_oven",
Expand Down
56 changes: 53 additions & 3 deletions data/json/furniture_and_terrain/furniture-terrains.json
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@
"color": "light_gray",
"move_cost_mod": -1,
"coverage": 40,
"required_str": 32,
"required_str": -1,
"rotates_to": "PAVEMENT",
"flags": [ "TRANSPARENT", "NO_SELF_CONNECT" ],
"bash": {
Expand Down Expand Up @@ -891,7 +891,7 @@
"color": "white",
"move_cost_mod": -1,
"coverage": 40,
"required_str": 32,
"required_str": -1,
"rotates_to": "PAVEMENT",
"flags": [ "TRANSPARENT", "NO_SELF_CONNECT" ],
"bash": {
Expand All @@ -909,6 +909,56 @@
]
}
},
{
"type": "furniture",
"id": "f_flagpole",
"name": "flagpole",
"description": "A 6m high metal flagpole. You could hoist up a flag here.",
"symbol": "F",
"color": "light_gray",
"move_cost_mod": -1,
"coverage": 40,
"required_str": -1,
"flags": [ "TRANSPARENT", "PLACE_ITEM" ],
"max_volume": "2 L",
"bash": {
"str_min": 30,
"str_max": 100,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "steel_chunk", "count": [ 6, 15 ] },
{ "item": "scrap", "count": [ 5, 20 ] },
{ "item": "rope_6", "count": [ 1, 3 ] }
]
}
},
{
"type": "furniture",
"id": "f_wooden_flagpole",
"name": "flagpole",
"description": "A 5m high wooden flagpole. You could hoist up a flag here.",
"looks_like": "f_flagpole",
"symbol": "F",
"color": "brown",
"move_cost_mod": -1,
"coverage": 40,
"required_str": -1,
"flags": [ "TRANSPARENT", "PLACE_ITEM" ],
"max_volume": "2 L",
"bash": {
"str_min": 15,
"str_max": 50,
"sound": "crunch!",
"sound_fail": "whack!",
"items": [
{ "item": "stick_long", "count": [ 3, 6 ] },
{ "item": "splinter", "count": [ 10, 20 ] },
{ "item": "rope_6", "count": [ 0, 2 ] },
{ "item": "string_6", "count": [ 0, 1 ] }
]
}
},
{
"type": "furniture",
"id": "f_utility_pole",
Expand All @@ -918,7 +968,7 @@
"color": "brown",
"move_cost_mod": -1,
"coverage": 40,
"required_str": 26,
"required_str": -1,
"bash": {
"str_min": 20,
"str_max": 100,
Expand Down
20 changes: 12 additions & 8 deletions data/json/mapgen/farm_tiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -1186,13 +1186,14 @@
".....os @@| | Io.",
".....#E h + + T##.",
".....###III#######oo##..",
".......#ooo#^...........",
".......#ooo#^........../",
"........................",
"........................",
"........................"
],
"palettes": [ { "distribution": [ [ "standard_domestic_palette", 10 ], [ "standard_domestic_palette_abandoned", 2 ] ] } ],
"terrain": { "#": "t_wall_log", "-": "t_concrete" },
"terrain": { "#": "t_wall_log", "-": "t_concrete", "/": "t_region_groundcover_urban" },
"furniture": { "/": "f_wooden_flagpole" },
"place_nested": [
{
"chunks": [
Expand Down Expand Up @@ -1240,13 +1241,14 @@
".....#@@ R| S|R l io.",
".....#d E |BB8|RHHHL##.",
".....###III#######o###..",
".......#ooo#^...........",
".......#ooo#^........../",
"........................",
"........................",
"........................"
],
"palettes": [ { "distribution": [ [ "standard_domestic_palette", 10 ], [ "standard_domestic_palette_abandoned", 2 ] ] } ],
"terrain": { "#": "t_wall_log", "-": "t_concrete", "Ŧ": "t_railing" },
"terrain": { "#": "t_wall_log", "-": "t_concrete", "Ŧ": "t_railing", "/": "t_region_groundcover_urban" },
"furniture": { "/": "f_wooden_flagpole" },
"place_nested": [
{
"chunks": [
Expand Down Expand Up @@ -1294,13 +1296,14 @@
".....o l hffh yo.",
".....#y T| ##.",
".....### a ######oo###..",
".......#####^...........",
".......#####^........../",
"........................",
"........................",
"........................"
],
"palettes": [ { "distribution": [ [ "standard_domestic_palette", 10 ], [ "standard_domestic_palette_abandoned", 2 ] ] } ],
"terrain": { "#": "t_wall_log", "-": "t_concrete", "Ŧ": "t_railing" },
"terrain": { "#": "t_wall_log", "-": "t_concrete", "Ŧ": "t_railing", "/": "t_region_groundcover_urban" },
"furniture": { "/": "f_wooden_flagpole" },
"place_nested": [
{
"chunks": [
Expand Down Expand Up @@ -1347,13 +1350,14 @@
".....oO 5 Io.",
".....#FY J T RRR y##.",
".....### ##oo###oo##..",
".......#ooo#^...........",
".......#ooo#^........../",
"........................",
"........................",
"........................"
],
"palettes": [ { "distribution": [ [ "standard_domestic_palette", 10 ], [ "standard_domestic_palette_abandoned", 2 ] ] } ],
"terrain": { "#": "t_wall_log", "-": "t_concrete", "Ŧ": "t_railing" },
"terrain": { "#": "t_wall_log", "-": "t_concrete", "Ŧ": "t_railing", "/": "t_region_groundcover_urban" },
"furniture": { "/": "f_wooden_flagpole" },
"place_nested": [
{
"chunks": [
Expand Down
33 changes: 26 additions & 7 deletions data/json/mapgen/gunsmith.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"object": {
"fill_ter": "t_thconc_floor",
"rows": [
"___________________'''''",
"___________________'''/'",
"___*___*___*___*___'''@'",
"___*___*___*___*___'''@'",
"___*___*___*___*___'''@'",
Expand All @@ -33,12 +33,19 @@
"'''''''''''''''ww'''''''"
],
"palettes": [ "gun_store_palette" ],
"terrain": { "V": "t_thconc_floor", "H": "t_thconc_floor", "u": "t_thconc_floor", ";": "t_thconc_floor", "w": "t_sidewalk" },
"terrain": {
"V": "t_thconc_floor",
"H": "t_thconc_floor",
"u": "t_thconc_floor",
";": "t_thconc_floor",
"w": "t_sidewalk",
"/": "t_sidewalk"
},
"set": [
{ "point": "terrain", "id": "t_tree_young", "x": 22, "y": [ 1, 4 ], "chance": 10, "repeat": [ 1, 3 ] },
{ "point": "terrain", "id": "t_tree_apple", "x": 22, "y": [ 1, 4 ], "chance": 30, "repeat": [ 1, 2 ] }
],
"furniture": { "V": "f_gunsafe_ml", "H": "f_locker", "U": "f_rack" },
"furniture": { "V": "f_gunsafe_ml", "H": "f_locker", "U": "f_rack", "/": "f_flagpole" },
"items": { "V": { "item": "ammo_reloaded", "chance": 80, "repeat": [ 10, 20 ] } },
"place_loot": [
{ "group": "tools_common", "x": [ 3, 6 ], "y": 15, "chance": 30, "repeat": [ 3, 6 ] },
Expand All @@ -49,7 +56,8 @@
{ "item": "press", "x": 6, "y": 18, "chance": 75 },
{ "item": "welder", "x": 7, "y": 15, "chance": 30 },
{ "item": "goggles_welding", "x": 7, "y": 15, "chance": 30 },
{ "group": "cash_register_random", "x": 14, "y": [ 10, 12 ] }
{ "group": "cash_register_random", "x": 14, "y": [ 10, 12 ] },
{ "item": "american_flag", "x": 22, "y": 0, "chance": 75 }
]
}
},
Expand Down Expand Up @@ -145,7 +153,7 @@
"object": {
"fill_ter": "t_thconc_floor",
"rows": [
"___________________'''''",
"___________________'''/'",
"___*___*___*___*___'''@'",
"___*___*___*___*___'''@'",
"___*___*___*___*___'''@'",
Expand All @@ -171,7 +179,15 @@
"'''''''''''''''ww'''''''"
],
"palettes": [ "gun_store_palette" ],
"terrain": { "V": "t_thconc_floor", "H": "t_thconc_floor", "u": "t_thconc_floor", ";": "t_thconc_floor", "w": "t_sidewalk" },
"terrain": {
"V": "t_thconc_floor",
"H": "t_thconc_floor",
"u": "t_thconc_floor",
";": "t_thconc_floor",
"w": "t_sidewalk",
"/": "t_sidewalk"
},
"furniture": { "/": "f_flagpole" },
"set": [
{ "point": "terrain", "id": "t_tree_young", "x": 22, "y": [ 1, 4 ], "chance": 10, "repeat": [ 1, 3 ] },
{ "point": "terrain", "id": "t_tree_apple", "x": 22, "y": [ 1, 4 ], "chance": 30, "repeat": [ 1, 2 ] }
Expand Down Expand Up @@ -199,7 +215,10 @@
"+": { "chunks": [ [ "destroyed_metal_door_nested", 90 ], [ "null", 75 ] ] },
"`": { "chunks": [ [ "corpse_blood_casings_1x1", 4 ], [ "null", 20 ] ] }
},
"place_loot": [ { "group": "cash_register_random_ransacked", "x": 14, "y": [ 10, 12 ] } ]
"place_loot": [
{ "group": "cash_register_random_ransacked", "x": 14, "y": [ 10, 12 ] },
{ "item": "american_flag", "x": 22, "y": 0, "chance": 75 }
]
}
}
]
15 changes: 11 additions & 4 deletions data/json/mapgen/house/house_detatched6.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[
{
"id": "flags_pride_and_other",
"type": "item_group",
"items": [ [ "pride_flag", 70 ], [ "american_flag", 20 ], [ "state_flag", 10 ] ]
},
{
"method": "json",
"om_terrain": "house_detatched6",
Expand All @@ -23,7 +28,7 @@
".#sHHHR #`````{=~=~=~=#.",
".###o####.....}=~===~=#.",
".$^...........#=~===~=#.",
".$.(((((&(&...}=~=~=~K#.",
".$.(((((&(&.§.}=~=~=~K#.",
".$.&&&&&&&&...}/==~=~=#.",
".$.((&(%(((...}//==G=K#.",
".$.&&&&&&&&...#}}}#}}}#.",
Expand Down Expand Up @@ -57,9 +62,10 @@
"{": "t_reinforced_door_glass_c",
"}": "t_reinforced_glass_shutter",
")": "t_wall_glass",
"]": "t_door_metal_pickable"
"]": "t_door_metal_pickable",
"§": "t_region_groundcover_urban"
},
"furniture": { "?": "f_beaded_door", "!": "f_region_flower", ",": "f_pinball_machine" },
"furniture": { "?": "f_beaded_door", "!": "f_region_flower", ",": "f_pinball_machine", "§": "f_wooden_flagpole" },
"place_item": [
{ "item": "television", "repeat": 1, "x": 4, "y": 4 },
{ "item": "cannabis", "repeat": 1, "x": 18, "y": 14 },
Expand All @@ -74,7 +80,8 @@
{ "chance": 35, "item": "tools_home", "x": 21, "y": 16 },
{ "chance": 50, "item": "stoner", "x": 4, "y": 11 },
{ "chance": 50, "item": "stoner", "x": 5, "y": [ 10, 11 ] },
{ "chance": 50, "item": "stoner", "x": 4, "y": 5 }
{ "chance": 50, "item": "stoner", "x": 4, "y": 5 },
{ "chance": 50, "item": "flags_pride_and_other", "x": 12, "y": 16 }
],
"sealed_item": {
"~": { "item": { "item": "seed_weed" }, "furniture": "f_planter_harvest" },
Expand Down
7 changes: 4 additions & 3 deletions data/json/mapgen/police_department.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@
"8": { "item": "SUS_kitchen_sink", "chance": 100 }
},
"furniture": {
"3": "f_flagpole",
"4": "f_cupboard",
"5": "f_cupboard",
"6": "f_cupboard",
Expand All @@ -425,7 +426,7 @@
"terrain": {
"1": "t_ramp_down_high",
"2": "t_ramp_down_low",
"3": "t_pillar",
"3": "t_region_groundcover_urban",
" ": "t_region_groundcover_urban",
"é": "t_region_groundcover_barren",
"*": "t_region_shrub_decorative",
Expand All @@ -448,8 +449,8 @@
{ "monster": "GROUP_ZOMBIE_PRISON", "x": [ 24, 41 ], "y": [ 33, 40 ], "density": 0.5 }
],
"place_item": [
{ "item": "american_flag", "x": 42, "y": 4 },
{ "item": "american_flag", "x": 33, "y": 4 },
{ "item": "american_flag", "x": 42, "y": 5 },
{ "item": "american_flag", "x": 33, "y": 5 },
{ "item": "g_shovel", "x": 40, "y": 37 },
{ "item": "mess_tray", "x": 26, "y": 39, "repeat": [ 1, 20 ] },
{ "item": "plastic_spoon", "x": 25, "y": 39, "repeat": [ 1, 20 ] },
Expand Down
Loading

0 comments on commit 61572ad

Please sign in to comment.