From ccfa9be089c5d56952dd03f0709384315aac4daf Mon Sep 17 00:00:00 2001 From: PatrikLundell Date: Sat, 18 May 2024 14:39:16 +0200 Subject: [PATCH] explicit roofs on canteen 1 --- .../version_1/modular_canteen_common.json | 25 +- .../modular_canteen_construction.json | 310 +++++++++++++++++- .../version_1/modular_canteen_palettes.json | 34 +- src/recipe.cpp | 2 +- 4 files changed, 341 insertions(+), 30 deletions(-) diff --git a/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_common.json b/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_common.json index 4339afa05ea8c..d4b1c9a1f246e 100644 --- a/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_common.json +++ b/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_common.json @@ -17,9 +17,11 @@ "method": "json", "object": { "set": [ - { "point": "furniture", "id": "f_fireplace", "x": 11, "y": 8 }, - { "point": "furniture", "id": "f_fireplace", "x": 13, "y": 8 }, - { "point": "furniture", "id": "f_counter", "x": 10, "y": 8 } + { "point": "furniture", "id": "f_fireplace", "x": 11, "y": 8, "z": 0 }, + { "point": "furniture", "id": "f_chimney", "x": 11, "y": 8, "z": 1 }, + { "point": "furniture", "id": "f_fireplace", "x": 13, "y": 8, "z": 0 }, + { "point": "furniture", "id": "f_chimney", "x": 13, "y": 8, "z": 1 }, + { "point": "furniture", "id": "f_counter", "x": 10, "y": 8, "z": 0 } ], "place_loot": [ { "item": "pot", "x": 10, "y": 8 } ] } @@ -30,9 +32,11 @@ "method": "json", "object": { "set": [ - { "point": "furniture", "id": "f_woodstove", "x": 11, "y": 8 }, - { "point": "furniture", "id": "f_woodstove", "x": 13, "y": 8 }, - { "point": "furniture", "id": "f_counter", "x": 10, "y": 8 } + { "point": "furniture", "id": "f_woodstove", "x": 11, "y": 8, "z": 0 }, + { "point": "furniture", "id": "f_vent_pipe", "x": 11, "y": 8, "z": 1 }, + { "point": "furniture", "id": "f_woodstove", "x": 13, "y": 8, "z": 0 }, + { "point": "furniture", "id": "f_vent_pipe", "x": 13, "y": 8, "z": 1 }, + { "point": "furniture", "id": "f_counter", "x": 10, "y": 8, "z": 0 } ], "place_loot": [ { "item": "pot", "x": 10, "y": 8 }, { "item": "pan", "x": 10, "y": 8 } ] } @@ -78,10 +82,11 @@ "method": "json", "object": { "set": [ - { "point": "furniture", "id": "f_smoking_rack", "x": 17, "y": 8 }, - { "point": "furniture", "id": "f_smoking_rack", "x": 18, "y": 8 }, - { "point": "furniture", "id": "f_smoking_rack", "x": 19, "y": 8 }, - { "point": "furniture", "id": "f_kiln_empty", "x": 19, "y": 12 } + { "point": "furniture", "id": "f_smoking_rack", "x": 17, "y": 8, "z": 0 }, + { "point": "furniture", "id": "f_smoking_rack", "x": 18, "y": 8, "z": 0 }, + { "point": "furniture", "id": "f_smoking_rack", "x": 19, "y": 8, "z": 0 }, + { "point": "furniture", "id": "f_kiln_empty", "x": 19, "y": 12, "z": 0 }, + { "point": "furniture", "id": "f_chimney", "x": 19, "y": 12, "z": 1 } ] } }, diff --git a/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_construction.json b/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_construction.json index 381b3112827c6..4c75b7dcf2284 100644 --- a/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_construction.json +++ b/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_construction.json @@ -33,14 +33,55 @@ " " ], "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], - "palettes": [ { "param": "fbmk_construction_palette" }, "fbmk_common_palette" ] + "palettes": [ { "param": "fbmk_construction_palette" } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmk_kitchen_room_roof_construction", + "object": { + "parameters": { + "fbmk_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmk_concrete_palette", + "fbmk_log_palette", + "fbmk_metal_palette", + "fbmk_migo_resin_palette", + "fbmk_rammed_earth_palette", + "fbmk_rock_palette", + "fbmk_wad_palette", + "fbmk_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + " ", + " ", + " ", + " " + ], + "palettes": [ { "param": "fbmk_construction_palette" } ] } }, { "type": "mapgen", "update_mapgen_id": "faction_base_canteen_construction", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmk_kitchen_room_construction" ], "x": 9, "y": 7 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmk_kitchen_room_construction" ], "x": 9, "y": 7, "z": 0 }, + { "chunks": [ "fbmk_kitchen_room_roof_construction" ], "x": 9, "y": 7, "z": 1 } + ] + } }, { "type": "mapgen", @@ -76,14 +117,55 @@ "wwwdwww" ], "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], - "palettes": [ { "param": "fbmk_construction_palette" }, "fbmk_common_palette" ] + "palettes": [ { "param": "fbmk_construction_palette" } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmk_kitchen_room2_roof_construction", + "object": { + "parameters": { + "fbmk_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmk_concrete_palette", + "fbmk_log_palette", + "fbmk_metal_palette", + "fbmk_migo_resin_palette", + "fbmk_rammed_earth_palette", + "fbmk_rock_palette", + "fbmk_wad_palette", + "fbmk_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + " ", + " ", + " ", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR" + ], + "palettes": [ { "param": "fbmk_construction_palette" } ] } }, { "type": "mapgen", "update_mapgen_id": "faction_base_canteen2_construction", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmk_kitchen_room2_construction" ], "x": 9, "y": 7 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmk_kitchen_room2_construction" ], "x": 9, "y": 7, "z": 0 }, + { "chunks": [ "fbmk_kitchen_room2_roof_construction" ], "x": 9, "y": 7, "z": 1 } + ] + } }, { "type": "mapgen", @@ -122,11 +204,52 @@ "palettes": [ { "param": "fbmk_construction_palette" }, "fbmk_common_palette" ] } }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmk_canteen_smoking_area_roof_construction", + "object": { + "parameters": { + "fbmk_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmk_concrete_palette", + "fbmk_log_palette", + "fbmk_metal_palette", + "fbmk_migo_resin_palette", + "fbmk_rammed_earth_palette", + "fbmk_rock_palette", + "fbmk_wad_palette", + "fbmk_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "RRRR ", + "RRRR ", + "RRRR ", + "RRRR ", + "RRRR ", + "RRRR ", + "RRRR " + ], + "palettes": [ { "param": "fbmk_construction_palette" } ] + } + }, { "type": "mapgen", "update_mapgen_id": "faction_base_smoking_area_construction", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmk_canteen_smoking_area_construction" ], "x": 16, "y": 7 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmk_canteen_smoking_area_construction" ], "x": 16, "y": 7, "z": 0 }, + { "chunks": [ "fbmk_canteen_smoking_area_roof_construction" ], "x": 16, "y": 7, "z": 1 } + ] + } }, { "type": "mapgen", @@ -162,14 +285,55 @@ "wwwwww " ], "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], - "palettes": [ { "param": "fbmk_construction_palette" }, "fbmk_common_palette" ] + "palettes": [ { "param": "fbmk_construction_palette" } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmk_canteen_pantry_roof_construction", + "object": { + "parameters": { + "fbmk_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmk_concrete_palette", + "fbmk_log_palette", + "fbmk_metal_palette", + "fbmk_migo_resin_palette", + "fbmk_rammed_earth_palette", + "fbmk_rock_palette", + "fbmk_wad_palette", + "fbmk_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "RRRRRR ", + "RRRRRR ", + "RRRRRR ", + "RRRRRR ", + "RRRRRR ", + "RRRRRR ", + "RRRRRR " + ], + "palettes": [ { "param": "fbmk_construction_palette" } ] } }, { "type": "mapgen", "update_mapgen_id": "fbmk_canteen_pantry_construction", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmk_canteen_pantry_construction" ], "x": 3, "y": 7 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmk_canteen_pantry_construction" ], "x": 3, "y": 7, "z": 0 }, + { "chunks": [ "fbmk_canteen_pantry_roof_construction" ], "x": 3, "y": 7, "z": 1 } + ] + } }, { "type": "mapgen", @@ -208,11 +372,53 @@ "palettes": [ { "param": "fbmk_construction_palette" }, "fbmk_common_palette" ] } }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmk_canteen_dining_west_roof_construction", + "object": { + "parameters": { + "fbmk_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmk_concrete_palette", + "fbmk_log_palette", + "fbmk_metal_palette", + "fbmk_migo_resin_palette", + "fbmk_rammed_earth_palette", + "fbmk_rock_palette", + "fbmk_wad_palette", + "fbmk_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + " RRR", + " RRR", + " RRR", + " RRR", + " RRR", + " RRR", + " RR" + ], + "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], + "palettes": [ { "param": "fbmk_construction_palette" } ] + } + }, { "type": "mapgen", "update_mapgen_id": "fbmk_canteen_dining_west_construction", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmk_canteen_dining_west_construction" ], "x": 3, "y": 14 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmk_canteen_dining_west_construction" ], "x": 3, "y": 14, "z": 0 }, + { "chunks": [ "fbmk_canteen_dining_west_roof_construction" ], "x": 3, "y": 14, "z": 1 } + ] + } }, { "type": "mapgen", @@ -251,11 +457,52 @@ "palettes": [ { "param": "fbmk_construction_palette" }, "fbmk_common_palette" ] } }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmk_canteen_dining_east_roof_construction", + "object": { + "parameters": { + "fbmk_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmk_concrete_palette", + "fbmk_log_palette", + "fbmk_metal_palette", + "fbmk_migo_resin_palette", + "fbmk_rammed_earth_palette", + "fbmk_rock_palette", + "fbmk_wad_palette", + "fbmk_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "RRRR ", + "RRRR ", + "RRRR ", + "RRRR ", + "RRRR ", + "RRRR ", + "RRR " + ], + "palettes": [ { "param": "fbmk_construction_palette" } ] + } + }, { "type": "mapgen", "update_mapgen_id": "fbmk_canteen_dining_east_construction", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmk_canteen_dining_east_construction" ], "x": 14, "y": 14 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmk_canteen_dining_east_construction" ], "x": 14, "y": 14, "z": 0 }, + { "chunks": [ "fbmk_canteen_dining_east_roof_construction" ], "x": 14, "y": 14, "z": 1 } + ] + } }, { "type": "mapgen", @@ -291,13 +538,54 @@ " owdw " ], "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], - "palettes": [ { "param": "fbmk_construction_palette" }, "fbmk_common_palette" ] + "palettes": [ { "param": "fbmk_construction_palette" } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmk_canteen_dining_center_roof_construction", + "object": { + "parameters": { + "fbmk_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmk_concrete_palette", + "fbmk_log_palette", + "fbmk_metal_palette", + "fbmk_migo_resin_palette", + "fbmk_rammed_earth_palette", + "fbmk_rock_palette", + "fbmk_wad_palette", + "fbmk_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + " RRRR ", + " RRRR ", + " RRRR ", + " RRRR ", + " RRRR ", + " RRRR ", + " RRRR " + ], + "palettes": [ { "param": "fbmk_construction_palette" } ] } }, { "type": "mapgen", "update_mapgen_id": "fbmk_canteen_dining_center_construction", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmk_canteen_dining_center_construction" ], "x": 8, "y": 14 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmk_canteen_dining_center_construction" ], "x": 8, "y": 14, "z": 0 }, + { "chunks": [ "fbmk_canteen_dining_center_roof_construction" ], "x": 8, "y": 14, "z": 1 } + ] + } } ] diff --git a/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_palettes.json b/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_palettes.json index 5ee3fc5bc26d4..2d34d222e67f8 100644 --- a/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_palettes.json +++ b/data/json/mapgen/basecamps/expansion/modular_canteen/version_1/modular_canteen_palettes.json @@ -19,49 +19,67 @@ { "type": "palette", "id": "fbmk_concrete_palette", - "terrain": { ".": "t_thconc_floor", "d": "t_door_metal_c", "o": "t_window_no_curtains", "w": "t_sconc_wall" }, + "terrain": { + ".": "t_thconc_floor", + "d": "t_door_metal_c", + "o": "t_window_no_curtains", + "R": "t_concrete_roof", + "w": "t_sconc_wall" + }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } }, { "type": "palette", "id": "fbmk_log_palette", - "terrain": { ".": "t_floor", "d": "t_door_c", "o": "t_window_no_curtains", "w": "t_wall_log" }, + "terrain": { ".": "t_floor", "d": "t_door_c", "o": "t_window_no_curtains", "R": "t_wood_treated_roof", "w": "t_wall_log" }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } }, { "type": "palette", "id": "fbmk_metal_palette", - "terrain": { ".": "t_floor", "d": "t_door_metal_c", "o": "t_window_no_curtains", "w": "t_junk_wall" }, + "terrain": { ".": "t_floor", "d": "t_door_metal_c", "o": "t_window_no_curtains", "R": "t_metal_flat_roof", "w": "t_junk_wall" }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } }, { "type": "palette", "id": "fbmk_migo_resin_palette", - "terrain": { ".": "t_floor_resin", "d": "t_resin_hole_c", "o": "t_wall_resin_cage", "w": "t_wall_resin" }, + "terrain": { ".": "t_floor_resin", "d": "t_resin_hole_c", "o": "t_wall_resin_cage", "R": "t_resin_roof", "w": "t_wall_resin" }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } }, { "type": "palette", "id": "fbmk_rammed_earth_palette", - "terrain": { ".": "t_dirtfloor", "d": "t_door_makeshift_c", "o": "t_window_empty", "w": "t_wall_rammed_earth" }, + "terrain": { + ".": "t_dirtfloor", + "d": "t_door_makeshift_c", + "o": "t_window_empty", + "R": "t_log_sod_roof", + "w": "t_wall_rammed_earth" + }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } }, { "type": "palette", "id": "fbmk_rock_palette", - "terrain": { ".": "t_floor", "d": "t_door_c", "o": "t_window_no_curtains", "w": "t_rock_wall" }, + "terrain": { ".": "t_floor", "d": "t_door_c", "o": "t_window_no_curtains", "R": "t_wood_treated_roof", "w": "t_rock_wall" }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } }, { "type": "palette", "id": "fbmk_wad_palette", - "terrain": { ".": "t_dirtfloor", "d": "t_door_makeshift_c", "o": "t_wall_wattle_half", "w": "t_wall_wattle" }, + "terrain": { + ".": "t_dirtfloor", + "d": "t_door_makeshift_c", + "o": "t_wall_wattle_half", + "R": "t_log_sod_roof", + "w": "t_wall_wattle" + }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } }, { "type": "palette", "id": "fbmk_wood_palette", - "terrain": { ".": "t_floor", "d": "t_door_c", "o": "t_window_no_curtains", "w": "t_wall_wood" }, + "terrain": { ".": "t_floor", "d": "t_door_c", "o": "t_window_no_curtains", "R": "t_wood_treated_roof", "w": "t_wall_wood" }, "furniture": { ".": "f_clear", "d": "f_clear", "o": "f_clear", "w": "f_clear" } } ] diff --git a/src/recipe.cpp b/src/recipe.cpp index 811ef985458b7..a2515db29da86 100644 --- a/src/recipe.cpp +++ b/src/recipe.cpp @@ -478,7 +478,7 @@ static cata::value_ptr calculate_all_blueprint_reqs( const std::vector> &funcs = id->funcs(); if( funcs.size() != 1 ) { debugmsg( "update_mapgen %s used for blueprint, but has %zu versions, where it should have exactly one", - funcs.size() ); + id.c_str(), funcs.size() ); return result; }