From c2ff431c91d3e08e2600985b14009b8b12e829eb Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Wed, 28 Sep 2022 13:18:47 +0200 Subject: [PATCH 01/19] implement asymmetric terrain and furniture connections --- src/map.cpp | 6 ++-- src/mapdata.cpp | 75 ++++++++++++++++++++++++++++++++++++++++++------- src/mapdata.h | 19 +++++++++---- 3 files changed, 81 insertions(+), 19 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 62901baf5d495..03a19704500c9 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1809,7 +1809,7 @@ uint8_t map::get_known_connections( const tripoint &p, int connect_group, if( may_connect ) { const ter_t &neighbour_terrain = neighbour_overridden ? neighbour_override->second.obj() : ter( neighbour ).obj(); - if( neighbour_terrain.connects_to( connect_group ) ) { + if( neighbour_terrain.in_connects_to( connect_group ) ) { val += 1 << i; } } @@ -1893,7 +1893,7 @@ uint8_t map::get_known_connections_f( const tripoint &p, int connect_group, if( may_connect ) { const furn_t &neighbour_furn = neighbour_overridden ? neighbour_override->second.obj() : furn( pt ).obj(); - if( neighbour_furn.connects_to( connect_group ) ) { + if( neighbour_furn.in_connects_to( connect_group ) ) { val += 1 << i; } } @@ -8560,7 +8560,7 @@ bool map::has_graffiti_at( const tripoint &p ) const int map::determine_wall_corner( const tripoint &p ) const { - int test_connect_group = ter( p ).obj().connect_group; + int test_connect_group = ter( p ).obj().connect_to_group; uint8_t connections = get_known_connections( p, test_connect_group ); // The bits in connections are SEWN, whereas the characters in LINE_ // constants are NESW, so we want values in 8 | 2 | 1 | 4 order. diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 66dd8fd6482ae..79b721d31ee80 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -629,7 +629,7 @@ void map_data_common_t::extraprocess_flags( const ter_furn_flag flag ) } // wall connection check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_WALL || flag == ter_furn_flag::TFLAG_CONNECT_TO_WALL ) { - set_connects( "WALL" ); + set_connects_with( "WALL" ); } // rotates_to check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_WINDOW || flag == ter_furn_flag::TFLAG_DOOR ) { @@ -658,11 +658,32 @@ void map_data_common_t::set_flag( const ter_furn_flag flag ) extraprocess_flags( flag ); } -void map_data_common_t::set_connects( const std::string &connect_group_string ) +void map_data_common_t::set_connects_to( const std::string &connect_group_string ) { const auto it = ter_connects_map.find( connect_group_string ); if( it != ter_connects_map.end() ) { - connect_group = it->second; + connect_to_group = it->second; + } else { // arbitrary connect groups are a bad idea for optimization reasons + debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); + } +} + +void map_data_common_t::set_connects_to_member( const std::string &connect_group_string ) +{ + const auto it = ter_connects_map.find( connect_group_string ); + if( it != ter_connects_map.end() ) { + connect_to_group_member = it->second; + } else { // arbitrary connect groups are a bad idea for optimization reasons + debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); + } +} + +void map_data_common_t::set_connects_with( const std::string &connect_group_string ) +{ + const auto it = ter_connects_map.find( connect_group_string ); + if( it != ter_connects_map.end() ) { + connect_to_group = it->second; + connect_to_group_member = it->second; } else { // arbitrary connect groups are a bad idea for optimization reasons debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); } @@ -690,8 +711,8 @@ void map_data_common_t::set_rotates_to_member( const std::string &towards_group_ bool map_data_common_t::connects( int &ret ) const { - if( connect_group != TERCONN_NONE ) { - ret = connect_group; + if( connect_to_group != TERCONN_NONE ) { + ret = connect_to_group; return true; } return false; @@ -1419,19 +1440,36 @@ void ter_t::load( const JsonObject &jo, const std::string &src ) trap = tr_null; transparent = false; - connect_group = TERCONN_NONE; + connect_to_group = TERCONN_NONE; + connect_to_group_member = TERCONN_NONE; rotate_to_group = TERCONN_NONE; rotate_to_group_member = TERCONN_NONE; for( auto &flag : jo.get_string_array( "flags" ) ) { set_flag( flag ); } - // connect_group is initialized to none, then terrain flags are set, then finally + // connect_to_group is initialized to none, then terrain flags are set, then finally // connections from JSON are set. This is so that wall flags can set wall connections // but can be overridden by explicit connections in JSON. + bool asymmetric_set = false; if( jo.has_member( "connects_to" ) ) { - set_connects( jo.get_string( "connects_to" ) ); + set_connects_to( jo.get_string( "connects_to" ) ); + asymmetric_set = true; + } + if( jo.has_member( "connects_to_member" ) ) { + set_connects_to_member( jo.get_string( "connects_to_member" ) ); + asymmetric_set = true; + } + if( jo.has_member( "connects_with" ) ) { + if( asymmetric_set ) { + debugmsg( "Can use only either 'connects_with', or 'connects_to' and 'connects_to_member' in %s!", + name_ ); + } else { + const std::string g = jo.get_string( "connects_with" ); + set_connects_with( g ); + } } + if( jo.has_member( "rotates_to" ) ) { set_rotates_to( jo.get_string( "rotates_to" ) ); } @@ -1597,16 +1635,33 @@ void furn_t::load( const JsonObject &jo, const std::string &src ) optional( jo, was_loaded, "light_emitted", light_emitted ); // see the comment in ter_id::load for connect_group handling - connect_group = TERCONN_NONE; + connect_to_group = TERCONN_NONE; + connect_to_group_member = TERCONN_NONE; rotate_to_group = TERCONN_NONE; rotate_to_group_member = TERCONN_NONE; for( auto &flag : jo.get_string_array( "flags" ) ) { set_flag( flag ); } + bool asymmetric_set = false; if( jo.has_member( "connects_to" ) ) { - set_connects( jo.get_string( "connects_to" ) ); + set_connects_to( jo.get_string( "connects_to" ) ); + asymmetric_set = true; + } + if( jo.has_member( "connects_to_member" ) ) { + set_connects_to_member( jo.get_string( "connects_to_member" ) ); + asymmetric_set = true; + } + if( jo.has_member( "connects_with" ) ) { + if( asymmetric_set ) { + debugmsg( "Can use only either 'connects_with', or 'connects_to' and 'connects_to_member' in %s!", + name_ ); + } else { + const std::string g = jo.get_string( "connects_with" ); + set_connects_with( g ); + } } + if( jo.has_member( "rotates_to" ) ) { set_rotates_to( jo.get_string( "rotates_to" ) ); } diff --git a/src/mapdata.h b/src/mapdata.h index c76033bd47818..ba959391dd42f 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -539,15 +539,22 @@ struct map_data_common_t { void set_flag( ter_furn_flag flag ); - // Terrain group to connects with; symmetric relation (i.e. both neighbours have the same value) - int connect_group = 0; + // Terrain group to connect to; not symmetric, target of active part + int connect_to_group = 0; + // Terrain group of this type, for others to connect to; not symmetric, passive part + int connect_to_group_member = 0; // Terrain group rotate towards; not symmetric, target of active part int rotate_to_group = 0; // Terrain group of this type, for others to rotate towards; not symmetric, passive part int rotate_to_group_member = 0; - // Set connection group - void set_connects( const std::string &connect_group_string ); + // Set target connection group + void set_connects_to( const std::string &connect_group_string ); + // Set to be member of a connection target group + void set_connects_to_member( const std::string &connect_group_string ); + // Set bidirectional connection group + void set_connects_with( const std::string &connect_group_string ); + // Set target group to rotate towards void set_rotates_to( const std::string &towards_group_string ); // Set to be member of a rotation target group @@ -556,8 +563,8 @@ struct map_data_common_t { bool connects( int &ret ) const; bool rotates( int &ret ) const; - bool connects_to( int test_connect_group ) const { - return connect_group != TERCONN_NONE && connect_group == test_connect_group; + bool in_connects_to( int test_connect_group ) const { + return connect_to_group_member != TERCONN_NONE && connect_to_group_member == test_connect_group; } // Tests if the type is a member of a rotares_towards group From 87868ddd56905ffc3a91f0a8992570c6783fc3b1 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Wed, 28 Sep 2022 13:37:24 +0200 Subject: [PATCH 02/19] make all connecting terrain and furniture use the bi-directional variant --- .../furniture-flora.json | 4 +- .../furniture-plumbing.json | 2 +- .../furniture-surfaces.json | 8 +-- .../furniture-terrains.json | 18 +++--- .../furniture-tools.json | 4 +- .../terrain-bridges-docks.json | 4 +- .../terrain-embrasures.json | 16 ++--- .../terrain-fences-gates.json | 54 ++++++++--------- .../terrain-floors-indoor.json | 60 +++++++++---------- .../terrain-floors-outdoors.json | 46 +++++++------- .../terrain-highways.json | 4 +- .../terrain-liquids.json | 50 ++++++++-------- .../terrain-railroads.json | 36 +++++------ .../furniture_and_terrain/terrain-roofs.json | 10 ++-- .../furniture_and_terrain/terrain-traps.json | 12 ++-- .../terrain-triffid.json | 10 ++-- .../furniture_and_terrain/terrain-walls.json | 52 ++++++++-------- .../terrain-zlevel-transitions.json | 36 +++++------ .../furniture_habitat.json | 2 +- .../terrain_alienciv.json | 2 +- .../terrain_groundxeno.json | 6 +- .../terrain_habitat_wall.json | 2 +- .../constructions/crt_terrain.json | 2 +- data/mods/Magiclysm/terrain.json | 4 +- .../sweet_mapgen/sweet_terrain.json | 4 +- data/mods/No_Hope/terrain.json | 8 +-- data/mods/Rummaging/modinfo.json | 4 +- .../terrain-floors-outdoors.json | 4 +- 28 files changed, 232 insertions(+), 232 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-flora.json b/data/json/furniture_and_terrain/furniture-flora.json index 4425462930a52..7d75ec048ff24 100644 --- a/data/json/furniture_and_terrain/furniture-flora.json +++ b/data/json/furniture_and_terrain/furniture-flora.json @@ -420,7 +420,7 @@ "move_cost_mod": 3, "coverage": 50, "required_str": -1, - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "SHRUB", "PERMEABLE" ], "bash": { "str_min": 10, @@ -445,7 +445,7 @@ "move_cost_mod": -1, "coverage": 90, "required_str": 14, - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "flags": [ "FLAMMABLE_ASH", "SHRUB", "PERMEABLE", "BLOCK_WIND", "NOITEM" ], "bash": { "str_min": 16, diff --git a/data/json/furniture_and_terrain/furniture-plumbing.json b/data/json/furniture_and_terrain/furniture-plumbing.json index 8f67e52364b4b..4ecc3cd7c4830 100644 --- a/data/json/furniture_and_terrain/furniture-plumbing.json +++ b/data/json/furniture_and_terrain/furniture-plumbing.json @@ -64,7 +64,7 @@ "coverage": 60, "required_str": -1, "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "CONTAINER", "PLACE_ITEM", "MOUNTABLE" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "rotates_to": "INDOORFLOOR", "bash": { "str_min": 8, diff --git a/data/json/furniture_and_terrain/furniture-surfaces.json b/data/json/furniture_and_terrain/furniture-surfaces.json index 2855260ae2346..e7df3ce16504f 100644 --- a/data/json/furniture_and_terrain/furniture-surfaces.json +++ b/data/json/furniture_and_terrain/furniture-surfaces.json @@ -10,7 +10,7 @@ "coverage": 60, "required_str": 10, "flags": [ "TRANSPARENT", "FLAMMABLE", "ORGANIC", "MOUNTABLE", "SHORT", "FLAT_SURF" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": [ 6, 10 ] } ] }, @@ -36,7 +36,7 @@ "coverage": 55, "required_str": -1, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "FLAT_SURF" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "rotates_to": "INDOORFLOOR", "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": [ 6, 8 ] } ] @@ -68,7 +68,7 @@ "required_str": 4, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "DOOR", "ORGANIC" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "open": "f_counter_gate_o", "crafting_pseudo_item": "medium_surface_pseudo", "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": 10 } ] }, @@ -89,7 +89,7 @@ "color": "blue", "move_cost_mod": 2, "required_str": 4, - "connects_to": "COUNTER", + "connects_with": "COUNTER", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT", "ROAD", "ORGANIC" ], "close": "f_counter_gate_c", "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": 10 } ] }, diff --git a/data/json/furniture_and_terrain/furniture-terrains.json b/data/json/furniture_and_terrain/furniture-terrains.json index 77238d3839a68..6b6cc71433371 100644 --- a/data/json/furniture_and_terrain/furniture-terrains.json +++ b/data/json/furniture_and_terrain/furniture-terrains.json @@ -353,7 +353,7 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -374,7 +374,7 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -397,7 +397,7 @@ "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], "open": "f_canvas_door_o", - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -418,7 +418,7 @@ "required_str": -1, "flags": [ "TRANSPARENT" ], "close": "f_canvas_door", - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -440,7 +440,7 @@ "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], "open": "f_large_canvas_door_o", - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -462,7 +462,7 @@ "required_str": -1, "flags": [ "TRANSPARENT" ], "close": "f_large_canvas_door", - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -568,7 +568,7 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -590,7 +590,7 @@ "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], "open": "f_skin_door_o", - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -611,7 +611,7 @@ "required_str": -1, "flags": [ "TRANSPARENT" ], "close": "f_skin_door", - "connects_to": "CANVAS_WALL", + "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json index 5c3488d6de402..bc50344ac8eb2 100644 --- a/data/json/furniture_and_terrain/furniture-tools.json +++ b/data/json/furniture_and_terrain/furniture-tools.json @@ -11,7 +11,7 @@ "coverage": 50, "required_str": -1, "flags": [ "TRANSPARENT", "NOITEM", "INDOORS", "SHORT", "PERMEABLE" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "deconstruct": { "furn_set": "f_counter", "items": [ @@ -60,7 +60,7 @@ "required_str": -1, "light_emitted": 10, "flags": [ "TRANSPARENT", "CONSOLE", "NOITEM", "INDOORS", "SHORT", "PERMEABLE" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "deconstruct": { "furn_set": "f_counter", "items": [ diff --git a/data/json/furniture_and_terrain/terrain-bridges-docks.json b/data/json/furniture_and_terrain/terrain-bridges-docks.json index 51dba14dcd7fe..095c74a38ee57 100644 --- a/data/json/furniture_and_terrain/terrain-bridges-docks.json +++ b/data/json/furniture_and_terrain/terrain-bridges-docks.json @@ -164,7 +164,7 @@ "type": "terrain", "id": "t_pavement_bg_dp", "name": "bridge pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A bridge section made out of concrete and metal.", "looks_like": "t_pavement", "symbol": ".", @@ -184,7 +184,7 @@ "type": "terrain", "id": "t_pavement_y_bg_dp", "name": "bridge yellow pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A bridge section made out of concrete and metal. It's painted yellow.", "looks_like": "t_pavement_y", "symbol": ".", diff --git a/data/json/furniture_and_terrain/terrain-embrasures.json b/data/json/furniture_and_terrain/terrain-embrasures.json index b49863ede7ee1..588d0a9e037ee 100644 --- a/data/json/furniture_and_terrain/terrain-embrasures.json +++ b/data/json/furniture_and_terrain/terrain-embrasures.json @@ -20,7 +20,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 48, "str_max": 80, @@ -52,7 +52,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 32, "str_max": 60, @@ -83,7 +83,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 64, "str_max": 150, @@ -114,7 +114,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 10, "str_max": 75, @@ -151,7 +151,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 12, "str_max": 90, @@ -187,7 +187,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 48, "str_max": 90, @@ -219,7 +219,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 52, "str_max": 120, @@ -280,7 +280,7 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 72, "str_max": 175, diff --git a/data/json/furniture_and_terrain/terrain-fences-gates.json b/data/json/furniture_and_terrain/terrain-fences-gates.json index b403fe11fe463..c8cb61f5a98d9 100644 --- a/data/json/furniture_and_terrain/terrain-fences-gates.json +++ b/data/json/furniture_and_terrain/terrain-fences-gates.json @@ -73,7 +73,7 @@ "byproducts": [ { "item": "scrap", "count": 3 } ] }, "flags": [ "TRANSPARENT", "PERMEABLE", "LOCKED", "PICKABLE", "THIN_OBSTACLE", "BURROWABLE" ], - "connects_to": "CHAINFENCE", + "connects_with": "CHAINFENCE", "examine_action": "locked_object_pickable", "oxytorch": { "result": "t_dirt", @@ -106,7 +106,7 @@ "color": "cyan", "move_cost": 0, "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "THIN_OBSTACLE", "BURROWABLE" ], - "connects_to": "CHAINFENCE", + "connects_with": "CHAINFENCE", "oxytorch": { "result": "t_dirt", "duration": "9 seconds", @@ -143,7 +143,7 @@ "color": "cyan", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "BURROWABLE" ], - "connects_to": "CHAINFENCE", + "connects_with": "CHAINFENCE", "close": "t_chaingate_c", "oxytorch": { "result": "t_dirt", @@ -184,7 +184,7 @@ "byproducts": [ { "item": "chain", "count": [ 1, 2 ] }, { "item": "wire", "count": [ 8, 22 ] } ] }, "flags": [ "TRANSPARENT", "PERMEABLE", "LOCKED", "PICKABLE", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "examine_action": "locked_object_pickable", "lockpick_result": "t_retractable_gate_c", "lockpick_message": "With a satisfying click, the lock on the gate opens.", @@ -217,7 +217,7 @@ "color": "cyan", "move_cost": 0, "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "hacksaw": { "result": "t_strconc_floor", "duration": "10 minutes", @@ -254,7 +254,7 @@ "color": "cyan", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], - "connects_to": "WALL", + "connects_with": "WALL", "close": "t_retractable_gate_c", "bash": { "str_min": 5, @@ -279,7 +279,7 @@ "move_cost": 3, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "DOOR", "MOUNTABLE", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "open": "t_fencegate_o", "deconstruct": { "ter_set": "t_dirt", @@ -315,7 +315,7 @@ "color": "brown", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT", "ROAD", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "close": "t_fencegate_c", "deconstruct": { "ter_set": "t_dirt", @@ -420,7 +420,7 @@ "looks_like": "t_chaingate_c", "move_cost": 0, "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "BURROWABLE" ], - "connects_to": "CHAINFENCE", + "connects_with": "CHAINFENCE", "open": "t_chickenwire_gate_o", "deconstruct": { "ter_set": "t_dirt", @@ -452,7 +452,7 @@ "looks_like": "t_chaingate_o", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "BURROWABLE" ], - "connects_to": "CHAINFENCE", + "connects_with": "CHAINFENCE", "close": "t_chickenwire_gate_c", "deconstruct": { "ter_set": "t_dirt", @@ -493,7 +493,7 @@ "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "2x4", "count": 5 }, { "item": "nail", "charges": 8 } ] }, "bash": { "str_min": 4, @@ -535,7 +535,7 @@ "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "splinter", "count": 20 } ] }, "bash": { "str_min": 4, @@ -581,7 +581,7 @@ "byproducts": [ { "item": "wire", "count": 20 } ] }, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "PERMEABLE", "UNSTABLE", "CLIMBABLE", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "CHAINFENCE", + "connects_with": "CHAINFENCE", "examine_action": "chainfence", "oxytorch": { "result": "t_dirt", @@ -643,7 +643,7 @@ "looks_like": "t_chainfence", "move_cost": 0, "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "AUTO_WALL_SYMBOL", "BURROWABLE", "CLIMBABLE" ], - "connects_to": "CHAINFENCE", + "connects_with": "CHAINFENCE", "examine_action": "chainfence", "deconstruct": { "ter_set": "t_chickenwire_fence_post", @@ -818,7 +818,7 @@ "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "2x4", "count": 2 }, { "item": "nail", "charges": 20 } ] }, "bash": { "str_min": 5, @@ -840,7 +840,7 @@ "move_cost": 0, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "DOOR", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "open": "t_splitrail_fencegate_o", "deconstruct": { "ter_set": "t_dirt", @@ -877,7 +877,7 @@ "looks_like": "t_fencegate_o", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT", "ROAD", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "close": "t_splitrail_fencegate_c", "deconstruct": { "ter_set": "t_dirt", @@ -916,7 +916,7 @@ "coverage": 60, "examine_action": "chainfence", "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "PERMEABLE", "CLIMBABLE", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "deconstruct": { "ter_set": "t_floor", "items": [ @@ -950,7 +950,7 @@ "move_cost": 0, "coverage": 60, "flags": [ "TRANSPARENT", "DOOR", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "open": "t_gate_metal_o", "deconstruct": { "ter_set": "t_floor", @@ -989,7 +989,7 @@ "move_cost": 2, "coverage": 60, "flags": [ "TRANSPARENT", "BURROWABLE", "FLAT", "ROAD" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "close": "t_gate_metal_c", "deconstruct": { "ter_set": "t_floor", @@ -1029,7 +1029,7 @@ "move_cost": 0, "examine_action": "chainfence", "flags": [ "NOITEM", "CLIMBABLE", "PERMEABLE", "AUTO_WALL_SYMBOL", "FLAMMABLE_ASH", "THIN_OBSTACLE", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "2x4", "count": 8 }, { "item": "nail", "charges": 20 } ] }, "bash": { "str_min": 5, @@ -1051,7 +1051,7 @@ "move_cost": 0, "coverage": 60, "flags": [ "FLAMMABLE_ASH", "DOOR", "BURROWABLE" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "open": "t_privacy_fencegate_o", "deconstruct": { "ter_set": "t_dirt", @@ -1088,7 +1088,7 @@ "looks_like": "t_fencegate_o", "move_cost": 2, "flags": [ "FLAMMABLE_ASH", "FLAT", "ROAD", "BURROWABLE", "TRANSPARENT" ], - "connects_to": "WOODFENCE", + "connects_with": "WOODFENCE", "close": "t_privacy_fencegate_c", "deconstruct": { "ter_set": "t_dirt", @@ -1125,7 +1125,7 @@ "color": "yellow", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "bash": { "str_min": 20, "str_max": 80, @@ -1150,7 +1150,7 @@ "color": "cyan", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "deconstruct": { "ter_set": "t_rock_floor", "items": [ { "item": "glass_sheet", "count": 2 }, { "item": "pipe", "count": 4 } ] }, "bash": { "str_min": 10, @@ -1175,7 +1175,7 @@ "color": "dark_gray", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "deconstruct": { "ter_set": "t_rock_floor", "items": [ { "item": "sheet_metal", "count": 2 }, { "item": "pipe", "count": 4 } ] }, "bash": { "str_min": 20, @@ -1201,7 +1201,7 @@ "looks_like": "t_ponywall", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "MINEABLE", "BURROWABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "bash": { "str_min": 100, "str_max": 400, diff --git a/data/json/furniture_and_terrain/terrain-floors-indoor.json b/data/json/furniture_and_terrain/terrain-floors-indoor.json index c3634cc01218e..43f80ed9edd5c 100644 --- a/data/json/furniture_and_terrain/terrain-floors-indoor.json +++ b/data/json/furniture_and_terrain/terrain-floors-indoor.json @@ -6,7 +6,7 @@ "description": "A bare and cold concrete floor with matching roof, could still insulate from the outdoors but roof collapse is possible if supporting walls are broken down.", "symbol": ".", "color": "cyan", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "roof": "t_concrete_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], @@ -31,7 +31,7 @@ "symbol": ".", "color": "yellow", "looks_like": "t_pavement_y", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "roof": "t_concrete_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], @@ -55,7 +55,7 @@ "description": "A bare and cold concrete floor with a streak of red paint, could still insulate from the outdoors but roof collapse is possible if supporting walls are broken down.", "symbol": ".", "color": "red", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "looks_like": "t_floor_red", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], "move_cost": 2, @@ -71,7 +71,7 @@ "color": "yellow", "light_emitted": 120, "looks_like": "t_thconc_y", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "INDOORS", "FLAT", "ROAD" ], "roof": "t_concrete_roof", @@ -94,7 +94,7 @@ "description": "A bare and cold concrete floor with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "light_emitted": 120, "roof": "t_concrete_roof", @@ -118,7 +118,7 @@ "description": "Interlocking wooden tiles that are more than likely treated against fire, with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_to": "WOODFLOOR", + "connects_with": "WOODFLOOR", "move_cost": 2, "light_emitted": 120, "roof": "t_wood_roof", @@ -144,7 +144,7 @@ "description": "Floor consisting of finely mixed earth that has been tamped down, with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "brown", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 2, "light_emitted": 120, "roof": "t_shingle_flat_roof", @@ -170,7 +170,7 @@ "description": "High-quality and tough checkered flooring to reduce risk of slips and falls, with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "light_cyan", - "connects_to": "METALFLOOR", + "connects_with": "METALFLOOR", "move_cost": 2, "light_emitted": 120, "roof": "t_metal_roof", @@ -196,7 +196,7 @@ "description": "Extremely resilient floor made from carefully placed rebar and poured concrete with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "light_emitted": 120, "roof": "t_concrete_roof", @@ -220,7 +220,7 @@ "description": "Linoleum flooring with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_to": "LINOLEUM", + "connects_with": "LINOLEUM", "move_cost": 2, "light_emitted": 120, "roof": "t_flat_roof", @@ -244,7 +244,7 @@ "description": "Linoleum flooring with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_to": "LINOLEUM", + "connects_with": "LINOLEUM", "move_cost": 2, "light_emitted": 120, "roof": "t_flat_roof", @@ -286,7 +286,7 @@ "description": "Extremely resilient floor made from carefully placed rebar and poured concrete, capable of providing protection from the elements. As for the matching roof, it still requires supporting walls, otherwise it may very well cave in.", "symbol": ".", "color": "cyan", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "roof": "t_concrete_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], @@ -311,7 +311,7 @@ "looks_like": "t_strconc_floor", "symbol": ".", "color": "cyan", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "emissions": [ "emit_plasma_continuously" ], "move_cost": 2, "roof": "t_concrete_roof", @@ -377,7 +377,7 @@ "description": "A relatively flat area of rock and stone. Looks stable enough to be mined with the proper mining gear.", "symbol": ".", "color": "light_gray", - "connects_to": "ROCKFLOOR", + "connects_with": "ROCKFLOOR", "move_cost": 2, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "INDOORS", "COLLAPSES", "SUPPORTS_ROOF", "FLAT", "ROAD" ], @@ -390,7 +390,7 @@ "description": "A rough stone floor. Its patterns constantly shift as if your mind can't quite understand what it's really seeing.", "symbol": ".", "color": "magenta", - "connects_to": "ROCKFLOOR", + "connects_with": "ROCKFLOOR", "move_cost": 2, "roof": "t_warped_roof", "flags": [ "TRANSPARENT", "INDOORS", "SUPPORTS_ROOF", "FLAT", "ROAD" ] @@ -402,7 +402,7 @@ "description": "High-quality and tough checkered flooring to reduce risk of slips and falls, with a matching roof.", "symbol": ".", "color": "light_cyan", - "connects_to": "METALFLOOR", + "connects_with": "METALFLOOR", "move_cost": 2, "roof": "t_metal_roof", "flags": [ "TRANSPARENT", "INDOORS", "FLAT", "ROAD" ], @@ -449,7 +449,7 @@ "description": "Interlocking wooden tiles that are more than likely treated against fire, with wooden posts and beams supporting a roof.", "symbol": ".", "color": "cyan", - "connects_to": "WOODFLOOR", + "connects_with": "WOODFLOOR", "move_cost": 2, "comfort": 1, "roof": "t_wood_treated_roof", @@ -513,7 +513,7 @@ "description": "Hardwood flooring that has been treated with chemicals to improve slip resistance and sliding, commonly for recreational sports.", "symbol": ".", "color": "light_red", - "connects_to": "WOODFLOOR", + "connects_with": "WOODFLOOR", "move_cost": 2, "comfort": 1, "roof": "t_wood_treated_roof", @@ -534,7 +534,7 @@ "description": "Floor consisting of finely mixed earth that has been tamped down, with a wooden ceiling above it.", "symbol": ".", "color": "brown", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 2, "roof": "t_shingle_flat_roof", "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "DIGGABLE" ], @@ -555,7 +555,7 @@ "symbol": ".", "color": "brown", "looks_like": "t_dirtfloor", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 2, "roof": "t_thatch_roof", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "DIGGABLE" ], @@ -585,7 +585,7 @@ "description": "An industrial flood light set up to illuminate the surroundings. Smashing it doesn't seem like it'd produce any worthwhile salvage.", "symbol": ".", "color": "white", - "connects_to": "WOODFLOOR", + "connects_with": "WOODFLOOR", "move_cost": 2, "roof": "t_flat_roof", "light_emitted": 240, @@ -678,7 +678,7 @@ "name": "carpet", "symbol": ".", "color": "red", - "connects_to": "CARPET", + "connects_with": "CARPET", "move_cost": 2, "roof": "t_flat_roof", "description": "Soft red carpet.", @@ -753,7 +753,7 @@ "looks_like": "t_carpet_red", "symbol": ".", "color": "red", - "connects_to": "CARPET", + "connects_with": "CARPET", "move_cost": 2, "roof": "t_flat_roof", "description": "Soft red carpet.", @@ -1311,7 +1311,7 @@ "description": "A section of flooring made out of a tough, rubbery material. Colored a simple white.", "symbol": ".", "color": "white", - "connects_to": "LINOLEUM", + "connects_with": "LINOLEUM", "move_cost": 2, "roof": "t_flat_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], @@ -1332,7 +1332,7 @@ "description": "A section of flooring made out of a tough, gray, rubbery material.", "symbol": ".", "color": "light_gray", - "connects_to": "LINOLEUM", + "connects_with": "LINOLEUM", "move_cost": 2, "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], "bash": { @@ -1351,7 +1351,7 @@ "description": "This section of wax flooring has been painted.", "symbol": ".", "color": "yellow", - "connects_to": "WOODFLOOR", + "connects_with": "WOODFLOOR", "move_cost": 2, "roof": "t_flat_roof", "bash": { @@ -1425,7 +1425,7 @@ "description": "It's dirt. Looks like some fine soil for tillage. Could also be dug out for construction projects.", "symbol": ".", "color": "brown", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 2, "looks_like": "t_dirt", "roof": "t_rock_roof", @@ -1441,7 +1441,7 @@ "symbol": ".", "color": "yellow", "looks_like": "t_sand", - "connects_to": "SAND", + "connects_with": "SAND", "move_cost": 3, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "INDOORS", "FLAT", "DIGGABLE" ], @@ -1483,7 +1483,7 @@ "description": "A field full of malleable clay, suitable for kiln firing if it was extracted properly.", "symbol": ".", "color": "light_red", - "connects_to": "CLAY", + "connects_with": "CLAY", "move_cost": 2, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT", "SUPPORTS_ROOF", "INDOORS" ], @@ -1497,7 +1497,7 @@ "//": "for caverns and other natural underground formations.", "symbol": "#", "color": "brown", - "connects_to": "CLAY", + "connects_with": "CLAY", "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "BURROWABLE", "SUPPORTS_ROOF", "INDOORS" ], diff --git a/data/json/furniture_and_terrain/terrain-floors-outdoors.json b/data/json/furniture_and_terrain/terrain-floors-outdoors.json index 25dcea1973691..6ebdafd5c51b9 100644 --- a/data/json/furniture_and_terrain/terrain-floors-outdoors.json +++ b/data/json/furniture_and_terrain/terrain-floors-outdoors.json @@ -6,7 +6,7 @@ "description": "It's dirt. Looks like some fine soil for tillage. Could also be dug out for construction projects.", "symbol": ".", "color": "brown", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 2, "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT", "PLOWABLE" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } @@ -19,7 +19,7 @@ "symbol": ".", "color": "yellow", "move_cost": 3, - "connects_to": "SAND", + "connects_with": "SAND", "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } }, @@ -42,7 +42,7 @@ "description": "A field full of malleable clay, suitable for kiln firing if it was extracted properly.", "symbol": ".", "color": "light_red", - "connects_to": "CLAY", + "connects_with": "CLAY", "move_cost": 2, "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } @@ -55,7 +55,7 @@ "looks_like": "t_dirtmound", "symbol": "#", "color": "brown", - "connects_to": "CLAY", + "connects_with": "CLAY", "move_cost": 5, "flags": [ "TRANSPARENT", "BURROWABLE" ], "bash": { @@ -75,7 +75,7 @@ "looks_like": "t_dirtmound", "symbol": "#", "color": "brown", - "connects_to": "SAND", + "connects_with": "SAND", "move_cost": 5, "flags": [ "TRANSPARENT", "BURROWABLE" ], "bash": { @@ -95,7 +95,7 @@ "looks_like": "t_sand", "symbol": "~", "color": "brown", - "connects_to": "SAND", + "connects_with": "SAND", "move_cost": 3, "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "crunch", "ter_set": "t_sand", "str_min": 25, "str_max": 100, "str_min_supported": 100, "bash_below": true } @@ -107,7 +107,7 @@ "description": "An area of heaped dirt, not easily traversable. If examined more closely, it's quite favorable for planting seeds and the like.", "symbol": "#", "color": "brown", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 3, "flags": [ "TRANSPARENT", "DIGGABLE", "MOUNTABLE", "NOCOLLIDE", "PLANTABLE" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100 }, @@ -121,7 +121,7 @@ "looks_like": "t_dirtmound", "symbol": "#", "color": "brown", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 3, "coverage": 40, "flags": [ "TRANSPARENT", "DIGGABLE", "MOUNTABLE", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS" ], @@ -193,7 +193,7 @@ "symbol": ".", "color": "light_gray", "looks_like": "t_rock_floor", - "connects_to": "ROCKFLOOR", + "connects_with": "ROCKFLOOR", "move_cost": 2, "roof": "t_open_air", "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], @@ -207,7 +207,7 @@ "symbol": ".", "color": "dark_gray", "move_cost": 3, - "connects_to": "MULCHFLOOR", + "connects_with": "MULCHFLOOR", "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } }, @@ -215,7 +215,7 @@ "type": "terrain", "id": "t_pavement", "name": "pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A segment of asphalt, slowly degrading from cracks, frost heaves and lack of maintenance.", "symbol": ".", "color": "dark_gray", @@ -234,7 +234,7 @@ "type": "terrain", "id": "t_pavement_y", "name": "yellow pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "Streaks of carefully aligned yellow paint mark the road to inform drivers not to cross. No one is enforcing these rules anymore.", "symbol": ".", "color": "yellow", @@ -253,7 +253,7 @@ "id": "t_zebra", "alias": [ "t_zebra_h", "t_zebra_v" ], "name": "pedestrian crossing", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "White polymer lines painted on the pavement which indicate places where pedestrians should cross the road.", "symbol": ".", "color": "white", @@ -275,7 +275,7 @@ "symbol": ".", "color": "light_gray", "looks_like": "t_concrete", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], "bash": { @@ -294,7 +294,7 @@ "looks_like": "t_strconc_floor", "symbol": ".", "color": "cyan", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], "bash": { @@ -318,7 +318,7 @@ "symbol": ".", "color": "light_gray", "looks_like": "t_pavement", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], "bash": { @@ -337,7 +337,7 @@ "symbol": ".", "color": "yellow", "looks_like": "t_pavement_y", - "connects_to": "CONCRETE", + "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], "bash": { @@ -402,7 +402,7 @@ "description": "High-quality and tough checkered flooring to reduce risk of slips and falls.", "symbol": ".", "color": "light_cyan", - "connects_to": "METALFLOOR", + "connects_with": "METALFLOOR", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], "bash": { @@ -426,7 +426,7 @@ "description": "Metal gangway bridging a short gap. Sturdy enough to act as a floor, but not sufficient to support additional flooring.", "symbol": ".", "color": "light_cyan", - "connects_to": "METALFLOOR", + "connects_with": "METALFLOOR", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], "bash": { @@ -450,7 +450,7 @@ "description": "A section of flooring made out of a tough, rubbery material. Colored a simple white.", "symbol": ".", "color": "white", - "connects_to": "LINOLEUM", + "connects_with": "LINOLEUM", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "FLAT", "ROAD" ], "bash": { @@ -470,7 +470,7 @@ "description": "A section of flooring made out of a tough, gray, rubbery material.", "symbol": ".", "color": "light_gray", - "connects_to": "LINOLEUM", + "connects_with": "LINOLEUM", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "FLAT", "ROAD" ], "bash": { @@ -489,7 +489,7 @@ "description": "Floor consisting of finely mixed earth that has been tamped down.", "symbol": ".", "color": "brown", - "connects_to": "DIRT", + "connects_with": "DIRT", "move_cost": 2, "looks_like": "t_dirtfloor", "flags": [ "TRANSPARENT", "FLAT", "DIGGABLE" ], @@ -535,7 +535,7 @@ "symbol": ".", "looks_like": "t_pavement", "color": "dark_gray", - "connects_to": "METALFLOOR", + "connects_with": "METALFLOOR", "move_cost": 2, "flags": [ "FLAT", "ROAD", "TRANSPARENT" ], "bash": { diff --git a/data/json/furniture_and_terrain/terrain-highways.json b/data/json/furniture_and_terrain/terrain-highways.json index 574ce764355b2..6d6db2fc9c99a 100644 --- a/data/json/furniture_and_terrain/terrain-highways.json +++ b/data/json/furniture_and_terrain/terrain-highways.json @@ -3,7 +3,7 @@ "type": "terrain", "id": "t_pavement_hw_air", "name": "bridge pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A bridge section made out of concrete and metal.", "looks_like": "t_pavement", "symbol": ".", @@ -23,7 +23,7 @@ "type": "terrain", "id": "t_pavement_y_hw_air", "name": "bridge yellow pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A bridge section made out of concrete and metal. It's painted yellow.", "looks_like": "t_pavement_y", "symbol": ".", diff --git a/data/json/furniture_and_terrain/terrain-liquids.json b/data/json/furniture_and_terrain/terrain-liquids.json index e7c0e932a5d7b..db28b297d1ef7 100644 --- a/data/json/furniture_and_terrain/terrain-liquids.json +++ b/data/json/furniture_and_terrain/terrain-liquids.json @@ -8,7 +8,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -23,7 +23,7 @@ "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "INDOORS", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -36,7 +36,7 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -51,7 +51,7 @@ "move_cost": 8, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE", "INDOORS" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -64,7 +64,7 @@ "looks_like": "t_water_sh", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "SHALLOW_WATER", "MURKY" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -79,7 +79,7 @@ "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "INDOORS", "SHALLOW_WATER", "MURKY" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -92,7 +92,7 @@ "color": "light_blue", "move_cost": 6, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "CURRENT", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -107,7 +107,7 @@ "move_cost": 6, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "CURRENT", "INDOORS", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -120,7 +120,7 @@ "color": "blue", "move_cost": 10, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE", "CURRENT" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -135,7 +135,7 @@ "move_cost": 10, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE", "CURRENT", "INDOORS" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -148,7 +148,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "FISHABLE", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -163,7 +163,7 @@ "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "FISHABLE", "INDOORS", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -176,7 +176,7 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "DEEP_WATER", "FISHABLE", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -191,7 +191,7 @@ "move_cost": 8, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "DEEP_WATER", "FISHABLE", "INDOORS" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -204,7 +204,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "INDOORS", "DEEP_WATER" ], - "connects_to": "POOLWATER", + "connects_with": "POOLWATER", "examine_action": "water_source" }, { @@ -217,7 +217,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "INDOORS", "SHALLOW_WATER" ], - "connects_to": "POOLWATER", + "connects_with": "POOLWATER", "examine_action": "water_source" }, { @@ -230,7 +230,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER" ], - "connects_to": "POOLWATER", + "connects_with": "POOLWATER", "examine_action": "water_source" }, { @@ -243,7 +243,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SHALLOW_WATER" ], - "connects_to": "POOLWATER", + "connects_with": "POOLWATER", "examine_action": "water_source" }, { @@ -282,7 +282,7 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_DOWN", "GOES_UP" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -296,7 +296,7 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_UP" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -310,7 +310,7 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_UP" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -324,7 +324,7 @@ "color": "light_gray", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_UP", "MINEABLE" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -369,7 +369,7 @@ "str_min_supported": 100, "items": [ { "item": "rock", "count": [ 2, 10 ] } ] }, - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -390,7 +390,7 @@ "str_min_supported": 100, "items": [ { "item": "rock", "count": [ 2, 10 ] } ] }, - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -403,7 +403,7 @@ "move_cost": 5, "heat_radiation": 1, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SHALLOW_WATER" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { diff --git a/data/json/furniture_and_terrain/terrain-railroads.json b/data/json/furniture_and_terrain/terrain-railroads.json index 44ccd7e9dfa05..b9bfee02e58d6 100644 --- a/data/json/furniture_and_terrain/terrain-railroads.json +++ b/data/json/furniture_and_terrain/terrain-railroads.json @@ -54,7 +54,7 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -85,7 +85,7 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -116,7 +116,7 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -147,7 +147,7 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -178,7 +178,7 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -209,7 +209,7 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -232,7 +232,7 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -255,7 +255,7 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -278,7 +278,7 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -301,7 +301,7 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -335,7 +335,7 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -369,7 +369,7 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -403,7 +403,7 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -437,7 +437,7 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -478,7 +478,7 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -501,7 +501,7 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -599,7 +599,7 @@ { "item": "splinter", "count": [ 6, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -633,7 +633,7 @@ { "item": "splinter", "count": [ 6, 12 ] } ] }, - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] } ] diff --git a/data/json/furniture_and_terrain/terrain-roofs.json b/data/json/furniture_and_terrain/terrain-roofs.json index 25f5b8bd7f649..836dfef276efe 100644 --- a/data/json/furniture_and_terrain/terrain-roofs.json +++ b/data/json/furniture_and_terrain/terrain-roofs.json @@ -47,7 +47,7 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -71,7 +71,7 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -95,7 +95,7 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -119,7 +119,7 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -143,7 +143,7 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE", "CLIMBABLE" ], - "connects_to": "RAILING", + "connects_with": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] diff --git a/data/json/furniture_and_terrain/terrain-traps.json b/data/json/furniture_and_terrain/terrain-traps.json index 8fc255026fa5b..019160c4fed8d 100644 --- a/data/json/furniture_and_terrain/terrain-traps.json +++ b/data/json/furniture_and_terrain/terrain-traps.json @@ -28,7 +28,7 @@ "description": "A steep hole that could seriously injure something if it fell in, potentially fatal if it was filled with sharp and dangerous things. Deep enough for more advanced construction projects, and possibly to reach groundwater if constructed properly.", "symbol": "0", "color": "brown", - "connects_to": "PIT_DEEP", + "connects_with": "PIT_DEEP", "move_cost": 10, "trap": "tr_pit", "flags": [ "TRANSPARENT" ], @@ -54,7 +54,7 @@ "description": "A deep pit with a plank placed across it, looks sturdy enough to cross safely or the plank could be removed to turn it back into trap fall.", "symbol": "#", "color": "light_red", - "connects_to": "PIT_DEEP", + "connects_with": "PIT_DEEP", "move_cost": 2, "flags": [ "TRANSPARENT", "ROAD" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 40, "str_max": 100, "str_min_supported": 100, "bash_below": true }, @@ -67,7 +67,7 @@ "description": "A narrow trench full of very pointy things that would easily puncture a body.", "symbol": "0", "color": "light_red", - "connects_to": "PIT_DEEP", + "connects_with": "PIT_DEEP", "move_cost": 10, "trap": "tr_spike_pit", "flags": [ "TRANSPARENT", "PIT_FILLABLE" ], @@ -81,7 +81,7 @@ "description": "Menacing with sharp spears along the bottom, this pit has a plank across it to allow someone or something to cross safely. The plank could be removed to revert it back into a trap.", "symbol": "#", "color": "light_red", - "connects_to": "PIT_DEEP", + "connects_with": "PIT_DEEP", "move_cost": 2, "flags": [ "TRANSPARENT", "ROAD" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 40, "str_max": 100, "str_min_supported": 100, "bash_below": true }, @@ -94,7 +94,7 @@ "description": "Looks like a ton of broken glass was dumped into this pit, maybe not fatal to fall in but wouldn't be pleasant to try to crawl out.", "symbol": "0", "color": "light_cyan", - "connects_to": "PIT_DEEP", + "connects_with": "PIT_DEEP", "move_cost": 10, "trap": "tr_glass_pit", "flags": [ "TRANSPARENT", "PIT_FILLABLE" ], @@ -108,7 +108,7 @@ "description": "A plank has been placed carefully to allow traversal over this ditch full of large glass shards. The wooden board could be removed so it couldn't be safely crossed.", "symbol": "#", "color": "light_cyan", - "connects_to": "PIT_DEEP", + "connects_with": "PIT_DEEP", "move_cost": 2, "flags": [ "TRANSPARENT", "ROAD" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 40, "str_max": 100, "str_min_supported": 100, "bash_below": true }, diff --git a/data/json/furniture_and_terrain/terrain-triffid.json b/data/json/furniture_and_terrain/terrain-triffid.json index a83daa9fc00c7..93fb08eb799fa 100644 --- a/data/json/furniture_and_terrain/terrain-triffid.json +++ b/data/json/furniture_and_terrain/terrain-triffid.json @@ -10,7 +10,7 @@ "coverage": 100, "roof": "t_barkfloor", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 180, @@ -30,7 +30,7 @@ "move_cost": 0, "coverage": 100, "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 160, @@ -69,7 +69,7 @@ "coverage": 100, "roof": "t_barkfloor", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 180, @@ -133,7 +133,7 @@ "type": "terrain", "id": "t_triffid_slope_down", "name": "downward root slope", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A downward-facing slope of root-covered dirt.", "symbol": ">", "color": "brown", @@ -145,7 +145,7 @@ "type": "terrain", "id": "t_triffid_slope_up", "name": "upward root slope", - "connects_to": "WALL", + "connects_with": "WALL", "description": "An upward-facing slope of root-covered dirt.", "symbol": "<", "color": "brown", diff --git a/data/json/furniture_and_terrain/terrain-walls.json b/data/json/furniture_and_terrain/terrain-walls.json index dc789ef6ead42..eaabbcff1606d 100644 --- a/data/json/furniture_and_terrain/terrain-walls.json +++ b/data/json/furniture_and_terrain/terrain-walls.json @@ -56,7 +56,7 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "REDUCE_SCENT", "MOUNTABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 10, "str_max": 70, @@ -82,7 +82,7 @@ "color": "light_gray", "move_cost": 0, "coverage": 60, - "connects_to": "WALL", + "connects_with": "WALL", "roof": "t_flat_roof", "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM", "INDOORS", "AUTO_WALL_SYMBOL", "THIN_OBSTACLE", "MOUNTABLE", "SHORT" ], "deconstruct": { "ter_set": "t_floor", "items": [ { "item": "2x4", "count": 10 }, { "item": "nail", "charges": 20 } ] }, @@ -833,7 +833,7 @@ "coverage": 100, "roof": "t_brick_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 160, @@ -855,7 +855,7 @@ "coverage": 100, "roof": "t_rock_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 300, @@ -876,7 +876,7 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "NOITEM", "REDUCE_SCENT", "MOUNTABLE", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 200, @@ -899,7 +899,7 @@ "coverage": 100, "roof": "t_rock_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 400, @@ -941,7 +941,7 @@ "coverage": 100, "roof": "t_brick_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 120, @@ -1083,7 +1083,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -1104,7 +1104,7 @@ "move_cost": 4, "coverage": 60, "flags": [ "NOITEM", "TRANSPARENT", "MOUNTABLE", "REDUCE_SCENT", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 350, @@ -1126,7 +1126,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -1147,7 +1147,7 @@ "move_cost": 5, "coverage": 60, "flags": [ "TRANSPARENT", "NOITEM", "MOUNTABLE", "REDUCE_SCENT", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 460, @@ -1172,7 +1172,7 @@ "byproducts": [ { "item": "spike", "count": 19 }, { "item": "scrap", "count": 8 } ] }, "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "THIN_OBSTACLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "oxytorch": { "result": "t_pit", "duration": "9 seconds", @@ -1199,7 +1199,7 @@ "coverage": 100, "roof": "t_metal_flat_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 200, @@ -1241,7 +1241,7 @@ "coverage": 100, "roof": "t_wood_roof", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 12, "str_max": 150, @@ -1268,7 +1268,7 @@ "coverage": 100, "roof": "t_wood_roof", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 8, "str_max": 150, @@ -1320,7 +1320,7 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "REDUCE_SCENT", "MOUNTABLE", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 120, @@ -1352,7 +1352,7 @@ "BLOCK_WIND", "WIRED_WALL" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 180, @@ -1374,7 +1374,7 @@ "coverage": 100, "roof": "t_wood_roof", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 160, @@ -1496,7 +1496,7 @@ "move_cost": 0, "coverage": 100, "flags": [ "NOITEM", "WALL", "PERMEABLE", "SUPPORTS_ROOF", "AUTO_WALL_SYMBOL", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 200, @@ -1523,7 +1523,7 @@ "coverage": 100, "roof": "t_dirt", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 200, @@ -1545,7 +1545,7 @@ "coverage": 100, "roof": "t_dirt", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 30, "str_max": 200, @@ -1565,7 +1565,7 @@ "move_cost": 0, "coverage": 100, "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_to": "WALL" + "connects_with": "WALL" }, { "type": "terrain", @@ -1578,7 +1578,7 @@ "move_cost": 0, "coverage": 60, "flags": [ "NOITEM", "WALL", "PERMEABLE", "AUTO_WALL_SYMBOL", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 30, "str_max": 200, @@ -2050,7 +2050,7 @@ "color": "light_gray", "move_cost": 5, "flags": [ "TRANSPARENT", "NOITEM", "MOUNTABLE", "PERMEABLE", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 460, @@ -2180,7 +2180,7 @@ "coverage": 100, "roof": "t_rock_roof", "flags": [ "NOITEM", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 50, "str_max": 200, @@ -2201,7 +2201,7 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "NOITEM", "REDUCE_SCENT", "MOUNTABLE", "MINEABLE" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 30, "str_max": 120, diff --git a/data/json/furniture_and_terrain/terrain-zlevel-transitions.json b/data/json/furniture_and_terrain/terrain-zlevel-transitions.json index 1c565ed701071..f65dabb35d3b4 100644 --- a/data/json/furniture_and_terrain/terrain-zlevel-transitions.json +++ b/data/json/furniture_and_terrain/terrain-zlevel-transitions.json @@ -188,7 +188,7 @@ "id": "t_ramp_down_high", "name": "road ramp down (high end)", "description": "The upper end of an asphalt ramp leading down.", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -199,7 +199,7 @@ "id": "t_ramp_down_low", "name": "road ramp down (low end)", "description": "The lower end of an asphalt ramp leading down.", - "connects_to": "WALL", + "connects_with": "WALL", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -209,7 +209,7 @@ "type": "terrain", "id": "t_ramp_up_high", "name": "road ramp up (high end)", - "connects_to": "WALL", + "connects_with": "WALL", "description": "The upper end of an asphalt ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -220,7 +220,7 @@ "type": "terrain", "id": "t_ramp_up_low", "name": "road ramp up (low end)", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "The lower end of an asphalt ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -242,7 +242,7 @@ "id": "t_earth_ramp_down_low", "name": "earth ramp down (low end)", "description": "The lower end of an earth ramp leading down.", - "connects_to": "WALL", + "connects_with": "WALL", "symbol": ">", "color": "brown", "move_cost": 2, @@ -252,7 +252,7 @@ "type": "terrain", "id": "t_earth_ramp_up_high", "name": "earth ramp up (high end)", - "connects_to": "WALL", + "connects_with": "WALL", "description": "The upper end of an earth ramp leading up.", "symbol": "<", "color": "brown", @@ -273,7 +273,7 @@ "type": "terrain", "id": "t_sidewalk_ramp_down_high", "name": "sidewalk ramp down (high end)", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "The upper end of a sidewalk ramp leading down.", "symbol": ">", "color": "light_gray", @@ -284,7 +284,7 @@ "type": "terrain", "id": "t_sidewalk_ramp_down_low", "name": "sidewalk ramp down (low end)", - "connects_to": "WALL", + "connects_with": "WALL", "description": "The lower end of a sidewalk ramp leading down.", "symbol": ">", "color": "light_gray", @@ -295,7 +295,7 @@ "type": "terrain", "id": "t_sidewalk_ramp_up_high", "name": "sidewalk ramp up (high end)", - "connects_to": "WALL", + "connects_with": "WALL", "description": "The upper end of a sidewalk ramp leading up.", "symbol": "<", "color": "light_gray", @@ -316,7 +316,7 @@ "type": "terrain", "id": "t_slope_down", "name": "downward slope", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A downward facing slope.", "symbol": ">", "color": "brown", @@ -327,7 +327,7 @@ "type": "terrain", "id": "t_slope_up", "name": "upward slope", - "connects_to": "WALL", + "connects_with": "WALL", "description": "An upward facing slope.", "symbol": "<", "color": "brown", @@ -393,7 +393,7 @@ "id": "t_railroad_ramp_down_high", "name": "railroad ramp down (high end)", "description": "The upper end of a railroad ramp leading down.", - "connects_to": "RAIL", + "connects_with": "RAIL", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -404,7 +404,7 @@ "id": "t_railroad_ramp_down_low", "name": "railroad ramp down (low end)", "description": "The lower end of a railroad ramp leading down.", - "connects_to": "WALL", + "connects_with": "WALL", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -414,7 +414,7 @@ "type": "terrain", "id": "t_railroad_ramp_up_high", "name": "railroad ramp up (high end)", - "connects_to": "WALL", + "connects_with": "WALL", "description": "The upper end of a railroad ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -425,7 +425,7 @@ "type": "terrain", "id": "t_railroad_ramp_up_low", "name": "railroad ramp up (low end)", - "connects_to": "RAIL", + "connects_with": "RAIL", "description": "The lower end of a railroad ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -436,7 +436,7 @@ "type": "terrain", "id": "t_concrete_ramp_down_high", "name": "concrete ramp down (high end)", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "The upper end of a concrete ramp leading down.", "symbol": ">", "color": "light_gray", @@ -447,7 +447,7 @@ "type": "terrain", "id": "t_concrete_ramp_down_low", "name": "concrete ramp down (low end)", - "connects_to": "WALL", + "connects_with": "WALL", "description": "The lower end of a concrete ramp leading down.", "symbol": ">", "color": "light_gray", @@ -458,7 +458,7 @@ "type": "terrain", "id": "t_concrete_ramp_up_high", "name": "concrete ramp up (high end)", - "connects_to": "WALL", + "connects_with": "WALL", "description": "The upper end of a concrete ramp leading up.", "symbol": "<", "color": "light_gray", diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json b/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json index 8352596ce8fce..babe8b22fd18a 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json @@ -11,7 +11,7 @@ "coverage": 55, "required_str": -1, "flags": [ "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "FLAT_SURF", "NO_SELF_CONNECT" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "deconstruct": { "items": [ { "item": "plastic_chunk", "count": 3 }, diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json index 076ef1d339fec..f6662a9f909af 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json @@ -26,7 +26,7 @@ "symbol": "LINE_XOXO", "looks_like": "t_rock_wall", "color": "light_gray", - "connects_to": "WALL", + "connects_with": "WALL", "move_cost": 0, "coverage": 100, "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json index f31ce42c7aede..a6d9b80fa1e41 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json @@ -237,7 +237,7 @@ "coverage": 100, "roof": "t_basaltfloor", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 300, @@ -258,7 +258,7 @@ "coverage": 100, "roof": "t_ice", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 50, "str_max": 100, "sound": "crash!", "sound_fail": "whump!", "ter_set": "t_ice" } }, { @@ -272,7 +272,7 @@ "coverage": 100, "roof": "t_snow_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 50, "str_max": 100, "sound": "crash!", "sound_fail": "whump!", "ter_set": "t_null", "bash_below": true } }, { diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json index ed0b58eeb47cb..f9211c6a2823b 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json @@ -8,7 +8,7 @@ "symbol": "LINE_XOXO", "looks_like": "t_wall_metal", "color": "light_gray", - "connects_to": "WALL", + "connects_with": "WALL", "move_cost": 0, "coverage": 100, "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], diff --git a/data/mods/CRT_EXPANSION/constructions/crt_terrain.json b/data/mods/CRT_EXPANSION/constructions/crt_terrain.json index 04d57a51c5a07..9257d8b2e19e5 100644 --- a/data/mods/CRT_EXPANSION/constructions/crt_terrain.json +++ b/data/mods/CRT_EXPANSION/constructions/crt_terrain.json @@ -8,7 +8,7 @@ "color": "brown_white", "move_cost": 0, "flags": [ "FLAMMABLE_HARD", "NOITEM", "SUPPORTS_ROOF", "WALL", "AUTO_WALL_SYMBOL" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 4, "str_max": 12, diff --git a/data/mods/Magiclysm/terrain.json b/data/mods/Magiclysm/terrain.json index 02610694a78db..a428e3e80b04e 100644 --- a/data/mods/Magiclysm/terrain.json +++ b/data/mods/Magiclysm/terrain.json @@ -47,7 +47,7 @@ "coverage": 100, "roof": "t_flat_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL" + "connects_with": "WALL" }, { "type": "terrain", @@ -124,7 +124,7 @@ "coverage": 100, "roof": "t_flat_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 240, "str_max": 560, diff --git a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json index 59f41893e2e67..2e556c3add489 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json @@ -8,7 +8,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "SHALLOW_WATER", "CHOCOLATE" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { @@ -20,7 +20,7 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "CHOCOLATE" ], - "connects_to": "WATER", + "connects_with": "WATER", "examine_action": "water_source" }, { diff --git a/data/mods/No_Hope/terrain.json b/data/mods/No_Hope/terrain.json index cbc04972f6e96..90ac5d99847a8 100644 --- a/data/mods/No_Hope/terrain.json +++ b/data/mods/No_Hope/terrain.json @@ -269,7 +269,7 @@ "color": "red", "move_cost": 2, "roof": "t_flat_roof", - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ], "bash": { "sound": "SMASH!", @@ -291,7 +291,7 @@ "move_cost": 2, "light_emitted": 120, "roof": "t_flat_roof", - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ], "bash": { "str_min": 4, @@ -313,7 +313,7 @@ "color": "light_gray", "move_cost": 2, "roof": "t_flat_roof", - "connects_to": "RAIL", + "connects_with": "RAIL", "flags": [ "TRANSPARENT", "INDOORS", "COLLAPSES", "SUPPORTS_ROOF", "FLAT", "ROAD" ], "bash": { "ter_set": "t_null", "str_min": 75, "str_max": 400, "str_min_supported": 100, "bash_below": true } }, @@ -327,7 +327,7 @@ "looks_like": "t_rock_floor", "move_cost": 2, "light_emitted": 120, - "connects_to": "RAIL", + "connects_with": "RAIL", "roof": "t_flat_roof", "flags": [ "TRANSPARENT", "INDOORS", "COLLAPSES", "SUPPORTS_ROOF", "FLAT", "ROAD" ], "bash": { "ter_set": "t_null", "str_min": 75, "str_max": 400, "str_min_supported": 100, "bash_below": true } diff --git a/data/mods/Rummaging/modinfo.json b/data/mods/Rummaging/modinfo.json index a8c48136b4847..57797f4f2ea04 100644 --- a/data/mods/Rummaging/modinfo.json +++ b/data/mods/Rummaging/modinfo.json @@ -397,7 +397,7 @@ "HIDE_PLACE", "NO_SIGHT" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "max_volume": "350 L", "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": 200000, "volume": "75L" }, @@ -410,7 +410,7 @@ "symbol": "#", "color": "blue", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "FLAT_SURF", "SEALED" ], - "connects_to": "COUNTER", + "connects_with": "COUNTER", "max_volume": "350 L", "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": 200000, "volume": "75L" }, diff --git a/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json b/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json index d40182dc5c0d5..6308fea536890 100644 --- a/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json +++ b/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json @@ -3,7 +3,7 @@ "type": "terrain", "id": "t_pavement", "name": "pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "A segment of asphalt, slowly degrading from cracks, frost heaves and lack of maintenance.", "symbol": ".", "color": "dark_gray", @@ -21,7 +21,7 @@ "type": "terrain", "id": "t_pavement_y", "name": "yellow pavement", - "connects_to": "PAVEMENT", + "connects_with": "PAVEMENT", "description": "Streaks of carefully aligned yellow paint mark the road to inform drivers not to cross. No one is enforcing these rules anymore.", "symbol": ".", "color": "yellow", From fd20e78953a9bf31033ae0f0936cc015c5e25076 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Wed, 28 Sep 2022 15:22:18 +0200 Subject: [PATCH 03/19] use bitsets for connection and rotation group checks --- src/cata_tiles.cpp | 35 ++++++++++++++++++----------------- src/cata_tiles.h | 16 +++++++++++----- src/map.cpp | 18 +++++++++++------- src/map.h | 8 ++++---- src/mapdata.cpp | 30 ++++++------------------------ src/mapdata.h | 21 ++++++++++----------- 6 files changed, 60 insertions(+), 68 deletions(-) diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index 25ed86902e5a2..39b8577a677fb 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -2729,10 +2729,10 @@ bool cata_tiles::draw_terrain( const tripoint &p, const lit_level ll, int &heigh if( t && !invisible[0] ) { int subtile = 0; int rotation = 0; - int connect_group = 0; - int rotate_group = t.obj().rotate_to_group; + const std::bitset &connect_group = t.obj().connect_to_group; + const std::bitset &rotate_group = t.obj().rotate_to_group; - if( t.obj().connects( connect_group ) ) { + if( connect_group.any() ) { get_connect_values( p, subtile, rotation, connect_group, rotate_group, {} ); // re-memorize previously seen terrain in case new connections have been seen here.set_memory_seen_cache_dirty( p ); @@ -2758,10 +2758,10 @@ bool cata_tiles::draw_terrain( const tripoint &p, const lit_level ll, int &heigh // of the tile, so always re-calculate it. int subtile = 0; int rotation = 0; - int connect_group = 0; - int rotate_group = t2.obj().rotate_to_group; + const std::bitset &connect_group = t2.obj().connect_to_group; + const std::bitset &rotate_group = t2.obj().rotate_to_group; - if( t2.obj().connects( connect_group ) ) { + if( connect_group.any() ) { get_connect_values( p, subtile, rotation, connect_group, rotate_group, terrain_override ); } else { get_terrain_orientation( p, rotation, subtile, terrain_override, invisible, rotate_group ); @@ -2917,10 +2917,10 @@ bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &hei }; int subtile = 0; int rotation = 0; - int connect_group = 0; - int rotate_group = f.obj().rotate_to_group; + const std::bitset &connect_group = f.obj().connect_to_group; + const std::bitset &rotate_group = f.obj().rotate_to_group; - if( f.obj().connects( connect_group ) ) { + if( connect_group.any() ) { get_furn_connect_values( p, subtile, rotation, connect_group, rotate_group, {} ); } else { get_tile_values_with_ter( p, f.to_i(), neighborhood, subtile, rotation, rotate_group ); @@ -2956,10 +2956,10 @@ bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &hei }; int subtile = 0; int rotation = 0; - int connect_group = 0; - int rotate_group = f.obj().rotate_to_group; + const std::bitset &connect_group = f.obj().connect_to_group; + const std::bitset &rotate_group = f.obj().rotate_to_group; - if( f.obj().connects( connect_group ) ) { + if( connect_group.any() ) { get_furn_connect_values( p, subtile, rotation, connect_group, rotate_group, {} ); } else { get_tile_values_with_ter( p, f.to_i(), neighborhood, subtile, rotation, rotate_group ); @@ -4285,7 +4285,7 @@ void cata_tiles::init_light() void cata_tiles::get_terrain_orientation( const tripoint &p, int &rota, int &subtile, const std::map &ter_override, const std::array &invisible, - const int rotate_group ) + const std::bitset &rotate_group ) { map &here = get_map(); const bool overridden = ter_override.find( p ) != ter_override.end(); @@ -4561,7 +4561,8 @@ int cata_tiles::get_rotation_unconnected( const char rot_to ) } void cata_tiles::get_connect_values( const tripoint &p, int &subtile, int &rotation, - const int connect_group, const int rotate_to_group, + const std::bitset &connect_group, + const std::bitset &rotate_to_group, const std::map &ter_override ) { uint8_t connections = get_map().get_known_connections( p, connect_group, ter_override ); @@ -4570,8 +4571,8 @@ void cata_tiles::get_connect_values( const tripoint &p, int &subtile, int &rotat } void cata_tiles::get_furn_connect_values( const tripoint &p, int &subtile, int &rotation, - const int connect_group, const int rotate_to_group, const std::map &furn_override ) + const std::bitset &connect_group, const std::bitset &rotate_to_group, + const std::map &furn_override ) { uint8_t connections = get_map().get_known_connections_f( p, connect_group, furn_override ); uint8_t rotation_targets = get_map().get_known_rotates_to_f( p, rotate_to_group, {}, {} ); @@ -4594,7 +4595,7 @@ void cata_tiles::get_tile_values( const int t, const std::array &tn, int void cata_tiles::get_tile_values_with_ter( const tripoint &p, const int t, const std::array &tn, int &subtile, int &rotation, - const int rotate_to_group ) + const std::bitset &rotate_to_group ) { map &here = get_map(); uint8_t rotation_targets = get_map().get_known_rotates_to_f( p, rotate_to_group, {} ); diff --git a/src/cata_tiles.h b/src/cata_tiles.h index f3d53d8fdbc4f..15b092e3602bc 100644 --- a/src/cata_tiles.h +++ b/src/cata_tiles.h @@ -18,6 +18,7 @@ #include "lightmap.h" #include "line.h" #include "map_memory.h" +#include "mapdata.h" #include "options.h" #include "pimpl.h" #include "point.h" @@ -454,15 +455,20 @@ class cata_tiles char rotation_targets ); // as get_tile_values, but for unconnected tiles, infer rotation from surrounding walls void get_tile_values_with_ter( const tripoint &p, int t, const std::array &tn, - int &subtile, int &rotation, int rotate_to_group ); - static void get_connect_values( const tripoint &p, int &subtile, int &rotation, int connect_group, - int rotate_to_group, const std::map &ter_override ); + int &subtile, int &rotation, + const std::bitset &rotate_to_group ); + static void get_connect_values( const tripoint &p, int &subtile, int &rotation, + const std::bitset &connect_group, + const std::bitset &rotate_to_group, + const std::map &ter_override ); static void get_furn_connect_values( const tripoint &p, int &subtile, int &rotation, - int connect_group, int rotate_to_group, + const std::bitset &connect_group, + const std::bitset &rotate_to_group, const std::map &furn_override ); void get_terrain_orientation( const tripoint &p, int &rota, int &subtile, const std::map &ter_override, - const std::array &invisible, int rotate_group ); + const std::array &invisible, + const std::bitset &rotate_group ); static void get_rotation_and_subtile( char val, char rot_to, int &rota, int &subtile ); static int get_rotation_unconnected( char rot_to ); diff --git a/src/map.cpp b/src/map.cpp index 03a19704500c9..97fa1a4b4a585 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1762,7 +1762,8 @@ ter_id map::ter( const tripoint_bub_ms &p ) const return ter( p.raw() ); } -uint8_t map::get_known_connections( const tripoint &p, int connect_group, +uint8_t map::get_known_connections( const tripoint &p, + const std::bitset &connect_group, const std::map &override ) const { if( connect_group == TERCONN_NONE ) { @@ -1818,7 +1819,8 @@ uint8_t map::get_known_connections( const tripoint &p, int connect_group, return val; } -uint8_t map::get_known_rotates_to( const tripoint &p, int rotate_to_group, +uint8_t map::get_known_rotates_to( const tripoint &p, + const std::bitset &rotate_to_group, const std::map &override ) const { if( rotate_to_group == TERCONN_NONE ) { @@ -1846,10 +1848,11 @@ uint8_t map::get_known_rotates_to( const tripoint &p, int rotate_to_group, return val; } -uint8_t map::get_known_connections_f( const tripoint &p, int connect_group, +uint8_t map::get_known_connections_f( const tripoint &p, + const std::bitset &connect_group, const std::map &override ) const { - if( connect_group == TERCONN_NONE ) { + if( connect_group.none() ) { return 0; } @@ -1902,11 +1905,12 @@ uint8_t map::get_known_connections_f( const tripoint &p, int connect_group, return val; } -uint8_t map::get_known_rotates_to_f( const tripoint &p, int rotate_to_group, +uint8_t map::get_known_rotates_to_f( const tripoint &p, + const std::bitset &rotate_to_group, const std::map &override, const std::map &override_f ) const { - if( rotate_to_group == TERCONN_NONE ) { + if( rotate_to_group.none() ) { return CHAR_MAX; } @@ -8560,7 +8564,7 @@ bool map::has_graffiti_at( const tripoint &p ) const int map::determine_wall_corner( const tripoint &p ) const { - int test_connect_group = ter( p ).obj().connect_to_group; + const std::bitset &test_connect_group = ter( p ).obj().connect_to_group; uint8_t connections = get_known_connections( p, test_connect_group ); // The bits in connections are SEWN, whereas the characters in LINE_ // constants are NESW, so we want values in 8 | 2 | 1 | 4 order. diff --git a/src/map.h b/src/map.h index d6012c51dd1d1..0caa1e68a8c91 100644 --- a/src/map.h +++ b/src/map.h @@ -805,10 +805,10 @@ class map // terrain. Additional overrides can be passed in to override terrain // at specific positions. This is used to display terrain overview in // the map editor. - uint8_t get_known_connections( const tripoint &p, int connect_group, + uint8_t get_known_connections( const tripoint &p, const std::bitset &connect_group, const std::map &override = {} ) const; // as above, but for furniture - uint8_t get_known_connections_f( const tripoint &p, int connect_group, + uint8_t get_known_connections_f( const tripoint &p, const std::bitset &connect_group, const std::map &override = {} ) const; // Return a bitfield of the adjacent tiles which rotate towards the given @@ -818,10 +818,10 @@ class map // Based on the true terrain. // Additional overrides can be passed in to override terrain // at specific positions. - uint8_t get_known_rotates_to( const tripoint &p, int rotate_to_group, + uint8_t get_known_rotates_to( const tripoint &p, const std::bitset &rotate_to_group, const std::map &override = {} ) const; // as above, but for furniture (considers neighbouring terrain and furniture) - uint8_t get_known_rotates_to_f( const tripoint &p, int rotate_to_group, + uint8_t get_known_rotates_to_f( const tripoint &p, const std::bitset &rotate_to_group, const std::map &override = {}, const std::map &override_f = {} ) const; diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 79b721d31ee80..315b909c52159 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -662,7 +662,7 @@ void map_data_common_t::set_connects_to( const std::string &connect_group_string { const auto it = ter_connects_map.find( connect_group_string ); if( it != ter_connects_map.end() ) { - connect_to_group = it->second; + connect_to_group.set( it->second ); } else { // arbitrary connect groups are a bad idea for optimization reasons debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); } @@ -672,7 +672,7 @@ void map_data_common_t::set_connects_to_member( const std::string &connect_group { const auto it = ter_connects_map.find( connect_group_string ); if( it != ter_connects_map.end() ) { - connect_to_group_member = it->second; + connect_to_group_member.set( it->second ); } else { // arbitrary connect groups are a bad idea for optimization reasons debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); } @@ -682,8 +682,8 @@ void map_data_common_t::set_connects_with( const std::string &connect_group_stri { const auto it = ter_connects_map.find( connect_group_string ); if( it != ter_connects_map.end() ) { - connect_to_group = it->second; - connect_to_group_member = it->second; + connect_to_group.set( it->second ); + connect_to_group_member.set( it->second ); } else { // arbitrary connect groups are a bad idea for optimization reasons debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); } @@ -693,7 +693,7 @@ void map_data_common_t::set_rotates_to( const std::string &towards_group_string { const auto it = ter_connects_map.find( towards_group_string ); if( it != ter_connects_map.end() ) { - rotate_to_group = it->second; + rotate_to_group.set( it->second ); } else { // arbitrary rotates towards groups are a bad idea for optimization reasons debugmsg( "can't find terrain rotates towards group %s", towards_group_string.c_str() ); } @@ -703,30 +703,12 @@ void map_data_common_t::set_rotates_to_member( const std::string &towards_group_ { const auto it = ter_connects_map.find( towards_group_string ); if( it != ter_connects_map.end() ) { - rotate_to_group_member = it->second; + rotate_to_group_member.set( it->second ); } else { // arbitrary rotates towards groups are a bad idea for optimization reasons debugmsg( "can't find terrain rotates towards group %s", towards_group_string.c_str() ); } } -bool map_data_common_t::connects( int &ret ) const -{ - if( connect_to_group != TERCONN_NONE ) { - ret = connect_to_group; - return true; - } - return false; -} - -bool map_data_common_t::rotates( int &ret ) const -{ - if( rotate_to_group != TERCONN_NONE ) { - ret = rotate_to_group; - return true; - } - return false; -} - ter_id t_null, t_hole, // Real nothingness; makes you fall a z-level // Ground diff --git a/src/mapdata.h b/src/mapdata.h index ba959391dd42f..8f8e89063c01f 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -338,6 +338,8 @@ enum ter_connects : int { TERCONN_METALFLOOR, TERCONN_WOODFLOOR, TERCONN_INDOORFLOOR, + + NUM_TERCONN }; struct activity_byproduct { @@ -540,13 +542,13 @@ struct map_data_common_t { void set_flag( ter_furn_flag flag ); // Terrain group to connect to; not symmetric, target of active part - int connect_to_group = 0; + std::bitset connect_to_group; // Terrain group of this type, for others to connect to; not symmetric, passive part - int connect_to_group_member = 0; + std::bitset connect_to_group_member; // Terrain group rotate towards; not symmetric, target of active part - int rotate_to_group = 0; + std::bitset rotate_to_group; // Terrain group of this type, for others to rotate towards; not symmetric, passive part - int rotate_to_group_member = 0; + std::bitset rotate_to_group_member; // Set target connection group void set_connects_to( const std::string &connect_group_string ); @@ -560,16 +562,13 @@ struct map_data_common_t { // Set to be member of a rotation target group void set_rotates_to_member( const std::string &towards_group_string ); - bool connects( int &ret ) const; - bool rotates( int &ret ) const; - - bool in_connects_to( int test_connect_group ) const { - return connect_to_group_member != TERCONN_NONE && connect_to_group_member == test_connect_group; + bool in_connects_to( const std::bitset &test_connect_group ) const { + return ( connect_to_group_member & test_connect_group ).any(); } // Tests if the type is a member of a rotares_towards group - bool in_rotates_to( int test_rotates_group ) const { - return rotate_to_group_member != TERCONN_NONE && rotate_to_group_member == test_rotates_group; + bool in_rotates_to( const std::bitset &test_rotates_group ) const { + return ( rotate_to_group_member & test_rotates_group ).any(); } int symbol() const; From 32aff49161821409f592ae8ea0e9bcf092cc2f73 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Wed, 28 Sep 2022 16:20:14 +0200 Subject: [PATCH 04/19] allow for reading multiple groups from JSON, auto-add walls and indoor floors --- src/flexbuffer_json-inl.h | 14 +++++ src/flexbuffer_json.h | 1 + src/json.cpp | 13 ++++ src/json.h | 2 + src/mapdata.cpp | 128 ++++++++++++++++++-------------------- src/mapdata.h | 10 +-- 6 files changed, 97 insertions(+), 71 deletions(-) diff --git a/src/flexbuffer_json-inl.h b/src/flexbuffer_json-inl.h index 5ba8b330c5ccf..7b20e79612fde 100644 --- a/src/flexbuffer_json-inl.h +++ b/src/flexbuffer_json-inl.h @@ -949,6 +949,20 @@ inline std::vector JsonObject::get_string_array( const std::string } return ret; } +inline std::vector JsonObject::get_as_string_array( const std::string &name ) const +{ + std::vector ret; + if( has_array( name ) ) { + JsonArray ja = get_array( name ); + ret.reserve( ja.size() ); + for( JsonValue jv : get_array( name ) ) { + ret.emplace_back( jv ); + } + } else { + ret.emplace_back( get_string( name ) ); + } + return ret; +} inline bool JsonObject::has_member( const std::string &key ) const { diff --git a/src/flexbuffer_json.h b/src/flexbuffer_json.h index d0a77ffb216a2..f96e2ff1ccb65 100644 --- a/src/flexbuffer_json.h +++ b/src/flexbuffer_json.h @@ -629,6 +629,7 @@ class JsonObject : JsonWithPath // Sigh. std::vector get_int_array( const std::string &name ) const; std::vector get_string_array( const std::string &name ) const; + std::vector get_as_string_array( const std::string &name ) const; bool has_member( const std::string &key ) const; bool has_member( const char *key ) const; diff --git a/src/json.cpp b/src/json.cpp index df41f282d48fd..204f08042f8b8 100644 --- a/src/json.cpp +++ b/src/json.cpp @@ -412,6 +412,19 @@ std::vector TextJsonObject::get_string_array( const std::string &na return ret; } +std::vector TextJsonObject::get_as_string_array( const std::string &name ) const +{ + std::vector ret; + if( has_array( name ) ) { + for( const std::string entry : get_array( name ) ) { + ret.push_back( entry ); + } + } else { + ret.push_back( get_string( name ) ); + } + return ret; +} + TextJsonObject TextJsonObject::get_object( const std::string &name ) const { int pos = verify_position( name, false ); diff --git a/src/json.h b/src/json.h index 14029944f8117..12ed6a4b46b22 100644 --- a/src/json.h +++ b/src/json.h @@ -1101,6 +1101,8 @@ class TextJsonObject TextJsonArray get_array( const std::string &name ) const; std::vector get_int_array( const std::string &name ) const; std::vector get_string_array( const std::string &name ) const; + // returns a single element array if the sype is string instead of array + std::vector get_as_string_array( const std::string &name ) const; // get_object returns empty object if not found TextJsonObject get_object( const std::string &name ) const; diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 315b909c52159..313f378297f9c 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -629,15 +629,17 @@ void map_data_common_t::extraprocess_flags( const ter_furn_flag flag ) } // wall connection check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_WALL || flag == ter_furn_flag::TFLAG_CONNECT_TO_WALL ) { - set_connects_with( "WALL" ); + set_connects_with( { "WALL" } ); + set_rotates_to_member( { "WALL" } ); } // rotates_to check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_WINDOW || flag == ter_furn_flag::TFLAG_DOOR ) { - set_rotates_to( "INDOORFLOOR" ); + set_rotates_to( { "INDOORFLOOR" } ); } // rotates_to_member check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_INDOORS ) { - set_rotates_to_member( "INDOORFLOOR" ); + set_connects_to_member( { "INDOORFLOOR" } ); + set_rotates_to_member( { "INDOORFLOOR" } ); } } @@ -658,54 +660,66 @@ void map_data_common_t::set_flag( const ter_furn_flag flag ) extraprocess_flags( flag ); } -void map_data_common_t::set_connects_to( const std::string &connect_group_string ) +void map_data_common_t::set_connects_to( const std::vector &connect_group_string ) { - const auto it = ter_connects_map.find( connect_group_string ); - if( it != ter_connects_map.end() ) { - connect_to_group.set( it->second ); - } else { // arbitrary connect groups are a bad idea for optimization reasons - debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); + for( const std::string &group : connect_group_string ) { + const auto it = ter_connects_map.find( group ); + if( it != ter_connects_map.end() ) { + connect_to_group.set( it->second ); + } else { // arbitrary connect groups are a bad idea for optimization reasons + debugmsg( "can't find terrain connection group %s", group.c_str() ); + } } } -void map_data_common_t::set_connects_to_member( const std::string &connect_group_string ) +void map_data_common_t::set_connects_to_member( const std::vector + &connect_group_string ) { - const auto it = ter_connects_map.find( connect_group_string ); - if( it != ter_connects_map.end() ) { - connect_to_group_member.set( it->second ); - } else { // arbitrary connect groups are a bad idea for optimization reasons - debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); + for( const std::string &group : connect_group_string ) { + const auto it = ter_connects_map.find( group ); + if( it != ter_connects_map.end() ) { + connect_to_group_member.set( it->second ); + } else { // arbitrary connect groups are a bad idea for optimization reasons + debugmsg( "can't find terrain connection group %s", group.c_str() ); + } } } -void map_data_common_t::set_connects_with( const std::string &connect_group_string ) +void map_data_common_t::set_connects_with( const std::vector &connect_group_string ) { - const auto it = ter_connects_map.find( connect_group_string ); - if( it != ter_connects_map.end() ) { - connect_to_group.set( it->second ); - connect_to_group_member.set( it->second ); - } else { // arbitrary connect groups are a bad idea for optimization reasons - debugmsg( "can't find terrain connection group %s", connect_group_string.c_str() ); + for( const std::string &group : connect_group_string ) { + const auto it = ter_connects_map.find( group ); + if( it != ter_connects_map.end() ) { + connect_to_group.set( it->second ); + connect_to_group_member.set( it->second ); + } else { // arbitrary connect groups are a bad idea for optimization reasons + debugmsg( "can't find terrain connection group %s", group.c_str() ); + } } } -void map_data_common_t::set_rotates_to( const std::string &towards_group_string ) +void map_data_common_t::set_rotates_to( const std::vector &towards_group_string ) { - const auto it = ter_connects_map.find( towards_group_string ); - if( it != ter_connects_map.end() ) { - rotate_to_group.set( it->second ); - } else { // arbitrary rotates towards groups are a bad idea for optimization reasons - debugmsg( "can't find terrain rotates towards group %s", towards_group_string.c_str() ); + for( const std::string &group : towards_group_string ) { + const auto it = ter_connects_map.find( group ); + if( it != ter_connects_map.end() ) { + rotate_to_group.set( it->second ); + } else { // arbitrary rotates towards groups are a bad idea for optimization reasons + debugmsg( "can't find terrain rotates towards group %s", group.c_str() ); + } } } -void map_data_common_t::set_rotates_to_member( const std::string &towards_group_string ) +void map_data_common_t::set_rotates_to_member( const std::vector + &towards_group_string ) { - const auto it = ter_connects_map.find( towards_group_string ); - if( it != ter_connects_map.end() ) { - rotate_to_group_member.set( it->second ); - } else { // arbitrary rotates towards groups are a bad idea for optimization reasons - debugmsg( "can't find terrain rotates towards group %s", towards_group_string.c_str() ); + for( const std::string &group : towards_group_string ) { + const auto it = ter_connects_map.find( group ); + if( it != ter_connects_map.end() ) { + rotate_to_group_member.set( it->second ); + } else { // arbitrary rotates towards groups are a bad idea for optimization reasons + debugmsg( "can't find terrain rotates towards group %s", group.c_str() ); + } } } @@ -1433,30 +1447,21 @@ void ter_t::load( const JsonObject &jo, const std::string &src ) // connect_to_group is initialized to none, then terrain flags are set, then finally // connections from JSON are set. This is so that wall flags can set wall connections // but can be overridden by explicit connections in JSON. - bool asymmetric_set = false; + if( jo.has_member( "connects_with" ) ) { + set_connects_with( jo.get_as_string_array( "connects_with" ) ); + } if( jo.has_member( "connects_to" ) ) { - set_connects_to( jo.get_string( "connects_to" ) ); - asymmetric_set = true; + set_connects_to( jo.get_as_string_array( "connects_to" ) ); } if( jo.has_member( "connects_to_member" ) ) { - set_connects_to_member( jo.get_string( "connects_to_member" ) ); - asymmetric_set = true; - } - if( jo.has_member( "connects_with" ) ) { - if( asymmetric_set ) { - debugmsg( "Can use only either 'connects_with', or 'connects_to' and 'connects_to_member' in %s!", - name_ ); - } else { - const std::string g = jo.get_string( "connects_with" ); - set_connects_with( g ); - } + set_connects_to_member( jo.get_as_string_array( "connects_to_member" ) ); } if( jo.has_member( "rotates_to" ) ) { - set_rotates_to( jo.get_string( "rotates_to" ) ); + set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } if( jo.has_member( "rotates_to_member" ) ) { - set_rotates_to_member( jo.get_string( "rotates_to_member" ) ); + set_rotates_to_member( jo.get_as_string_array( "rotates_to_member" ) ); } optional( jo, was_loaded, "allowed_template_ids", allowed_template_id ); @@ -1625,30 +1630,21 @@ void furn_t::load( const JsonObject &jo, const std::string &src ) set_flag( flag ); } - bool asymmetric_set = false; + if( jo.has_member( "connects_with" ) ) { + set_connects_with( jo.get_as_string_array( "connects_with" ) ); + } if( jo.has_member( "connects_to" ) ) { - set_connects_to( jo.get_string( "connects_to" ) ); - asymmetric_set = true; + set_connects_to( jo.get_as_string_array( "connects_to" ) ); } if( jo.has_member( "connects_to_member" ) ) { - set_connects_to_member( jo.get_string( "connects_to_member" ) ); - asymmetric_set = true; - } - if( jo.has_member( "connects_with" ) ) { - if( asymmetric_set ) { - debugmsg( "Can use only either 'connects_with', or 'connects_to' and 'connects_to_member' in %s!", - name_ ); - } else { - const std::string g = jo.get_string( "connects_with" ); - set_connects_with( g ); - } + set_connects_to_member( jo.get_as_string_array( "connects_to_member" ) ); } if( jo.has_member( "rotates_to" ) ) { - set_rotates_to( jo.get_string( "rotates_to" ) ); + set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } if( jo.has_member( "rotates_to_member" ) ) { - set_rotates_to_member( jo.get_string( "rotates_to_member" ) ); + set_rotates_to_member( jo.get_as_string_array( "rotates_to_member" ) ); } optional( jo, was_loaded, "open", open, string_id_reader {}, furn_str_id::NULL_ID() ); diff --git a/src/mapdata.h b/src/mapdata.h index 8f8e89063c01f..3ee7db6799109 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -551,16 +551,16 @@ struct map_data_common_t { std::bitset rotate_to_group_member; // Set target connection group - void set_connects_to( const std::string &connect_group_string ); + void set_connects_to( const std::vector &connect_group_string ); // Set to be member of a connection target group - void set_connects_to_member( const std::string &connect_group_string ); + void set_connects_to_member( const std::vector &connect_group_string ); // Set bidirectional connection group - void set_connects_with( const std::string &connect_group_string ); + void set_connects_with( const std::vector &connect_group_string ); // Set target group to rotate towards - void set_rotates_to( const std::string &towards_group_string ); + void set_rotates_to( const std::vector &towards_group_string ); // Set to be member of a rotation target group - void set_rotates_to_member( const std::string &towards_group_string ); + void set_rotates_to_member( const std::vector &towards_group_string ); bool in_connects_to( const std::bitset &test_connect_group ) const { return ( connect_to_group_member & test_connect_group ).any(); From 47d680a0e5b4994c13663203cefcd8f9c02d3dd7 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Wed, 28 Sep 2022 20:59:02 +0200 Subject: [PATCH 05/19] use pavement markings as a first example for asymmetric connection --- data/json/furniture_and_terrain/terrain-floors-outdoors.json | 3 ++- src/mapdata.cpp | 1 + src/mapdata.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/json/furniture_and_terrain/terrain-floors-outdoors.json b/data/json/furniture_and_terrain/terrain-floors-outdoors.json index 6ebdafd5c51b9..e30c862ff81f5 100644 --- a/data/json/furniture_and_terrain/terrain-floors-outdoors.json +++ b/data/json/furniture_and_terrain/terrain-floors-outdoors.json @@ -234,7 +234,8 @@ "type": "terrain", "id": "t_pavement_y", "name": "yellow pavement", - "connects_with": "PAVEMENT", + "connects_to": "PAVEMENT_MARKING", + "connects_to_member": ["PAVEMENT", "PAVEMENT_MARKING"], "description": "Streaks of carefully aligned yellow paint mark the road to inform drivers not to cross. No one is enforcing these rules anymore.", "symbol": ".", "color": "yellow", diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 313f378297f9c..e0b3f42d6d4b0 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -274,6 +274,7 @@ static const std::unordered_map ter_connects_map = { { "WATER", TERCONN_WATER }, { "POOLWATER", TERCONN_POOLWATER }, { "PAVEMENT", TERCONN_PAVEMENT }, + { "PAVEMENT_MARKING", TERCONN_PAVEMENT_MARKING }, { "RAIL", TERCONN_RAIL }, { "COUNTER", TERCONN_COUNTER }, { "CANVAS_WALL", TERCONN_CANVAS_WALL }, diff --git a/src/mapdata.h b/src/mapdata.h index 3ee7db6799109..490b880d26793 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -323,6 +323,7 @@ enum ter_connects : int { TERCONN_POOLWATER, TERCONN_WATER, TERCONN_PAVEMENT, + TERCONN_PAVEMENT_MARKING, TERCONN_RAIL, TERCONN_COUNTER, TERCONN_CANVAS_WALL, From 6e10f4f29105235507351cbb4f9a7e3956f6e98e Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Wed, 28 Sep 2022 23:30:20 +0200 Subject: [PATCH 06/19] make newly added colored wall use bi-directional connections --- .../furniture_and_terrain/terrain-walls.json | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/data/json/furniture_and_terrain/terrain-walls.json b/data/json/furniture_and_terrain/terrain-walls.json index eaabbcff1606d..f1a83e2566c83 100644 --- a/data/json/furniture_and_terrain/terrain-walls.json +++ b/data/json/furniture_and_terrain/terrain-walls.json @@ -493,7 +493,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -516,7 +516,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -539,7 +539,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -562,7 +562,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -585,7 +585,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -608,7 +608,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -631,7 +631,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -654,7 +654,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -677,7 +677,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -700,7 +700,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -723,7 +723,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -746,7 +746,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -769,7 +769,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -792,7 +792,7 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_to": "WALL", + "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, From 36e9573b3d39c8613b242414fcc1d953583a76a5 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Wed, 28 Sep 2022 23:45:25 +0200 Subject: [PATCH 07/19] fix JSON linter warning --- data/json/furniture_and_terrain/terrain-floors-outdoors.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/furniture_and_terrain/terrain-floors-outdoors.json b/data/json/furniture_and_terrain/terrain-floors-outdoors.json index e30c862ff81f5..4293c29c789f5 100644 --- a/data/json/furniture_and_terrain/terrain-floors-outdoors.json +++ b/data/json/furniture_and_terrain/terrain-floors-outdoors.json @@ -235,7 +235,7 @@ "id": "t_pavement_y", "name": "yellow pavement", "connects_to": "PAVEMENT_MARKING", - "connects_to_member": ["PAVEMENT", "PAVEMENT_MARKING"], + "connects_to_member": [ "PAVEMENT", "PAVEMENT_MARKING" ], "description": "Streaks of carefully aligned yellow paint mark the road to inform drivers not to cross. No one is enforcing these rules anymore.", "symbol": ".", "color": "yellow", From 1b0001a6002e5f66497b09c6dd429dab53437694 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Thu, 29 Sep 2022 10:38:12 +0200 Subject: [PATCH 08/19] adapt tests to use bitsets --- tests/connect_rotate_test.cpp | 148 ++++++++++++++++++++-------------- 1 file changed, 89 insertions(+), 59 deletions(-) diff --git a/tests/connect_rotate_test.cpp b/tests/connect_rotate_test.cpp index 0d79e61c405fc..7ebbfc6ba2b5b 100644 --- a/tests/connect_rotate_test.cpp +++ b/tests/connect_rotate_test.cpp @@ -14,7 +14,8 @@ class cata_tiles_test_helper { public: static void get_connect_values( const tripoint &p, int &subtile, int &rotation, - int connect_group, int rotate_to_group ) { + const std::bitset &connect_group, + const std::bitset &rotate_to_group ) { cata_tiles::get_connect_values( p, subtile, rotation, connect_group, rotate_to_group, {} ); } }; @@ -25,6 +26,10 @@ TEST_CASE( "walls should be unconnected without nearby walls", "[multitile][conn clear_map(); clear_avatar(); + std::bitset none; + std::bitset wall; + wall.set( TERCONN_WALL ); + tripoint pos = get_avatar().pos() + point_east + point_east; int subtile = 0; @@ -38,8 +43,8 @@ TEST_CASE( "walls should be unconnected without nearby walls", "[multitile][conn REQUIRE( here.ter_set( pos + point_north, t_floor ) ); THEN( "the wall should be unconnected" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == unconnected ); CHECK( rotation == 0 ); } @@ -51,6 +56,10 @@ TEST_CASE( "walls should connect to walls as end pieces", "[multitile][connects] clear_map(); clear_avatar(); + std::bitset none; + std::bitset wall; + wall.set( TERCONN_WALL ); + tripoint pos = get_avatar().pos() + point_east + point_east; int subtile = 0; @@ -64,8 +73,8 @@ TEST_CASE( "walls should connect to walls as end pieces", "[multitile][connects] REQUIRE( here.ter_set( pos + point_west, t_floor ) ); THEN( "the wall should be connected as end_piece N" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == end_piece ); CHECK( rotation == 0 ); } @@ -77,8 +86,8 @@ TEST_CASE( "walls should connect to walls as end pieces", "[multitile][connects] REQUIRE( here.ter_set( pos + point_west, t_floor ) ); THEN( "the wall should be connected as end_piece W" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == end_piece ); CHECK( rotation == 1 ); } @@ -90,8 +99,8 @@ TEST_CASE( "walls should connect to walls as end pieces", "[multitile][connects] REQUIRE( here.ter_set( pos + point_west, t_floor ) ); THEN( "the wall should be connected as end_piece S" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == end_piece ); CHECK( rotation == 2 ); } @@ -103,8 +112,8 @@ TEST_CASE( "walls should connect to walls as end pieces", "[multitile][connects] REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as end_piece E" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == end_piece ); CHECK( rotation == 3 ); } @@ -116,6 +125,10 @@ TEST_CASE( "walls should connect to walls as corners", "[multitile][connects]" ) clear_map(); clear_avatar(); + std::bitset none; + std::bitset wall; + wall.set( TERCONN_WALL ); + tripoint pos = get_avatar().pos() + point_east + point_east; int subtile = 0; @@ -129,8 +142,8 @@ TEST_CASE( "walls should connect to walls as corners", "[multitile][connects]" ) REQUIRE( here.ter_set( pos + point_west, t_floor ) ); THEN( "the wall should be connected as corner NW" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == corner ); CHECK( rotation == 0 ); } @@ -142,8 +155,8 @@ TEST_CASE( "walls should connect to walls as corners", "[multitile][connects]" ) REQUIRE( here.ter_set( pos + point_west, t_floor ) ); THEN( "the wall should be connected as corner SW" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == corner ); CHECK( rotation == 1 ); } @@ -155,8 +168,8 @@ TEST_CASE( "walls should connect to walls as corners", "[multitile][connects]" ) REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as corner SE" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == corner ); CHECK( rotation == 2 ); } @@ -168,8 +181,8 @@ TEST_CASE( "walls should connect to walls as corners", "[multitile][connects]" ) REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as corner NE" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == corner ); CHECK( rotation == 3 ); } @@ -181,6 +194,10 @@ TEST_CASE( "walls should connect to walls as edges", "[multitile][connects]" ) clear_map(); clear_avatar(); + std::bitset none; + std::bitset wall; + wall.set( TERCONN_WALL ); + tripoint pos = get_avatar().pos() + point_east + point_east; int subtile = 0; @@ -194,8 +211,8 @@ TEST_CASE( "walls should connect to walls as edges", "[multitile][connects]" ) REQUIRE( here.ter_set( pos + point_west, t_floor ) ); THEN( "the wall should be connected as edge NS" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == edge ); CHECK( rotation == 0 ); } @@ -207,8 +224,8 @@ TEST_CASE( "walls should connect to walls as edges", "[multitile][connects]" ) REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as edge EW" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == edge ); CHECK( rotation == 1 ); } @@ -220,6 +237,10 @@ TEST_CASE( "walls should connect to walls as t-connections and fully", "[multiti clear_map(); clear_avatar(); + std::bitset none; + std::bitset wall; + wall.set( TERCONN_WALL ); + tripoint pos = get_avatar().pos() + point_east + point_east; int subtile = 0; @@ -233,8 +254,8 @@ TEST_CASE( "walls should connect to walls as t-connections and fully", "[multiti REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as t-connection N" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == t_connection ); CHECK( rotation == 0 ); } @@ -246,8 +267,8 @@ TEST_CASE( "walls should connect to walls as t-connections and fully", "[multiti REQUIRE( here.ter_set( pos + point_west, t_floor ) ); THEN( "the wall should be connected as t-connection W" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == t_connection ); CHECK( rotation == 1 ); } @@ -259,8 +280,8 @@ TEST_CASE( "walls should connect to walls as t-connections and fully", "[multiti REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as t-connection S" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == t_connection ); CHECK( rotation == 2 ); } @@ -272,8 +293,8 @@ TEST_CASE( "walls should connect to walls as t-connections and fully", "[multiti REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as t-connection E" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == t_connection ); CHECK( rotation == 3 ); } @@ -286,8 +307,8 @@ TEST_CASE( "walls should connect to walls as t-connections and fully", "[multiti REQUIRE( here.ter_set( pos + point_west, t_wall ) ); THEN( "the wall should be connected as center" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_NONE ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, none ); CHECK( subtile == center ); CHECK( rotation == 0 ); } @@ -300,6 +321,11 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi clear_map(); clear_avatar(); + std::bitset floor; + floor.set( TERCONN_INDOORFLOOR ); + std::bitset wall; + wall.set( TERCONN_WALL ); + tripoint pos = get_avatar().pos() + point_east + point_east; int subtile = 0; @@ -313,8 +339,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_wall ) ); THEN( "the window should be connected as NS, with W positive" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 0 ); } @@ -326,8 +352,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_floor ) ); THEN( "the window should be connected EW, with N positive" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 3 ); } @@ -339,8 +365,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_wall ) ); THEN( "the window should be connected as NS, with E positive" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 2 ); } @@ -352,8 +378,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_pavement ) ); THEN( "the window should be connected as EW, with S positive" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 1 ); } @@ -366,8 +392,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_wall ) ); THEN( "the window should be connected as NS, with E and W negative" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 4 ); } @@ -379,8 +405,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_pavement ) ); THEN( "the window should be connected as EW, with N and S negative" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 7 ); } @@ -392,8 +418,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_wall ) ); THEN( "the window should be connected as NS, with E and W negative" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 6 ); } @@ -405,8 +431,8 @@ TEST_CASE( "windows should connect to walls and rotate to indoor floor", "[multi REQUIRE( here.ter_set( pos + point_north, t_floor ) ); THEN( "the window should be connected as EW, with N and S positive" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_WALL, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + wall, floor ); CHECK( subtile == edge ); CHECK( rotation == 5 ); } @@ -419,6 +445,10 @@ TEST_CASE( "unconnected windows rotate to indoor floor", "[multitile][rotates]" clear_map(); clear_avatar(); + std::bitset none; + std::bitset floor; + floor.set( TERCONN_INDOORFLOOR ); + tripoint pos = get_avatar().pos() + point_east + point_east; int subtile = 0; @@ -432,8 +462,8 @@ TEST_CASE( "unconnected windows rotate to indoor floor", "[multitile][rotates]" REQUIRE( here.ter_set( pos + point_north, t_pavement ) ); THEN( "the window should be unconnected" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_NONE, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + none, floor ); CHECK( subtile == unconnected ); CHECK( rotation == 15 ); } @@ -446,8 +476,8 @@ TEST_CASE( "unconnected windows rotate to indoor floor", "[multitile][rotates]" REQUIRE( here.ter_set( pos + point_north, t_floor ) ); THEN( "the window rotate to the north" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_NONE, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + none, floor ); CHECK( subtile == unconnected ); CHECK( rotation == 2 ); } @@ -459,8 +489,8 @@ TEST_CASE( "unconnected windows rotate to indoor floor", "[multitile][rotates]" REQUIRE( here.ter_set( pos + point_north, t_pavement ) ); THEN( "the window rotate to the east" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_NONE, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + none, floor ); CHECK( subtile == unconnected ); CHECK( rotation == 3 ); } @@ -472,8 +502,8 @@ TEST_CASE( "unconnected windows rotate to indoor floor", "[multitile][rotates]" REQUIRE( here.ter_set( pos + point_north, t_pavement ) ); THEN( "the window rotate to the south" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_NONE, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + none, floor ); CHECK( subtile == unconnected ); CHECK( rotation == 0 ); } @@ -485,8 +515,8 @@ TEST_CASE( "unconnected windows rotate to indoor floor", "[multitile][rotates]" REQUIRE( here.ter_set( pos + point_north, t_pavement ) ); THEN( "the window rotate to the west" ) { - cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, TERCONN_NONE, - TERCONN_INDOORFLOOR ); + cata_tiles_test_helper::get_connect_values( pos, subtile, rotation, + none, floor ); CHECK( subtile == unconnected ); CHECK( rotation == 1 ); } From df2c3e9d4aeb59930cf227dc8bd01d805d7c31c7 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Thu, 29 Sep 2022 22:30:56 +0200 Subject: [PATCH 09/19] rework code side to have only a single list for group membership, for rotation as well as connections --- src/cata_tiles.cpp | 18 +++++----- src/map.cpp | 15 +++++---- src/mapdata.cpp | 82 +++++++++++----------------------------------- src/mapdata.h | 32 ++++++------------ 4 files changed, 47 insertions(+), 100 deletions(-) diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index 39b8577a677fb..cfceb7ae93de4 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -2729,8 +2729,8 @@ bool cata_tiles::draw_terrain( const tripoint &p, const lit_level ll, int &heigh if( t && !invisible[0] ) { int subtile = 0; int rotation = 0; - const std::bitset &connect_group = t.obj().connect_to_group; - const std::bitset &rotate_group = t.obj().rotate_to_group; + const std::bitset &connect_group = t.obj().connect_to_groups; + const std::bitset &rotate_group = t.obj().rotate_to_groups; if( connect_group.any() ) { get_connect_values( p, subtile, rotation, connect_group, rotate_group, {} ); @@ -2758,8 +2758,8 @@ bool cata_tiles::draw_terrain( const tripoint &p, const lit_level ll, int &heigh // of the tile, so always re-calculate it. int subtile = 0; int rotation = 0; - const std::bitset &connect_group = t2.obj().connect_to_group; - const std::bitset &rotate_group = t2.obj().rotate_to_group; + const std::bitset &connect_group = t2.obj().connect_to_groups; + const std::bitset &rotate_group = t2.obj().rotate_to_groups; if( connect_group.any() ) { get_connect_values( p, subtile, rotation, connect_group, rotate_group, terrain_override ); @@ -2917,8 +2917,8 @@ bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &hei }; int subtile = 0; int rotation = 0; - const std::bitset &connect_group = f.obj().connect_to_group; - const std::bitset &rotate_group = f.obj().rotate_to_group; + const std::bitset &connect_group = f.obj().connect_to_groups; + const std::bitset &rotate_group = f.obj().rotate_to_groups; if( connect_group.any() ) { get_furn_connect_values( p, subtile, rotation, connect_group, rotate_group, {} ); @@ -2956,8 +2956,8 @@ bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &hei }; int subtile = 0; int rotation = 0; - const std::bitset &connect_group = f.obj().connect_to_group; - const std::bitset &rotate_group = f.obj().rotate_to_group; + const std::bitset &connect_group = f.obj().connect_to_groups; + const std::bitset &rotate_group = f.obj().rotate_to_groups; if( connect_group.any() ) { get_furn_connect_values( p, subtile, rotation, connect_group, rotate_group, {} ); @@ -4660,7 +4660,7 @@ void cata_tiles::get_tile_values_with_ter( case 11: // south opening T case 15: // surrounded default: // just in case - rotation = rotate_to_group == TERCONN_NONE ? 0 : 15; + rotation = rotate_to_group.none() ? 0 : 15; break; } diff --git a/src/map.cpp b/src/map.cpp index 97fa1a4b4a585..037bb112f1d71 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1766,7 +1766,7 @@ uint8_t map::get_known_connections( const tripoint &p, const std::bitset &connect_group, const std::map &override ) const { - if( connect_group == TERCONN_NONE ) { + if( connect_group.none() ) { return 0; } @@ -1810,7 +1810,7 @@ uint8_t map::get_known_connections( const tripoint &p, if( may_connect ) { const ter_t &neighbour_terrain = neighbour_overridden ? neighbour_override->second.obj() : ter( neighbour ).obj(); - if( neighbour_terrain.in_connects_to( connect_group ) ) { + if( neighbour_terrain.in_connect_groups( connect_group ) ) { val += 1 << i; } } @@ -1823,7 +1823,7 @@ uint8_t map::get_known_rotates_to( const tripoint &p, const std::bitset &rotate_to_group, const std::map &override ) const { - if( rotate_to_group == TERCONN_NONE ) { + if( rotate_to_group.none() ) { return CHAR_MAX; } @@ -1840,7 +1840,7 @@ uint8_t map::get_known_rotates_to( const tripoint &p, const ter_t &neighbour_terrain = neighbour_overridden ? neighbour_override->second.obj() : ter( neighbour ).obj(); - if( neighbour_terrain.in_rotates_to( rotate_to_group ) ) { + if( neighbour_terrain.in_connect_groups( rotate_to_group ) ) { val += 1 << i; } } @@ -1896,7 +1896,7 @@ uint8_t map::get_known_connections_f( const tripoint &p, if( may_connect ) { const furn_t &neighbour_furn = neighbour_overridden ? neighbour_override->second.obj() : furn( pt ).obj(); - if( neighbour_furn.in_connects_to( connect_group ) ) { + if( neighbour_furn.in_connect_groups( connect_group ) ) { val += 1 << i; } } @@ -1934,7 +1934,8 @@ uint8_t map::get_known_rotates_to_f( const tripoint &p, const furn_t &neighbour_f = neighbour_overridden_f ? neighbour_override_f->second.obj() : furn( pt ).obj(); - if( neighbour.in_rotates_to( rotate_to_group ) || neighbour_f.in_rotates_to( rotate_to_group ) ) { + if( neighbour.in_connect_groups( rotate_to_group ) || + neighbour_f.in_connect_groups( rotate_to_group ) ) { val += 1 << i; } } @@ -8564,7 +8565,7 @@ bool map::has_graffiti_at( const tripoint &p ) const int map::determine_wall_corner( const tripoint &p ) const { - const std::bitset &test_connect_group = ter( p ).obj().connect_to_group; + const std::bitset &test_connect_group = ter( p ).obj().connect_to_groups; uint8_t connections = get_known_connections( p, test_connect_group ); // The bits in connections are SEWN, whereas the characters in LINE_ // constants are NESW, so we want values in 8 | 2 | 1 | 4 order. diff --git a/src/mapdata.cpp b/src/mapdata.cpp index e0b3f42d6d4b0..85a9a858b76e2 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -630,8 +630,8 @@ void map_data_common_t::extraprocess_flags( const ter_furn_flag flag ) } // wall connection check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_WALL || flag == ter_furn_flag::TFLAG_CONNECT_TO_WALL ) { - set_connects_with( { "WALL" } ); - set_rotates_to_member( { "WALL" } ); + set_connect_groups( { "WALL" } ); + set_connects_to( { "WALL" } ); } // rotates_to check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_WINDOW || flag == ter_furn_flag::TFLAG_DOOR ) { @@ -639,8 +639,7 @@ void map_data_common_t::extraprocess_flags( const ter_furn_flag flag ) } // rotates_to_member check for JSON backwards compatibility if( flag == ter_furn_flag::TFLAG_INDOORS ) { - set_connects_to_member( { "INDOORFLOOR" } ); - set_rotates_to_member( { "INDOORFLOOR" } ); + set_connect_groups( { "INDOORFLOOR" } ); } } @@ -661,38 +660,25 @@ void map_data_common_t::set_flag( const ter_furn_flag flag ) extraprocess_flags( flag ); } -void map_data_common_t::set_connects_to( const std::vector &connect_group_string ) -{ - for( const std::string &group : connect_group_string ) { - const auto it = ter_connects_map.find( group ); - if( it != ter_connects_map.end() ) { - connect_to_group.set( it->second ); - } else { // arbitrary connect groups are a bad idea for optimization reasons - debugmsg( "can't find terrain connection group %s", group.c_str() ); - } - } -} - -void map_data_common_t::set_connects_to_member( const std::vector +void map_data_common_t::set_connect_groups( const std::vector &connect_group_string ) { for( const std::string &group : connect_group_string ) { const auto it = ter_connects_map.find( group ); if( it != ter_connects_map.end() ) { - connect_to_group_member.set( it->second ); + connect_groups.set( it->second ); } else { // arbitrary connect groups are a bad idea for optimization reasons debugmsg( "can't find terrain connection group %s", group.c_str() ); } } } -void map_data_common_t::set_connects_with( const std::vector &connect_group_string ) +void map_data_common_t::set_connects_to( const std::vector &connect_group_string ) { for( const std::string &group : connect_group_string ) { const auto it = ter_connects_map.find( group ); if( it != ter_connects_map.end() ) { - connect_to_group.set( it->second ); - connect_to_group_member.set( it->second ); + connect_to_groups.set( it->second ); } else { // arbitrary connect groups are a bad idea for optimization reasons debugmsg( "can't find terrain connection group %s", group.c_str() ); } @@ -704,20 +690,7 @@ void map_data_common_t::set_rotates_to( const std::vector &towards_ for( const std::string &group : towards_group_string ) { const auto it = ter_connects_map.find( group ); if( it != ter_connects_map.end() ) { - rotate_to_group.set( it->second ); - } else { // arbitrary rotates towards groups are a bad idea for optimization reasons - debugmsg( "can't find terrain rotates towards group %s", group.c_str() ); - } - } -} - -void map_data_common_t::set_rotates_to_member( const std::vector - &towards_group_string ) -{ - for( const std::string &group : towards_group_string ) { - const auto it = ter_connects_map.find( group ); - if( it != ter_connects_map.end() ) { - rotate_to_group_member.set( it->second ); + rotate_to_groups.set( it->second ); } else { // arbitrary rotates towards groups are a bad idea for optimization reasons debugmsg( "can't find terrain rotates towards group %s", group.c_str() ); } @@ -1437,33 +1410,25 @@ void ter_t::load( const JsonObject &jo, const std::string &src ) trap = tr_null; transparent = false; - connect_to_group = TERCONN_NONE; - connect_to_group_member = TERCONN_NONE; - rotate_to_group = TERCONN_NONE; - rotate_to_group_member = TERCONN_NONE; + connect_groups.reset(); + connect_to_groups.reset(); + rotate_to_groups.reset(); for( auto &flag : jo.get_string_array( "flags" ) ) { set_flag( flag ); } - // connect_to_group is initialized to none, then terrain flags are set, then finally + // connect_to_groups is initialized to none, then terrain flags are set, then finally // connections from JSON are set. This is so that wall flags can set wall connections // but can be overridden by explicit connections in JSON. - if( jo.has_member( "connects_with" ) ) { - set_connects_with( jo.get_as_string_array( "connects_with" ) ); + if( jo.has_member( "connect_groups" ) ) { + set_connect_groups( jo.get_as_string_array( "connect_groups" ) ); } if( jo.has_member( "connects_to" ) ) { set_connects_to( jo.get_as_string_array( "connects_to" ) ); } - if( jo.has_member( "connects_to_member" ) ) { - set_connects_to_member( jo.get_as_string_array( "connects_to_member" ) ); - } - if( jo.has_member( "rotates_to" ) ) { set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } - if( jo.has_member( "rotates_to_member" ) ) { - set_rotates_to_member( jo.get_as_string_array( "rotates_to_member" ) ); - } optional( jo, was_loaded, "allowed_template_ids", allowed_template_id ); @@ -1623,30 +1588,23 @@ void furn_t::load( const JsonObject &jo, const std::string &src ) optional( jo, was_loaded, "light_emitted", light_emitted ); // see the comment in ter_id::load for connect_group handling - connect_to_group = TERCONN_NONE; - connect_to_group_member = TERCONN_NONE; - rotate_to_group = TERCONN_NONE; - rotate_to_group_member = TERCONN_NONE; + connect_groups.reset(); + connect_to_groups.reset(); + rotate_to_groups.reset(); + for( auto &flag : jo.get_string_array( "flags" ) ) { set_flag( flag ); } - if( jo.has_member( "connects_with" ) ) { - set_connects_with( jo.get_as_string_array( "connects_with" ) ); + if( jo.has_member( "connect_groups" ) ) { + set_connect_groups( jo.get_as_string_array( "connect_groups" ) ); } if( jo.has_member( "connects_to" ) ) { set_connects_to( jo.get_as_string_array( "connects_to" ) ); } - if( jo.has_member( "connects_to_member" ) ) { - set_connects_to_member( jo.get_as_string_array( "connects_to_member" ) ); - } - if( jo.has_member( "rotates_to" ) ) { set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } - if( jo.has_member( "rotates_to_member" ) ) { - set_rotates_to_member( jo.get_as_string_array( "rotates_to_member" ) ); - } optional( jo, was_loaded, "open", open, string_id_reader {}, furn_str_id::NULL_ID() ); optional( jo, was_loaded, "close", close, string_id_reader {}, furn_str_id::NULL_ID() ); diff --git a/src/mapdata.h b/src/mapdata.h index 490b880d26793..162ccc54defd7 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -542,34 +542,22 @@ struct map_data_common_t { void set_flag( ter_furn_flag flag ); - // Terrain group to connect to; not symmetric, target of active part - std::bitset connect_to_group; - // Terrain group of this type, for others to connect to; not symmetric, passive part - std::bitset connect_to_group_member; - // Terrain group rotate towards; not symmetric, target of active part - std::bitset rotate_to_group; - // Terrain group of this type, for others to rotate towards; not symmetric, passive part - std::bitset rotate_to_group_member; + // Terrain groups of this type, for others to connect or rotate to; not symmetric, passive part + std::bitset connect_groups; + // Terrain groups to connect to; not symmetric, target of active part + std::bitset connect_to_groups; + // Terrain groups rotate towards; not symmetric, target of active part + std::bitset rotate_to_groups; + // Set to be member of a connection target group + void set_connect_groups( const std::vector &connect_group_string ); // Set target connection group void set_connects_to( const std::vector &connect_group_string ); - // Set to be member of a connection target group - void set_connects_to_member( const std::vector &connect_group_string ); - // Set bidirectional connection group - void set_connects_with( const std::vector &connect_group_string ); - // Set target group to rotate towards void set_rotates_to( const std::vector &towards_group_string ); - // Set to be member of a rotation target group - void set_rotates_to_member( const std::vector &towards_group_string ); - - bool in_connects_to( const std::bitset &test_connect_group ) const { - return ( connect_to_group_member & test_connect_group ).any(); - } - // Tests if the type is a member of a rotares_towards group - bool in_rotates_to( const std::bitset &test_rotates_group ) const { - return ( rotate_to_group_member & test_rotates_group ).any(); + bool in_connect_groups( const std::bitset &test_connect_group ) const { + return ( connect_groups & test_connect_group ).any(); } int symbol() const; From 643a40f4cf89ae4c907273a29ae2515902974917 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Thu, 29 Sep 2022 22:39:03 +0200 Subject: [PATCH 10/19] make json connections overwrite/clear auto stuff --- src/mapdata.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 85a9a858b76e2..476967d6afe9a 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -1421,12 +1421,15 @@ void ter_t::load( const JsonObject &jo, const std::string &src ) // connections from JSON are set. This is so that wall flags can set wall connections // but can be overridden by explicit connections in JSON. if( jo.has_member( "connect_groups" ) ) { + connect_groups.reset(); set_connect_groups( jo.get_as_string_array( "connect_groups" ) ); } if( jo.has_member( "connects_to" ) ) { + connect_to_groups.reset(); set_connects_to( jo.get_as_string_array( "connects_to" ) ); } if( jo.has_member( "rotates_to" ) ) { + rotate_to_groups.reset(); set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } @@ -1597,12 +1600,15 @@ void furn_t::load( const JsonObject &jo, const std::string &src ) } if( jo.has_member( "connect_groups" ) ) { + connect_groups.reset(); set_connect_groups( jo.get_as_string_array( "connect_groups" ) ); } if( jo.has_member( "connects_to" ) ) { + connect_to_groups.reset(); set_connects_to( jo.get_as_string_array( "connects_to" ) ); } if( jo.has_member( "rotates_to" ) ) { + rotate_to_groups.reset(); set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } From fd8cb557186d9ab30d429d629c9e0d2d54cf7d90 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Thu, 29 Sep 2022 22:43:20 +0200 Subject: [PATCH 11/19] refactor removed connects_with for furniture --- .../furniture-flora.json | 6 +++-- .../furniture-plumbing.json | 3 ++- .../furniture-surfaces.json | 12 ++++++--- .../furniture-terrains.json | 27 ++++++++++++------- .../furniture-tools.json | 6 +++-- 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-flora.json b/data/json/furniture_and_terrain/furniture-flora.json index 7d75ec048ff24..84d30ce3ebe85 100644 --- a/data/json/furniture_and_terrain/furniture-flora.json +++ b/data/json/furniture_and_terrain/furniture-flora.json @@ -420,7 +420,8 @@ "move_cost_mod": 3, "coverage": 50, "required_str": -1, - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "SHRUB", "PERMEABLE" ], "bash": { "str_min": 10, @@ -445,7 +446,8 @@ "move_cost_mod": -1, "coverage": 90, "required_str": 14, - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "flags": [ "FLAMMABLE_ASH", "SHRUB", "PERMEABLE", "BLOCK_WIND", "NOITEM" ], "bash": { "str_min": 16, diff --git a/data/json/furniture_and_terrain/furniture-plumbing.json b/data/json/furniture_and_terrain/furniture-plumbing.json index 4ecc3cd7c4830..a8ac5d8ff7a1e 100644 --- a/data/json/furniture_and_terrain/furniture-plumbing.json +++ b/data/json/furniture_and_terrain/furniture-plumbing.json @@ -64,7 +64,8 @@ "coverage": 60, "required_str": -1, "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "CONTAINER", "PLACE_ITEM", "MOUNTABLE" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "rotates_to": "INDOORFLOOR", "bash": { "str_min": 8, diff --git a/data/json/furniture_and_terrain/furniture-surfaces.json b/data/json/furniture_and_terrain/furniture-surfaces.json index e7df3ce16504f..a39fb34a63320 100644 --- a/data/json/furniture_and_terrain/furniture-surfaces.json +++ b/data/json/furniture_and_terrain/furniture-surfaces.json @@ -10,7 +10,8 @@ "coverage": 60, "required_str": 10, "flags": [ "TRANSPARENT", "FLAMMABLE", "ORGANIC", "MOUNTABLE", "SHORT", "FLAT_SURF" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": [ 6, 10 ] } ] }, @@ -36,7 +37,8 @@ "coverage": 55, "required_str": -1, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "FLAT_SURF" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "rotates_to": "INDOORFLOOR", "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": [ 6, 8 ] } ] @@ -68,7 +70,8 @@ "required_str": 4, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "DOOR", "ORGANIC" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "open": "f_counter_gate_o", "crafting_pseudo_item": "medium_surface_pseudo", "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": 10 } ] }, @@ -89,8 +92,9 @@ "color": "blue", "move_cost_mod": 2, "required_str": 4, - "connects_with": "COUNTER", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT", "ROAD", "ORGANIC" ], + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "close": "f_counter_gate_c", "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": 10 } ] }, "bash": { diff --git a/data/json/furniture_and_terrain/furniture-terrains.json b/data/json/furniture_and_terrain/furniture-terrains.json index 6b6cc71433371..db3784b3278e7 100644 --- a/data/json/furniture_and_terrain/furniture-terrains.json +++ b/data/json/furniture_and_terrain/furniture-terrains.json @@ -353,7 +353,8 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], - "connects_with": "CANVAS_WALL", + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -374,7 +375,8 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], - "connects_with": "CANVAS_WALL", + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -396,8 +398,9 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "open": "f_canvas_door_o", - "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -417,8 +420,9 @@ "move_cost_mod": 0, "required_str": -1, "flags": [ "TRANSPARENT" ], + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "close": "f_canvas_door", - "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -439,8 +443,9 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "open": "f_large_canvas_door_o", - "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -461,8 +466,9 @@ "move_cost_mod": 0, "required_str": -1, "flags": [ "TRANSPARENT" ], + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "close": "f_large_canvas_door", - "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -568,7 +574,8 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], - "connects_with": "CANVAS_WALL", + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -589,8 +596,9 @@ "coverage": 95, "required_str": -1, "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND", "SUN_ROOF_ABOVE" ], + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "open": "f_skin_door_o", - "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, @@ -610,8 +618,9 @@ "move_cost_mod": 0, "required_str": -1, "flags": [ "TRANSPARENT" ], + "connect_groups": "CANVAS_WALL", + "connects_to": "CANVAS_WALL", "close": "f_skin_door", - "connects_with": "CANVAS_WALL", "bash": { "str_min": 1, "str_max": 8, diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json index bc50344ac8eb2..b711282e45833 100644 --- a/data/json/furniture_and_terrain/furniture-tools.json +++ b/data/json/furniture_and_terrain/furniture-tools.json @@ -11,7 +11,8 @@ "coverage": 50, "required_str": -1, "flags": [ "TRANSPARENT", "NOITEM", "INDOORS", "SHORT", "PERMEABLE" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "deconstruct": { "furn_set": "f_counter", "items": [ @@ -60,7 +61,8 @@ "required_str": -1, "light_emitted": 10, "flags": [ "TRANSPARENT", "CONSOLE", "NOITEM", "INDOORS", "SHORT", "PERMEABLE" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "deconstruct": { "furn_set": "f_counter", "items": [ From fe2cae91cf26fd05b4ec78d5fa339cd3c23a8c8d Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Thu, 29 Sep 2022 22:53:45 +0200 Subject: [PATCH 12/19] remove connects_with WALL for everything with the WALL flag --- .../terrain-embrasures.json | 8 ----- .../terrain-triffid.json | 7 ++--- .../furniture_and_terrain/terrain-walls.json | 30 ------------------- .../terrain_alienciv.json | 1 - .../terrain_groundxeno.json | 3 -- .../terrain_habitat_wall.json | 1 - .../constructions/crt_terrain.json | 1 - data/mods/Magiclysm/terrain.json | 1 - 8 files changed, 2 insertions(+), 50 deletions(-) diff --git a/data/json/furniture_and_terrain/terrain-embrasures.json b/data/json/furniture_and_terrain/terrain-embrasures.json index 588d0a9e037ee..322597d01f8f6 100644 --- a/data/json/furniture_and_terrain/terrain-embrasures.json +++ b/data/json/furniture_and_terrain/terrain-embrasures.json @@ -20,7 +20,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 48, "str_max": 80, @@ -52,7 +51,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 32, "str_max": 60, @@ -83,7 +81,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 64, "str_max": 150, @@ -114,7 +111,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 10, "str_max": 75, @@ -151,7 +147,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 12, "str_max": 90, @@ -187,7 +182,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 48, "str_max": 90, @@ -219,7 +213,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 52, "str_max": 120, @@ -280,7 +273,6 @@ "TRANSPARENT", "THIN_OBSTACLE" ], - "connects_with": "WALL", "bash": { "str_min": 72, "str_max": 175, diff --git a/data/json/furniture_and_terrain/terrain-triffid.json b/data/json/furniture_and_terrain/terrain-triffid.json index 93fb08eb799fa..1cf8e68cc6f4c 100644 --- a/data/json/furniture_and_terrain/terrain-triffid.json +++ b/data/json/furniture_and_terrain/terrain-triffid.json @@ -10,7 +10,6 @@ "coverage": 100, "roof": "t_barkfloor", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 180, @@ -30,7 +29,6 @@ "move_cost": 0, "coverage": 100, "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 160, @@ -69,7 +67,6 @@ "coverage": 100, "roof": "t_barkfloor", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 180, @@ -145,13 +142,13 @@ "type": "terrain", "id": "t_triffid_slope_up", "name": "upward root slope", - "connects_with": "WALL", "description": "An upward-facing slope of root-covered dirt.", "symbol": "<", "color": "brown", "roof": "t_barkfloor", "move_cost": 2, - "flags": [ "TRANSPARENT", "GOES_UP", "PLACE_ITEM", "SUPPORTS_ROOF" ] + "flags": [ "TRANSPARENT", "GOES_UP", "PLACE_ITEM", "SUPPORTS_ROOF" ], + "connects_with": "WALL" }, { "type": "terrain", diff --git a/data/json/furniture_and_terrain/terrain-walls.json b/data/json/furniture_and_terrain/terrain-walls.json index f1a83e2566c83..8a6db95f4331e 100644 --- a/data/json/furniture_and_terrain/terrain-walls.json +++ b/data/json/furniture_and_terrain/terrain-walls.json @@ -493,7 +493,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -516,7 +515,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -539,7 +537,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -562,7 +559,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -585,7 +581,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -608,7 +603,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -631,7 +625,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -654,7 +647,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -677,7 +669,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -700,7 +691,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -723,7 +713,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -746,7 +735,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -769,7 +757,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -792,7 +779,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -833,7 +819,6 @@ "coverage": 100, "roof": "t_brick_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 160, @@ -855,7 +840,6 @@ "coverage": 100, "roof": "t_rock_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 300, @@ -899,7 +883,6 @@ "coverage": 100, "roof": "t_rock_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 400, @@ -941,7 +924,6 @@ "coverage": 100, "roof": "t_brick_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 120, @@ -1083,7 +1065,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 90, "str_max": 350, @@ -1126,7 +1107,6 @@ "coverage": 100, "roof": "t_concrete_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 120, "str_max": 460, @@ -1199,7 +1179,6 @@ "coverage": 100, "roof": "t_metal_flat_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 200, @@ -1241,7 +1220,6 @@ "coverage": 100, "roof": "t_wood_roof", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 12, "str_max": 150, @@ -1268,7 +1246,6 @@ "coverage": 100, "roof": "t_wood_roof", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 8, "str_max": 150, @@ -1352,7 +1329,6 @@ "BLOCK_WIND", "WIRED_WALL" ], - "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 180, @@ -1374,7 +1350,6 @@ "coverage": 100, "roof": "t_wood_roof", "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "WALL", "REDUCE_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 40, "str_max": 160, @@ -1496,7 +1471,6 @@ "move_cost": 0, "coverage": 100, "flags": [ "NOITEM", "WALL", "PERMEABLE", "SUPPORTS_ROOF", "AUTO_WALL_SYMBOL", "MINEABLE" ], - "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 200, @@ -1523,7 +1497,6 @@ "coverage": 100, "roof": "t_dirt", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 60, "str_max": 200, @@ -1545,7 +1518,6 @@ "coverage": 100, "roof": "t_dirt", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 30, "str_max": 200, @@ -1578,7 +1550,6 @@ "move_cost": 0, "coverage": 60, "flags": [ "NOITEM", "WALL", "PERMEABLE", "AUTO_WALL_SYMBOL", "MINEABLE" ], - "connects_with": "WALL", "bash": { "str_min": 30, "str_max": 200, @@ -2180,7 +2151,6 @@ "coverage": 100, "roof": "t_rock_roof", "flags": [ "NOITEM", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 50, "str_max": 200, diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json index f6662a9f909af..7c6744dc3c5d4 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_alienciv.json @@ -26,7 +26,6 @@ "symbol": "LINE_XOXO", "looks_like": "t_rock_wall", "color": "light_gray", - "connects_with": "WALL", "move_cost": 0, "coverage": 100, "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json index a6d9b80fa1e41..b27d6e5d76bb4 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_groundxeno.json @@ -237,7 +237,6 @@ "coverage": 100, "roof": "t_basaltfloor", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 80, "str_max": 300, @@ -258,7 +257,6 @@ "coverage": 100, "roof": "t_ice", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 50, "str_max": 100, "sound": "crash!", "sound_fail": "whump!", "ter_set": "t_ice" } }, { @@ -272,7 +270,6 @@ "coverage": 100, "roof": "t_snow_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 50, "str_max": 100, "sound": "crash!", "sound_fail": "whump!", "ter_set": "t_null", "bash_below": true } }, { diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json index f9211c6a2823b..6b4b27b8b0da5 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json @@ -8,7 +8,6 @@ "symbol": "LINE_XOXO", "looks_like": "t_wall_metal", "color": "light_gray", - "connects_with": "WALL", "move_cost": 0, "coverage": 100, "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], diff --git a/data/mods/CRT_EXPANSION/constructions/crt_terrain.json b/data/mods/CRT_EXPANSION/constructions/crt_terrain.json index 9257d8b2e19e5..54158f0305bf9 100644 --- a/data/mods/CRT_EXPANSION/constructions/crt_terrain.json +++ b/data/mods/CRT_EXPANSION/constructions/crt_terrain.json @@ -8,7 +8,6 @@ "color": "brown_white", "move_cost": 0, "flags": [ "FLAMMABLE_HARD", "NOITEM", "SUPPORTS_ROOF", "WALL", "AUTO_WALL_SYMBOL" ], - "connects_with": "WALL", "bash": { "str_min": 4, "str_max": 12, diff --git a/data/mods/Magiclysm/terrain.json b/data/mods/Magiclysm/terrain.json index a428e3e80b04e..f3b73c04245e3 100644 --- a/data/mods/Magiclysm/terrain.json +++ b/data/mods/Magiclysm/terrain.json @@ -124,7 +124,6 @@ "coverage": 100, "roof": "t_flat_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_with": "WALL", "bash": { "str_min": 240, "str_max": 560, From 51b17075f0ec4f526b3cf1e28830fc4cc1db1a20 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Thu, 29 Sep 2022 22:57:47 +0200 Subject: [PATCH 13/19] refactor removed connects_with for fences and gates --- .../terrain-bridges-docks.json | 6 +- .../terrain-fences-gates.json | 81 ++++++++++++------- 2 files changed, 58 insertions(+), 29 deletions(-) diff --git a/data/json/furniture_and_terrain/terrain-bridges-docks.json b/data/json/furniture_and_terrain/terrain-bridges-docks.json index 095c74a38ee57..1dd23542df063 100644 --- a/data/json/furniture_and_terrain/terrain-bridges-docks.json +++ b/data/json/furniture_and_terrain/terrain-bridges-docks.json @@ -164,13 +164,14 @@ "type": "terrain", "id": "t_pavement_bg_dp", "name": "bridge pavement", - "connects_with": "PAVEMENT", "description": "A bridge section made out of concrete and metal.", "looks_like": "t_pavement", "symbol": ".", "color": "dark_gray", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "bash": { "str_min": 70, "str_max": 300, @@ -184,13 +185,14 @@ "type": "terrain", "id": "t_pavement_y_bg_dp", "name": "bridge yellow pavement", - "connects_with": "PAVEMENT", "description": "A bridge section made out of concrete and metal. It's painted yellow.", "looks_like": "t_pavement_y", "symbol": ".", "color": "yellow", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "bash": { "str_min": 70, "str_max": 300, diff --git a/data/json/furniture_and_terrain/terrain-fences-gates.json b/data/json/furniture_and_terrain/terrain-fences-gates.json index c8cb61f5a98d9..bc3ce66be4868 100644 --- a/data/json/furniture_and_terrain/terrain-fences-gates.json +++ b/data/json/furniture_and_terrain/terrain-fences-gates.json @@ -73,7 +73,8 @@ "byproducts": [ { "item": "scrap", "count": 3 } ] }, "flags": [ "TRANSPARENT", "PERMEABLE", "LOCKED", "PICKABLE", "THIN_OBSTACLE", "BURROWABLE" ], - "connects_with": "CHAINFENCE", + "connect_groups": "CHAINFENCE", + "connects_to": "CHAINFENCE", "examine_action": "locked_object_pickable", "oxytorch": { "result": "t_dirt", @@ -106,7 +107,8 @@ "color": "cyan", "move_cost": 0, "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "THIN_OBSTACLE", "BURROWABLE" ], - "connects_with": "CHAINFENCE", + "connect_groups": "CHAINFENCE", + "connects_to": "CHAINFENCE", "oxytorch": { "result": "t_dirt", "duration": "9 seconds", @@ -143,7 +145,8 @@ "color": "cyan", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "BURROWABLE" ], - "connects_with": "CHAINFENCE", + "connect_groups": "CHAINFENCE", + "connects_to": "CHAINFENCE", "close": "t_chaingate_c", "oxytorch": { "result": "t_dirt", @@ -184,7 +187,8 @@ "byproducts": [ { "item": "chain", "count": [ 1, 2 ] }, { "item": "wire", "count": [ 8, 22 ] } ] }, "flags": [ "TRANSPARENT", "PERMEABLE", "LOCKED", "PICKABLE", "THIN_OBSTACLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "examine_action": "locked_object_pickable", "lockpick_result": "t_retractable_gate_c", "lockpick_message": "With a satisfying click, the lock on the gate opens.", @@ -217,7 +221,8 @@ "color": "cyan", "move_cost": 0, "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "THIN_OBSTACLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "hacksaw": { "result": "t_strconc_floor", "duration": "10 minutes", @@ -254,7 +259,8 @@ "color": "cyan", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "close": "t_retractable_gate_c", "bash": { "str_min": 5, @@ -279,7 +285,8 @@ "move_cost": 3, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "DOOR", "MOUNTABLE", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "open": "t_fencegate_o", "deconstruct": { "ter_set": "t_dirt", @@ -315,7 +322,8 @@ "color": "brown", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT", "ROAD", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "close": "t_fencegate_c", "deconstruct": { "ter_set": "t_dirt", @@ -420,7 +428,8 @@ "looks_like": "t_chaingate_c", "move_cost": 0, "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "BURROWABLE" ], - "connects_with": "CHAINFENCE", + "connect_groups": "CHAINFENCE", + "connects_to": "CHAINFENCE", "open": "t_chickenwire_gate_o", "deconstruct": { "ter_set": "t_dirt", @@ -452,7 +461,8 @@ "looks_like": "t_chaingate_o", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "BURROWABLE" ], - "connects_with": "CHAINFENCE", + "connect_groups": "CHAINFENCE", + "connects_to": "CHAINFENCE", "close": "t_chickenwire_gate_c", "deconstruct": { "ter_set": "t_dirt", @@ -493,7 +503,8 @@ "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "2x4", "count": 5 }, { "item": "nail", "charges": 8 } ] }, "bash": { "str_min": 4, @@ -535,7 +546,8 @@ "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "splinter", "count": 20 } ] }, "bash": { "str_min": 4, @@ -581,7 +593,8 @@ "byproducts": [ { "item": "wire", "count": 20 } ] }, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "PERMEABLE", "UNSTABLE", "CLIMBABLE", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "CHAINFENCE", + "connect_groups": "CHAINFENCE", + "connects_to": "CHAINFENCE", "examine_action": "chainfence", "oxytorch": { "result": "t_dirt", @@ -643,7 +656,8 @@ "looks_like": "t_chainfence", "move_cost": 0, "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "AUTO_WALL_SYMBOL", "BURROWABLE", "CLIMBABLE" ], - "connects_with": "CHAINFENCE", + "connect_groups": "CHAINFENCE", + "connects_to": "CHAINFENCE", "examine_action": "chainfence", "deconstruct": { "ter_set": "t_chickenwire_fence_post", @@ -818,7 +832,8 @@ "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "2x4", "count": 2 }, { "item": "nail", "charges": 20 } ] }, "bash": { "str_min": 5, @@ -840,7 +855,8 @@ "move_cost": 0, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "DOOR", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "open": "t_splitrail_fencegate_o", "deconstruct": { "ter_set": "t_dirt", @@ -877,7 +893,8 @@ "looks_like": "t_fencegate_o", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT", "ROAD", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "close": "t_splitrail_fencegate_c", "deconstruct": { "ter_set": "t_dirt", @@ -916,7 +933,8 @@ "coverage": 60, "examine_action": "chainfence", "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "PERMEABLE", "CLIMBABLE", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "deconstruct": { "ter_set": "t_floor", "items": [ @@ -950,7 +968,8 @@ "move_cost": 0, "coverage": 60, "flags": [ "TRANSPARENT", "DOOR", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "open": "t_gate_metal_o", "deconstruct": { "ter_set": "t_floor", @@ -989,7 +1008,8 @@ "move_cost": 2, "coverage": 60, "flags": [ "TRANSPARENT", "BURROWABLE", "FLAT", "ROAD" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "close": "t_gate_metal_c", "deconstruct": { "ter_set": "t_floor", @@ -1029,7 +1049,8 @@ "move_cost": 0, "examine_action": "chainfence", "flags": [ "NOITEM", "CLIMBABLE", "PERMEABLE", "AUTO_WALL_SYMBOL", "FLAMMABLE_ASH", "THIN_OBSTACLE", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "deconstruct": { "ter_set": "t_fence_post", "items": [ { "item": "2x4", "count": 8 }, { "item": "nail", "charges": 20 } ] }, "bash": { "str_min": 5, @@ -1051,7 +1072,8 @@ "move_cost": 0, "coverage": 60, "flags": [ "FLAMMABLE_ASH", "DOOR", "BURROWABLE" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "open": "t_privacy_fencegate_o", "deconstruct": { "ter_set": "t_dirt", @@ -1088,7 +1110,8 @@ "looks_like": "t_fencegate_o", "move_cost": 2, "flags": [ "FLAMMABLE_ASH", "FLAT", "ROAD", "BURROWABLE", "TRANSPARENT" ], - "connects_with": "WOODFENCE", + "connect_groups": "WOODFENCE", + "connects_to": "WOODFENCE", "close": "t_privacy_fencegate_c", "deconstruct": { "ter_set": "t_dirt", @@ -1125,7 +1148,8 @@ "color": "yellow", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "bash": { "str_min": 20, "str_max": 80, @@ -1150,7 +1174,8 @@ "color": "cyan", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "deconstruct": { "ter_set": "t_rock_floor", "items": [ { "item": "glass_sheet", "count": 2 }, { "item": "pipe", "count": 4 } ] }, "bash": { "str_min": 10, @@ -1175,7 +1200,8 @@ "color": "dark_gray", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "BURROWABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "deconstruct": { "ter_set": "t_rock_floor", "items": [ { "item": "sheet_metal", "count": 2 }, { "item": "pipe", "count": 4 } ] }, "bash": { "str_min": 20, @@ -1201,7 +1227,8 @@ "looks_like": "t_ponywall", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "SHORT", "AUTO_WALL_SYMBOL", "MINEABLE", "BURROWABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "bash": { "str_min": 100, "str_max": 400, From e0737a8923cfcc20ad2f2469be0dcd409794673c Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Thu, 29 Sep 2022 23:23:36 +0200 Subject: [PATCH 14/19] refactor all the remaining connects_with --- .../terrain-floors-indoor.json | 90 ++++++++++++------- .../terrain-floors-outdoors.json | 69 +++++++++----- .../terrain-highways.json | 6 +- .../terrain-liquids.json | 75 ++++++++++------ .../terrain-railroads.json | 54 +++++++---- .../furniture_and_terrain/terrain-roofs.json | 15 ++-- .../furniture_and_terrain/terrain-traps.json | 18 ++-- .../terrain-triffid.json | 6 +- .../furniture_and_terrain/terrain-walls.json | 30 ++++--- .../terrain-zlevel-transitions.json | 54 +++++++---- .../furniture_habitat.json | 3 +- data/mods/Magiclysm/terrain.json | 3 +- .../sweet_mapgen/sweet_terrain.json | 6 +- data/mods/No_Hope/terrain.json | 12 ++- data/mods/Rummaging/modinfo.json | 6 +- .../terrain-floors-outdoors.json | 6 +- 16 files changed, 300 insertions(+), 153 deletions(-) diff --git a/data/json/furniture_and_terrain/terrain-floors-indoor.json b/data/json/furniture_and_terrain/terrain-floors-indoor.json index 43f80ed9edd5c..99bd21bbae548 100644 --- a/data/json/furniture_and_terrain/terrain-floors-indoor.json +++ b/data/json/furniture_and_terrain/terrain-floors-indoor.json @@ -6,10 +6,11 @@ "description": "A bare and cold concrete floor with matching roof, could still insulate from the outdoors but roof collapse is possible if supporting walls are broken down.", "symbol": ".", "color": "cyan", - "connects_with": "CONCRETE", "move_cost": 2, "roof": "t_concrete_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "sound": "SMASH!", "ter_set": "t_null", @@ -31,10 +32,11 @@ "symbol": ".", "color": "yellow", "looks_like": "t_pavement_y", - "connects_with": "CONCRETE", "move_cost": 2, "roof": "t_concrete_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "sound": "SMASH!", "ter_set": "t_null", @@ -55,9 +57,10 @@ "description": "A bare and cold concrete floor with a streak of red paint, could still insulate from the outdoors but roof collapse is possible if supporting walls are broken down.", "symbol": ".", "color": "red", - "connects_with": "CONCRETE", "looks_like": "t_floor_red", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "move_cost": 2, "roof": "t_concrete_roof", "copy-from": "t_thconc_floor" @@ -71,9 +74,10 @@ "color": "yellow", "light_emitted": 120, "looks_like": "t_thconc_y", - "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "INDOORS", "FLAT", "ROAD" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "roof": "t_concrete_roof", "copy-from": "t_thconc_floor", "bash": { @@ -94,11 +98,12 @@ "description": "A bare and cold concrete floor with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_with": "CONCRETE", "move_cost": 2, "light_emitted": 120, "roof": "t_concrete_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "INDOORS", "FLAT", "ROAD" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "str_min": 4, "str_max": 12, @@ -118,7 +123,8 @@ "description": "Interlocking wooden tiles that are more than likely treated against fire, with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_with": "WOODFLOOR", + "connect_groups": "WOODFLOOR", + "connects_to": "WOODFLOOR", "move_cost": 2, "light_emitted": 120, "roof": "t_wood_roof", @@ -144,7 +150,8 @@ "description": "Floor consisting of finely mixed earth that has been tamped down, with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "brown", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 2, "light_emitted": 120, "roof": "t_shingle_flat_roof", @@ -170,7 +177,8 @@ "description": "High-quality and tough checkered flooring to reduce risk of slips and falls, with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "light_cyan", - "connects_with": "METALFLOOR", + "connect_groups": "METALFLOOR", + "connects_to": "METALFLOOR", "move_cost": 2, "light_emitted": 120, "roof": "t_metal_roof", @@ -196,12 +204,13 @@ "description": "Extremely resilient floor made from carefully placed rebar and poured concrete with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_with": "CONCRETE", "move_cost": 2, "light_emitted": 120, "roof": "t_concrete_roof", "looks_like": "t_thconc_floor_olight", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "INDOORS", "FLAT", "ROAD" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "str_min": 4, "str_max": 12, @@ -220,7 +229,8 @@ "description": "Linoleum flooring with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_with": "LINOLEUM", + "connect_groups": "LINOLEUM", + "connects_to": "LINOLEUM", "move_cost": 2, "light_emitted": 120, "roof": "t_flat_roof", @@ -244,7 +254,8 @@ "description": "Linoleum flooring with a still-functioning light attached to the ceiling above.", "symbol": ".", "color": "white", - "connects_with": "LINOLEUM", + "connect_groups": "LINOLEUM", + "connects_to": "LINOLEUM", "move_cost": 2, "light_emitted": 120, "roof": "t_flat_roof", @@ -286,7 +297,8 @@ "description": "Extremely resilient floor made from carefully placed rebar and poured concrete, capable of providing protection from the elements. As for the matching roof, it still requires supporting walls, otherwise it may very well cave in.", "symbol": ".", "color": "cyan", - "connects_with": "CONCRETE", + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "move_cost": 2, "roof": "t_concrete_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], @@ -311,7 +323,8 @@ "looks_like": "t_strconc_floor", "symbol": ".", "color": "cyan", - "connects_with": "CONCRETE", + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "emissions": [ "emit_plasma_continuously" ], "move_cost": 2, "roof": "t_concrete_roof", @@ -377,7 +390,8 @@ "description": "A relatively flat area of rock and stone. Looks stable enough to be mined with the proper mining gear.", "symbol": ".", "color": "light_gray", - "connects_with": "ROCKFLOOR", + "connect_groups": "ROCKFLOOR", + "connects_to": "ROCKFLOOR", "move_cost": 2, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "INDOORS", "COLLAPSES", "SUPPORTS_ROOF", "FLAT", "ROAD" ], @@ -390,7 +404,8 @@ "description": "A rough stone floor. Its patterns constantly shift as if your mind can't quite understand what it's really seeing.", "symbol": ".", "color": "magenta", - "connects_with": "ROCKFLOOR", + "connect_groups": "ROCKFLOOR", + "connects_to": "ROCKFLOOR", "move_cost": 2, "roof": "t_warped_roof", "flags": [ "TRANSPARENT", "INDOORS", "SUPPORTS_ROOF", "FLAT", "ROAD" ] @@ -402,7 +417,8 @@ "description": "High-quality and tough checkered flooring to reduce risk of slips and falls, with a matching roof.", "symbol": ".", "color": "light_cyan", - "connects_with": "METALFLOOR", + "connect_groups": "METALFLOOR", + "connects_to": "METALFLOOR", "move_cost": 2, "roof": "t_metal_roof", "flags": [ "TRANSPARENT", "INDOORS", "FLAT", "ROAD" ], @@ -449,7 +465,8 @@ "description": "Interlocking wooden tiles that are more than likely treated against fire, with wooden posts and beams supporting a roof.", "symbol": ".", "color": "cyan", - "connects_with": "WOODFLOOR", + "connect_groups": "WOODFLOOR", + "connects_to": "WOODFLOOR", "move_cost": 2, "comfort": 1, "roof": "t_wood_treated_roof", @@ -513,7 +530,8 @@ "description": "Hardwood flooring that has been treated with chemicals to improve slip resistance and sliding, commonly for recreational sports.", "symbol": ".", "color": "light_red", - "connects_with": "WOODFLOOR", + "connect_groups": "WOODFLOOR", + "connects_to": "WOODFLOOR", "move_cost": 2, "comfort": 1, "roof": "t_wood_treated_roof", @@ -534,7 +552,8 @@ "description": "Floor consisting of finely mixed earth that has been tamped down, with a wooden ceiling above it.", "symbol": ".", "color": "brown", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 2, "roof": "t_shingle_flat_roof", "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "DIGGABLE" ], @@ -555,7 +574,8 @@ "symbol": ".", "color": "brown", "looks_like": "t_dirtfloor", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 2, "roof": "t_thatch_roof", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "DIGGABLE" ], @@ -585,7 +605,8 @@ "description": "An industrial flood light set up to illuminate the surroundings. Smashing it doesn't seem like it'd produce any worthwhile salvage.", "symbol": ".", "color": "white", - "connects_with": "WOODFLOOR", + "connect_groups": "WOODFLOOR", + "connects_to": "WOODFLOOR", "move_cost": 2, "roof": "t_flat_roof", "light_emitted": 240, @@ -678,7 +699,8 @@ "name": "carpet", "symbol": ".", "color": "red", - "connects_with": "CARPET", + "connect_groups": "CARPET", + "connects_to": "CARPET", "move_cost": 2, "roof": "t_flat_roof", "description": "Soft red carpet.", @@ -753,7 +775,8 @@ "looks_like": "t_carpet_red", "symbol": ".", "color": "red", - "connects_with": "CARPET", + "connect_groups": "CARPET", + "connects_to": "CARPET", "move_cost": 2, "roof": "t_flat_roof", "description": "Soft red carpet.", @@ -1311,7 +1334,8 @@ "description": "A section of flooring made out of a tough, rubbery material. Colored a simple white.", "symbol": ".", "color": "white", - "connects_with": "LINOLEUM", + "connect_groups": "LINOLEUM", + "connects_to": "LINOLEUM", "move_cost": 2, "roof": "t_flat_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], @@ -1332,7 +1356,8 @@ "description": "A section of flooring made out of a tough, gray, rubbery material.", "symbol": ".", "color": "light_gray", - "connects_with": "LINOLEUM", + "connect_groups": "LINOLEUM", + "connects_to": "LINOLEUM", "move_cost": 2, "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "ROAD" ], "bash": { @@ -1351,7 +1376,8 @@ "description": "This section of wax flooring has been painted.", "symbol": ".", "color": "yellow", - "connects_with": "WOODFLOOR", + "connect_groups": "WOODFLOOR", + "connects_to": "WOODFLOOR", "move_cost": 2, "roof": "t_flat_roof", "bash": { @@ -1425,7 +1451,8 @@ "description": "It's dirt. Looks like some fine soil for tillage. Could also be dug out for construction projects.", "symbol": ".", "color": "brown", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 2, "looks_like": "t_dirt", "roof": "t_rock_roof", @@ -1441,7 +1468,8 @@ "symbol": ".", "color": "yellow", "looks_like": "t_sand", - "connects_with": "SAND", + "connect_groups": "SAND", + "connects_to": "SAND", "move_cost": 3, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "SUPPORTS_ROOF", "INDOORS", "FLAT", "DIGGABLE" ], @@ -1483,7 +1511,8 @@ "description": "A field full of malleable clay, suitable for kiln firing if it was extracted properly.", "symbol": ".", "color": "light_red", - "connects_with": "CLAY", + "connect_groups": "CLAY", + "connects_to": "CLAY", "move_cost": 2, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT", "SUPPORTS_ROOF", "INDOORS" ], @@ -1497,7 +1526,8 @@ "//": "for caverns and other natural underground formations.", "symbol": "#", "color": "brown", - "connects_with": "CLAY", + "connect_groups": "CLAY", + "connects_to": "CLAY", "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "BURROWABLE", "SUPPORTS_ROOF", "INDOORS" ], diff --git a/data/json/furniture_and_terrain/terrain-floors-outdoors.json b/data/json/furniture_and_terrain/terrain-floors-outdoors.json index 4293c29c789f5..1aac4168c8a60 100644 --- a/data/json/furniture_and_terrain/terrain-floors-outdoors.json +++ b/data/json/furniture_and_terrain/terrain-floors-outdoors.json @@ -6,7 +6,8 @@ "description": "It's dirt. Looks like some fine soil for tillage. Could also be dug out for construction projects.", "symbol": ".", "color": "brown", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 2, "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT", "PLOWABLE" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } @@ -19,7 +20,8 @@ "symbol": ".", "color": "yellow", "move_cost": 3, - "connects_with": "SAND", + "connect_groups": "SAND", + "connects_to": "SAND", "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } }, @@ -42,7 +44,8 @@ "description": "A field full of malleable clay, suitable for kiln firing if it was extracted properly.", "symbol": ".", "color": "light_red", - "connects_with": "CLAY", + "connect_groups": "CLAY", + "connects_to": "CLAY", "move_cost": 2, "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } @@ -55,7 +58,8 @@ "looks_like": "t_dirtmound", "symbol": "#", "color": "brown", - "connects_with": "CLAY", + "connect_groups": "CLAY", + "connects_to": "CLAY", "move_cost": 5, "flags": [ "TRANSPARENT", "BURROWABLE" ], "bash": { @@ -75,7 +79,8 @@ "looks_like": "t_dirtmound", "symbol": "#", "color": "brown", - "connects_with": "SAND", + "connect_groups": "SAND", + "connects_to": "SAND", "move_cost": 5, "flags": [ "TRANSPARENT", "BURROWABLE" ], "bash": { @@ -95,7 +100,8 @@ "looks_like": "t_sand", "symbol": "~", "color": "brown", - "connects_with": "SAND", + "connect_groups": "SAND", + "connects_to": "SAND", "move_cost": 3, "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "crunch", "ter_set": "t_sand", "str_min": 25, "str_max": 100, "str_min_supported": 100, "bash_below": true } @@ -107,7 +113,8 @@ "description": "An area of heaped dirt, not easily traversable. If examined more closely, it's quite favorable for planting seeds and the like.", "symbol": "#", "color": "brown", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 3, "flags": [ "TRANSPARENT", "DIGGABLE", "MOUNTABLE", "NOCOLLIDE", "PLANTABLE" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100 }, @@ -121,7 +128,8 @@ "looks_like": "t_dirtmound", "symbol": "#", "color": "brown", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 3, "coverage": 40, "flags": [ "TRANSPARENT", "DIGGABLE", "MOUNTABLE", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS" ], @@ -193,7 +201,8 @@ "symbol": ".", "color": "light_gray", "looks_like": "t_rock_floor", - "connects_with": "ROCKFLOOR", + "connect_groups": "ROCKFLOOR", + "connects_to": "ROCKFLOOR", "move_cost": 2, "roof": "t_open_air", "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], @@ -207,7 +216,8 @@ "symbol": ".", "color": "dark_gray", "move_cost": 3, - "connects_with": "MULCHFLOOR", + "connect_groups": "MULCHFLOOR", + "connects_to": "MULCHFLOOR", "flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } }, @@ -215,12 +225,12 @@ "type": "terrain", "id": "t_pavement", "name": "pavement", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "A segment of asphalt, slowly degrading from cracks, frost heaves and lack of maintenance.", "symbol": ".", "color": "dark_gray", "move_cost": 2, - "rotates_to_member": "PAVEMENT", "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], "bash": { "ter_set": "t_null", @@ -234,8 +244,8 @@ "type": "terrain", "id": "t_pavement_y", "name": "yellow pavement", + "connect_groups": [ "PAVEMENT", "PAVEMENT_MARKING" ], "connects_to": "PAVEMENT_MARKING", - "connects_to_member": [ "PAVEMENT", "PAVEMENT_MARKING" ], "description": "Streaks of carefully aligned yellow paint mark the road to inform drivers not to cross. No one is enforcing these rules anymore.", "symbol": ".", "color": "yellow", @@ -254,7 +264,8 @@ "id": "t_zebra", "alias": [ "t_zebra_h", "t_zebra_v" ], "name": "pedestrian crossing", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "White polymer lines painted on the pavement which indicate places where pedestrians should cross the road.", "symbol": ".", "color": "white", @@ -276,9 +287,10 @@ "symbol": ".", "color": "light_gray", "looks_like": "t_concrete", - "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "ter_set": "t_null", "str_min": 50, @@ -295,9 +307,10 @@ "looks_like": "t_strconc_floor", "symbol": ".", "color": "cyan", - "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "sound": "SMASH!", "ter_set": "t_null", @@ -319,9 +332,10 @@ "symbol": ".", "color": "light_gray", "looks_like": "t_pavement", - "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "ter_set": "t_null", "str_min": 50, @@ -338,9 +352,10 @@ "symbol": ".", "color": "yellow", "looks_like": "t_pavement_y", - "connects_with": "CONCRETE", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ], + "connect_groups": "CONCRETE", + "connects_to": "CONCRETE", "bash": { "ter_set": "t_null", "str_min": 50, @@ -403,7 +418,8 @@ "description": "High-quality and tough checkered flooring to reduce risk of slips and falls.", "symbol": ".", "color": "light_cyan", - "connects_with": "METALFLOOR", + "connect_groups": "METALFLOOR", + "connects_to": "METALFLOOR", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], "bash": { @@ -427,7 +443,8 @@ "description": "Metal gangway bridging a short gap. Sturdy enough to act as a floor, but not sufficient to support additional flooring.", "symbol": ".", "color": "light_cyan", - "connects_with": "METALFLOOR", + "connect_groups": "METALFLOOR", + "connects_to": "METALFLOOR", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAT", "ROAD" ], "bash": { @@ -451,7 +468,8 @@ "description": "A section of flooring made out of a tough, rubbery material. Colored a simple white.", "symbol": ".", "color": "white", - "connects_with": "LINOLEUM", + "connect_groups": "LINOLEUM", + "connects_to": "LINOLEUM", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "FLAT", "ROAD" ], "bash": { @@ -471,7 +489,8 @@ "description": "A section of flooring made out of a tough, gray, rubbery material.", "symbol": ".", "color": "light_gray", - "connects_with": "LINOLEUM", + "connect_groups": "LINOLEUM", + "connects_to": "LINOLEUM", "move_cost": 2, "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "FLAT", "ROAD" ], "bash": { @@ -490,7 +509,8 @@ "description": "Floor consisting of finely mixed earth that has been tamped down.", "symbol": ".", "color": "brown", - "connects_with": "DIRT", + "connect_groups": "DIRT", + "connects_to": "DIRT", "move_cost": 2, "looks_like": "t_dirtfloor", "flags": [ "TRANSPARENT", "FLAT", "DIGGABLE" ], @@ -536,7 +556,8 @@ "symbol": ".", "looks_like": "t_pavement", "color": "dark_gray", - "connects_with": "METALFLOOR", + "connect_groups": "METALFLOOR", + "connects_to": "METALFLOOR", "move_cost": 2, "flags": [ "FLAT", "ROAD", "TRANSPARENT" ], "bash": { diff --git a/data/json/furniture_and_terrain/terrain-highways.json b/data/json/furniture_and_terrain/terrain-highways.json index 6d6db2fc9c99a..d4322b543639a 100644 --- a/data/json/furniture_and_terrain/terrain-highways.json +++ b/data/json/furniture_and_terrain/terrain-highways.json @@ -3,7 +3,8 @@ "type": "terrain", "id": "t_pavement_hw_air", "name": "bridge pavement", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "A bridge section made out of concrete and metal.", "looks_like": "t_pavement", "symbol": ".", @@ -23,7 +24,8 @@ "type": "terrain", "id": "t_pavement_y_hw_air", "name": "bridge yellow pavement", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "A bridge section made out of concrete and metal. It's painted yellow.", "looks_like": "t_pavement_y", "symbol": ".", diff --git a/data/json/furniture_and_terrain/terrain-liquids.json b/data/json/furniture_and_terrain/terrain-liquids.json index db28b297d1ef7..e2fd0bf776707 100644 --- a/data/json/furniture_and_terrain/terrain-liquids.json +++ b/data/json/furniture_and_terrain/terrain-liquids.json @@ -8,7 +8,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -23,7 +24,8 @@ "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "INDOORS", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -36,7 +38,8 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -51,7 +54,8 @@ "move_cost": 8, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE", "INDOORS" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -64,7 +68,8 @@ "looks_like": "t_water_sh", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "SHALLOW_WATER", "MURKY" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -79,7 +84,8 @@ "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "INDOORS", "SHALLOW_WATER", "MURKY" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -92,7 +98,8 @@ "color": "light_blue", "move_cost": 6, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "CURRENT", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -107,7 +114,8 @@ "move_cost": 6, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "CURRENT", "INDOORS", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -120,7 +128,8 @@ "color": "blue", "move_cost": 10, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE", "CURRENT" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -135,7 +144,8 @@ "move_cost": 10, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "FISHABLE", "CURRENT", "INDOORS" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -148,7 +158,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "FISHABLE", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -163,7 +174,8 @@ "move_cost": 5, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "FISHABLE", "INDOORS", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -176,7 +188,8 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "DEEP_WATER", "FISHABLE", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -191,7 +204,8 @@ "move_cost": 8, "roof": "t_rock_roof", "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SALT_WATER", "DEEP_WATER", "FISHABLE", "INDOORS" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -204,7 +218,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "INDOORS", "DEEP_WATER" ], - "connects_with": "POOLWATER", + "connect_groups": "POOLWATER", + "connects_to": "POOLWATER", "examine_action": "water_source" }, { @@ -217,7 +232,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "INDOORS", "SHALLOW_WATER" ], - "connects_with": "POOLWATER", + "connect_groups": "POOLWATER", + "connects_to": "POOLWATER", "examine_action": "water_source" }, { @@ -230,7 +246,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER" ], - "connects_with": "POOLWATER", + "connect_groups": "POOLWATER", + "connects_to": "POOLWATER", "examine_action": "water_source" }, { @@ -243,7 +260,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SHALLOW_WATER" ], - "connects_with": "POOLWATER", + "connect_groups": "POOLWATER", + "connects_to": "POOLWATER", "examine_action": "water_source" }, { @@ -282,7 +300,8 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_DOWN", "GOES_UP" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -296,7 +315,8 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_UP" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -310,7 +330,8 @@ "color": "blue", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_UP" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -324,7 +345,8 @@ "color": "light_gray", "move_cost": 8, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "DEEP_WATER", "GOES_UP", "MINEABLE" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -369,7 +391,8 @@ "str_min_supported": 100, "items": [ { "item": "rock", "count": [ 2, 10 ] } ] }, - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -390,7 +413,8 @@ "str_min_supported": 100, "items": [ { "item": "rock", "count": [ 2, 10 ] } ] }, - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -403,7 +427,8 @@ "move_cost": 5, "heat_radiation": 1, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "SHALLOW_WATER" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { diff --git a/data/json/furniture_and_terrain/terrain-railroads.json b/data/json/furniture_and_terrain/terrain-railroads.json index b9bfee02e58d6..43d9503d0ef1e 100644 --- a/data/json/furniture_and_terrain/terrain-railroads.json +++ b/data/json/furniture_and_terrain/terrain-railroads.json @@ -54,7 +54,8 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -85,7 +86,8 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -116,7 +118,8 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -147,7 +150,8 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -178,7 +182,8 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -209,7 +214,8 @@ { "item": "scrap", "count": [ 3, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -232,7 +238,8 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -255,7 +262,8 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -278,7 +286,8 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -301,7 +310,8 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -335,7 +345,8 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -369,7 +380,8 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -403,7 +415,8 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -437,7 +450,8 @@ { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -478,7 +492,8 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -501,7 +516,8 @@ "ter_set": "t_rock_floor", "items": [ { "item": "log", "count": [ 0, 1 ] }, { "item": "splinter", "count": [ 10, 20 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT" ] }, { @@ -599,7 +615,8 @@ { "item": "splinter", "count": [ 6, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] }, { @@ -633,7 +650,8 @@ { "item": "splinter", "count": [ 6, 12 ] } ] }, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "RAIL", "TRANSPARENT" ] } ] diff --git a/data/json/furniture_and_terrain/terrain-roofs.json b/data/json/furniture_and_terrain/terrain-roofs.json index 836dfef276efe..d5b209f65809f 100644 --- a/data/json/furniture_and_terrain/terrain-roofs.json +++ b/data/json/furniture_and_terrain/terrain-roofs.json @@ -47,7 +47,8 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -71,7 +72,8 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -95,7 +97,8 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -119,7 +122,8 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] @@ -143,7 +147,8 @@ "color": "white", "move_cost": 3, "flags": [ "TRANSPARENT", "NOITEM", "THIN_OBSTACLE", "MOUNTABLE", "TINY", "AUTO_WALL_SYMBOL", "UNSTABLE", "CLIMBABLE" ], - "connects_with": "RAILING", + "connect_groups": "RAILING", + "connects_to": "RAILING", "deconstruct": { "ter_set": "t_flat_roof", "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "scrap", "count": [ 2, 3 ] } ] diff --git a/data/json/furniture_and_terrain/terrain-traps.json b/data/json/furniture_and_terrain/terrain-traps.json index 019160c4fed8d..2f8e991f1c771 100644 --- a/data/json/furniture_and_terrain/terrain-traps.json +++ b/data/json/furniture_and_terrain/terrain-traps.json @@ -28,7 +28,8 @@ "description": "A steep hole that could seriously injure something if it fell in, potentially fatal if it was filled with sharp and dangerous things. Deep enough for more advanced construction projects, and possibly to reach groundwater if constructed properly.", "symbol": "0", "color": "brown", - "connects_with": "PIT_DEEP", + "connect_groups": "PIT_DEEP", + "connects_to": "PIT_DEEP", "move_cost": 10, "trap": "tr_pit", "flags": [ "TRANSPARENT" ], @@ -54,7 +55,8 @@ "description": "A deep pit with a plank placed across it, looks sturdy enough to cross safely or the plank could be removed to turn it back into trap fall.", "symbol": "#", "color": "light_red", - "connects_with": "PIT_DEEP", + "connect_groups": "PIT_DEEP", + "connects_to": "PIT_DEEP", "move_cost": 2, "flags": [ "TRANSPARENT", "ROAD" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 40, "str_max": 100, "str_min_supported": 100, "bash_below": true }, @@ -67,7 +69,8 @@ "description": "A narrow trench full of very pointy things that would easily puncture a body.", "symbol": "0", "color": "light_red", - "connects_with": "PIT_DEEP", + "connect_groups": "PIT_DEEP", + "connects_to": "PIT_DEEP", "move_cost": 10, "trap": "tr_spike_pit", "flags": [ "TRANSPARENT", "PIT_FILLABLE" ], @@ -81,7 +84,8 @@ "description": "Menacing with sharp spears along the bottom, this pit has a plank across it to allow someone or something to cross safely. The plank could be removed to revert it back into a trap.", "symbol": "#", "color": "light_red", - "connects_with": "PIT_DEEP", + "connect_groups": "PIT_DEEP", + "connects_to": "PIT_DEEP", "move_cost": 2, "flags": [ "TRANSPARENT", "ROAD" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 40, "str_max": 100, "str_min_supported": 100, "bash_below": true }, @@ -94,7 +98,8 @@ "description": "Looks like a ton of broken glass was dumped into this pit, maybe not fatal to fall in but wouldn't be pleasant to try to crawl out.", "symbol": "0", "color": "light_cyan", - "connects_with": "PIT_DEEP", + "connect_groups": "PIT_DEEP", + "connects_to": "PIT_DEEP", "move_cost": 10, "trap": "tr_glass_pit", "flags": [ "TRANSPARENT", "PIT_FILLABLE" ], @@ -108,7 +113,8 @@ "description": "A plank has been placed carefully to allow traversal over this ditch full of large glass shards. The wooden board could be removed so it couldn't be safely crossed.", "symbol": "#", "color": "light_cyan", - "connects_with": "PIT_DEEP", + "connect_groups": "PIT_DEEP", + "connects_to": "PIT_DEEP", "move_cost": 2, "flags": [ "TRANSPARENT", "ROAD" ], "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 40, "str_max": 100, "str_min_supported": 100, "bash_below": true }, diff --git a/data/json/furniture_and_terrain/terrain-triffid.json b/data/json/furniture_and_terrain/terrain-triffid.json index 1cf8e68cc6f4c..b567c5b089b77 100644 --- a/data/json/furniture_and_terrain/terrain-triffid.json +++ b/data/json/furniture_and_terrain/terrain-triffid.json @@ -130,7 +130,8 @@ "type": "terrain", "id": "t_triffid_slope_down", "name": "downward root slope", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "A downward-facing slope of root-covered dirt.", "symbol": ">", "color": "brown", @@ -148,7 +149,8 @@ "roof": "t_barkfloor", "move_cost": 2, "flags": [ "TRANSPARENT", "GOES_UP", "PLACE_ITEM", "SUPPORTS_ROOF" ], - "connects_with": "WALL" + "connect_groups": "WALL", + "connects_to": "WALL" }, { "type": "terrain", diff --git a/data/json/furniture_and_terrain/terrain-walls.json b/data/json/furniture_and_terrain/terrain-walls.json index 8a6db95f4331e..ce77d8095296d 100644 --- a/data/json/furniture_and_terrain/terrain-walls.json +++ b/data/json/furniture_and_terrain/terrain-walls.json @@ -56,7 +56,8 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "REDUCE_SCENT", "MOUNTABLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "bash": { "str_min": 10, "str_max": 70, @@ -82,7 +83,8 @@ "color": "light_gray", "move_cost": 0, "coverage": 60, - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "roof": "t_flat_roof", "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM", "INDOORS", "AUTO_WALL_SYMBOL", "THIN_OBSTACLE", "MOUNTABLE", "SHORT" ], "deconstruct": { "ter_set": "t_floor", "items": [ { "item": "2x4", "count": 10 }, { "item": "nail", "charges": 20 } ] }, @@ -860,7 +862,8 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "NOITEM", "REDUCE_SCENT", "MOUNTABLE", "MINEABLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "bash": { "str_min": 40, "str_max": 200, @@ -1085,7 +1088,8 @@ "move_cost": 4, "coverage": 60, "flags": [ "NOITEM", "TRANSPARENT", "MOUNTABLE", "REDUCE_SCENT", "MINEABLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "bash": { "str_min": 40, "str_max": 350, @@ -1127,7 +1131,8 @@ "move_cost": 5, "coverage": 60, "flags": [ "TRANSPARENT", "NOITEM", "MOUNTABLE", "REDUCE_SCENT", "MINEABLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "bash": { "str_min": 60, "str_max": 460, @@ -1152,7 +1157,8 @@ "byproducts": [ { "item": "spike", "count": 19 }, { "item": "scrap", "count": 8 } ] }, "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "THIN_OBSTACLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "oxytorch": { "result": "t_pit", "duration": "9 seconds", @@ -1297,7 +1303,8 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "REDUCE_SCENT", "MOUNTABLE", "MINEABLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "bash": { "str_min": 40, "str_max": 120, @@ -1536,8 +1543,7 @@ "color": "magenta", "move_cost": 0, "coverage": 100, - "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ], - "connects_with": "WALL" + "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "BLOCK_WIND" ] }, { "type": "terrain", @@ -2021,7 +2027,8 @@ "color": "light_gray", "move_cost": 5, "flags": [ "TRANSPARENT", "NOITEM", "MOUNTABLE", "PERMEABLE", "MINEABLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "bash": { "str_min": 60, "str_max": 460, @@ -2171,7 +2178,8 @@ "move_cost": 4, "coverage": 60, "flags": [ "TRANSPARENT", "NOITEM", "REDUCE_SCENT", "MOUNTABLE", "MINEABLE" ], - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "bash": { "str_min": 30, "str_max": 120, diff --git a/data/json/furniture_and_terrain/terrain-zlevel-transitions.json b/data/json/furniture_and_terrain/terrain-zlevel-transitions.json index f65dabb35d3b4..aeeb547cb7e57 100644 --- a/data/json/furniture_and_terrain/terrain-zlevel-transitions.json +++ b/data/json/furniture_and_terrain/terrain-zlevel-transitions.json @@ -188,7 +188,8 @@ "id": "t_ramp_down_high", "name": "road ramp down (high end)", "description": "The upper end of an asphalt ramp leading down.", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -199,7 +200,8 @@ "id": "t_ramp_down_low", "name": "road ramp down (low end)", "description": "The lower end of an asphalt ramp leading down.", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -209,7 +211,8 @@ "type": "terrain", "id": "t_ramp_up_high", "name": "road ramp up (high end)", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "The upper end of an asphalt ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -220,7 +223,8 @@ "type": "terrain", "id": "t_ramp_up_low", "name": "road ramp up (low end)", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "The lower end of an asphalt ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -242,7 +246,8 @@ "id": "t_earth_ramp_down_low", "name": "earth ramp down (low end)", "description": "The lower end of an earth ramp leading down.", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "symbol": ">", "color": "brown", "move_cost": 2, @@ -252,7 +257,8 @@ "type": "terrain", "id": "t_earth_ramp_up_high", "name": "earth ramp up (high end)", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "The upper end of an earth ramp leading up.", "symbol": "<", "color": "brown", @@ -273,7 +279,8 @@ "type": "terrain", "id": "t_sidewalk_ramp_down_high", "name": "sidewalk ramp down (high end)", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "The upper end of a sidewalk ramp leading down.", "symbol": ">", "color": "light_gray", @@ -284,7 +291,8 @@ "type": "terrain", "id": "t_sidewalk_ramp_down_low", "name": "sidewalk ramp down (low end)", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "The lower end of a sidewalk ramp leading down.", "symbol": ">", "color": "light_gray", @@ -295,7 +303,8 @@ "type": "terrain", "id": "t_sidewalk_ramp_up_high", "name": "sidewalk ramp up (high end)", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "The upper end of a sidewalk ramp leading up.", "symbol": "<", "color": "light_gray", @@ -316,7 +325,8 @@ "type": "terrain", "id": "t_slope_down", "name": "downward slope", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "A downward facing slope.", "symbol": ">", "color": "brown", @@ -327,7 +337,8 @@ "type": "terrain", "id": "t_slope_up", "name": "upward slope", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "An upward facing slope.", "symbol": "<", "color": "brown", @@ -393,7 +404,8 @@ "id": "t_railroad_ramp_down_high", "name": "railroad ramp down (high end)", "description": "The upper end of a railroad ramp leading down.", - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -404,7 +416,8 @@ "id": "t_railroad_ramp_down_low", "name": "railroad ramp down (low end)", "description": "The lower end of a railroad ramp leading down.", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "symbol": ">", "color": "dark_gray", "move_cost": 2, @@ -414,7 +427,8 @@ "type": "terrain", "id": "t_railroad_ramp_up_high", "name": "railroad ramp up (high end)", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "The upper end of a railroad ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -425,7 +439,8 @@ "type": "terrain", "id": "t_railroad_ramp_up_low", "name": "railroad ramp up (low end)", - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "description": "The lower end of a railroad ramp leading up.", "symbol": "<", "color": "dark_gray", @@ -436,7 +451,8 @@ "type": "terrain", "id": "t_concrete_ramp_down_high", "name": "concrete ramp down (high end)", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "The upper end of a concrete ramp leading down.", "symbol": ">", "color": "light_gray", @@ -447,7 +463,8 @@ "type": "terrain", "id": "t_concrete_ramp_down_low", "name": "concrete ramp down (low end)", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "The lower end of a concrete ramp leading down.", "symbol": ">", "color": "light_gray", @@ -458,7 +475,8 @@ "type": "terrain", "id": "t_concrete_ramp_up_high", "name": "concrete ramp up (high end)", - "connects_with": "WALL", + "connect_groups": "WALL", + "connects_to": "WALL", "description": "The upper end of a concrete ramp leading up.", "symbol": "<", "color": "light_gray", diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json b/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json index babe8b22fd18a..f8ee466bd2c7b 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json @@ -11,7 +11,8 @@ "coverage": 55, "required_str": -1, "flags": [ "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "FLAT_SURF", "NO_SELF_CONNECT" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "deconstruct": { "items": [ { "item": "plastic_chunk", "count": 3 }, diff --git a/data/mods/Magiclysm/terrain.json b/data/mods/Magiclysm/terrain.json index f3b73c04245e3..a58ad3193a943 100644 --- a/data/mods/Magiclysm/terrain.json +++ b/data/mods/Magiclysm/terrain.json @@ -47,7 +47,8 @@ "coverage": 100, "roof": "t_flat_roof", "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "AUTO_WALL_SYMBOL", "MINEABLE", "BLOCK_WIND" ], - "connects_with": "WALL" + "connect_groups": "WALL", + "connects_to": "WALL" }, { "type": "terrain", diff --git a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json index 2e556c3add489..d2bc99097fd29 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json @@ -8,7 +8,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "SHALLOW_WATER", "CHOCOLATE" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { @@ -20,7 +21,8 @@ "color": "light_blue", "move_cost": 5, "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "CHOCOLATE" ], - "connects_with": "WATER", + "connect_groups": "WATER", + "connects_to": "WATER", "examine_action": "water_source" }, { diff --git a/data/mods/No_Hope/terrain.json b/data/mods/No_Hope/terrain.json index 90ac5d99847a8..1489a1f455afb 100644 --- a/data/mods/No_Hope/terrain.json +++ b/data/mods/No_Hope/terrain.json @@ -269,7 +269,8 @@ "color": "red", "move_cost": 2, "roof": "t_flat_roof", - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ], "bash": { "sound": "SMASH!", @@ -291,7 +292,8 @@ "move_cost": 2, "light_emitted": 120, "roof": "t_flat_roof", - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "SUPPORTS_ROOF", "COLLAPSES", "INDOORS", "FLAT", "RUG" ], "bash": { "str_min": 4, @@ -313,7 +315,8 @@ "color": "light_gray", "move_cost": 2, "roof": "t_flat_roof", - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "flags": [ "TRANSPARENT", "INDOORS", "COLLAPSES", "SUPPORTS_ROOF", "FLAT", "ROAD" ], "bash": { "ter_set": "t_null", "str_min": 75, "str_max": 400, "str_min_supported": 100, "bash_below": true } }, @@ -327,7 +330,8 @@ "looks_like": "t_rock_floor", "move_cost": 2, "light_emitted": 120, - "connects_with": "RAIL", + "connect_groups": "RAIL", + "connects_to": "RAIL", "roof": "t_flat_roof", "flags": [ "TRANSPARENT", "INDOORS", "COLLAPSES", "SUPPORTS_ROOF", "FLAT", "ROAD" ], "bash": { "ter_set": "t_null", "str_min": 75, "str_max": 400, "str_min_supported": 100, "bash_below": true } diff --git a/data/mods/Rummaging/modinfo.json b/data/mods/Rummaging/modinfo.json index 57797f4f2ea04..502b5f68bfa68 100644 --- a/data/mods/Rummaging/modinfo.json +++ b/data/mods/Rummaging/modinfo.json @@ -397,7 +397,8 @@ "HIDE_PLACE", "NO_SIGHT" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "max_volume": "350 L", "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": 200000, "volume": "75L" }, @@ -410,7 +411,8 @@ "symbol": "#", "color": "blue", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "CONTAINER", "PLACE_ITEM", "ORGANIC", "MOUNTABLE", "FLAT_SURF", "SEALED" ], - "connects_with": "COUNTER", + "connect_groups": "COUNTER", + "connects_to": "COUNTER", "max_volume": "350 L", "examine_action": "workbench", "workbench": { "multiplier": 1.1, "mass": 200000, "volume": "75L" }, diff --git a/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json b/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json index 6308fea536890..0ebbba229720f 100644 --- a/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json +++ b/data/mods/innawood/furniture_and_terrain/terrain-floors-outdoors.json @@ -3,7 +3,8 @@ "type": "terrain", "id": "t_pavement", "name": "pavement", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "A segment of asphalt, slowly degrading from cracks, frost heaves and lack of maintenance.", "symbol": ".", "color": "dark_gray", @@ -21,7 +22,8 @@ "type": "terrain", "id": "t_pavement_y", "name": "yellow pavement", - "connects_with": "PAVEMENT", + "connect_groups": "PAVEMENT", + "connects_to": "PAVEMENT", "description": "Streaks of carefully aligned yellow paint mark the road to inform drivers not to cross. No one is enforcing these rules anymore.", "symbol": ".", "color": "yellow", From e40f991b4a04b38cf587a8d5e58480e4524e4f4b Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Fri, 30 Sep 2022 00:00:18 +0200 Subject: [PATCH 15/19] rename CONNECT_TO_WALL to CONNECT_WITH_WALL in code and docs, for consistency --- doc/JSON_FLAGS.md | 6 +++--- src/mapdata.cpp | 6 +++--- src/mapdata.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index 5188b40e508f7..e54c42a728394 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -531,7 +531,7 @@ List of known flags, used in both `terrain.json` and `furniture.json`. - ```AMMOTYPE_RELOAD``` Furniture reloads by ammotype so player can choose from more than one fuel type. - ```AUTO_WALL_SYMBOL``` (only for terrain) The symbol of this terrain will be one of the line drawings (corner, T-intersection, straight line etc.) depending on the adjacent terrains. - Example: `-` and `|` are both terrain with the `CONNECT_TO_WALL` flag. `O` does not have the flag, while `X` and `Y` have the `AUTO_WALL_SYMBOL` flag. + Example: `-` and `|` are both terrain with the `CONNECT_WITH_WALL` flag. `O` does not have the flag, while `X` and `Y` have the `AUTO_WALL_SYMBOL` flag. `X` terrain will be drawn as a T-intersection (connected to west, south and east), `Y` will be drawn as horizontal line (going from west to east, no connection to south). ``` @@ -551,7 +551,7 @@ List of known flags, used in both `terrain.json` and `furniture.json`. - ```CAN_SIT``` Furniture the player can sit on. Player sitting near furniture with the `FLAT_SURF` tag will get mood bonus for eating. - ```CHIP``` Used in construction menu to determine if wall can have paint chipped off. - ```COLLAPSES``` Has a roof that can collapse. -- ```CONNECT_TO_WALL``` (only for terrain) This flag has been superseded by the JSON entry `connects_to`, but is retained for backward compatibility. +- ```CONNECT_WITH_WALL``` (only for terrain) This flag has been superseded by the JSON entries `connect_group` and `connects_to`, but is retained for backward compatibility. - ```CONSOLE``` Used as a computer. - ```CONTAINER``` Items on this square are hidden until looted by the player. - ```CURRENT``` This water is flowing. @@ -630,7 +630,7 @@ List of known flags, used in both `terrain.json` and `furniture.json`. - ```TRANSPARENT_FLOOR``` This terrain allows light to the z-level below. - ```UNSTABLE``` Walking here cause the bouldering effect on the character. - ```USABLE_FIRE``` This terrain or furniture counts as a nearby fire for crafting. -- ```WALL``` This terrain is an upright obstacle. Used for fungal conversion, and also implies `CONNECT_TO_WALL`. +- ```WALL``` This terrain is an upright obstacle. Used for fungal conversion, and also implies `CONNECT_WITH_WALL`. - ```WINDOW``` This terrain is a window, though it may be closed, broken, or covered up. Used by the tiles code to align furniture sprites away from the window. - ```WIRED_WALL``` This terrain is a wall with electric wires inside. Allows the `Reveal wall wirings` construction. - ```WORKOUT_LEGS``` This furniture is for training your legs. Needed for checks like `is_limb_broken()`. diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 476967d6afe9a..40374b9d03a94 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -174,7 +174,7 @@ std::string enum_to_string( ter_furn_flag data ) case ter_furn_flag::TFLAG_HARVESTED: return "HARVESTED"; case ter_furn_flag::TFLAG_PERMEABLE: return "PERMEABLE"; case ter_furn_flag::TFLAG_AUTO_WALL_SYMBOL: return "AUTO_WALL_SYMBOL"; - case ter_furn_flag::TFLAG_CONNECT_TO_WALL: return "CONNECT_TO_WALL"; + case ter_furn_flag::TFLAG_CONNECT_WITH_WALL: return "CONNECT_WITH_WALL"; case ter_furn_flag::TFLAG_CLIMBABLE: return "CLIMBABLE"; case ter_furn_flag::TFLAG_GOES_DOWN: return "GOES_DOWN"; case ter_furn_flag::TFLAG_GOES_UP: return "GOES_UP"; @@ -267,7 +267,7 @@ std::string enum_to_string( ter_furn_flag data ) } // namespace io static const std::unordered_map ter_connects_map = { { - { "WALL", TERCONN_WALL }, // implied for connects_to by ter_furn_flag::TFLAG_CONNECT_TO_WALL, ter_furn_flag::TFLAG_AUTO_WALL_SYMBOL or ter_furn_flag::TFLAG_WALL + { "WALL", TERCONN_WALL }, // implied for connects_to by ter_furn_flag::TFLAG_CONNECT_WITH_WALL, ter_furn_flag::TFLAG_AUTO_WALL_SYMBOL or ter_furn_flag::TFLAG_WALL { "CHAINFENCE", TERCONN_CHAINFENCE }, { "WOODFENCE", TERCONN_WOODFENCE }, { "RAILING", TERCONN_RAILING }, @@ -629,7 +629,7 @@ void map_data_common_t::extraprocess_flags( const ter_furn_flag flag ) transparent = true; } // wall connection check for JSON backwards compatibility - if( flag == ter_furn_flag::TFLAG_WALL || flag == ter_furn_flag::TFLAG_CONNECT_TO_WALL ) { + if( flag == ter_furn_flag::TFLAG_WALL || flag == ter_furn_flag::TFLAG_CONNECT_WITH_WALL ) { set_connect_groups( { "WALL" } ); set_connects_to( { "WALL" } ); } diff --git a/src/mapdata.h b/src/mapdata.h index 162ccc54defd7..f808850f5c168 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -219,7 +219,7 @@ enum class ter_furn_flag : int { TFLAG_HARVESTED, TFLAG_PERMEABLE, TFLAG_AUTO_WALL_SYMBOL, - TFLAG_CONNECT_TO_WALL, + TFLAG_CONNECT_WITH_WALL, TFLAG_CLIMBABLE, TFLAG_GOES_DOWN, TFLAG_GOES_UP, From ed815b2022cb99e802507e8a0853ad24ef97ffa4 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Fri, 30 Sep 2022 00:07:10 +0200 Subject: [PATCH 16/19] remove CONNECT_TO_WALL from terrain that has the WALL flag --- data/json/furniture_and_terrain/terrain-fences-gates.json | 2 +- data/json/furniture_and_terrain/terrain-windows.json | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/data/json/furniture_and_terrain/terrain-fences-gates.json b/data/json/furniture_and_terrain/terrain-fences-gates.json index bc3ce66be4868..7d151c0f458d8 100644 --- a/data/json/furniture_and_terrain/terrain-fences-gates.json +++ b/data/json/furniture_and_terrain/terrain-fences-gates.json @@ -8,7 +8,7 @@ "color": "light_red", "move_cost": 0, "coverage": 55, - "flags": [ "FLAMMABLE", "NOITEM", "DOOR", "CONNECT_TO_WALL", "WALL", "REDUCE_SCENT", "BLOCK_WIND", "BURROWABLE" ], + "flags": [ "FLAMMABLE", "NOITEM", "DOOR", "WALL", "REDUCE_SCENT", "BLOCK_WIND", "BURROWABLE" ], "bash": { "str_min": 24, "str_max": 150, diff --git a/data/json/furniture_and_terrain/terrain-windows.json b/data/json/furniture_and_terrain/terrain-windows.json index b7ca22d3eee67..3b893c8ea11b2 100644 --- a/data/json/furniture_and_terrain/terrain-windows.json +++ b/data/json/furniture_and_terrain/terrain-windows.json @@ -42,7 +42,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_flat_roof", - "flags": [ "FLAMMABLE", "NOITEM", "WALL", "CONNECT_TO_WALL", "BLOCK_WIND", "REDUCE_SCENT", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE", "NOITEM", "WALL", "BLOCK_WIND", "REDUCE_SCENT", "WINDOW", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_window_empty", "items": [ { "item": "glass_sheet", "count": 1 }, { "item": "duct_tape", "charges": [ 15, 25 ] } ] @@ -920,7 +920,6 @@ "SUPPORTS_ROOF", "WALL", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND", "REDUCE_SCENT", @@ -950,7 +949,6 @@ "SUPPORTS_ROOF", "WALL", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND", "REDUCE_SCENT", @@ -980,7 +978,6 @@ "SUPPORTS_ROOF", "WALL", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND", "REDUCE_SCENT", From 5f9eeb053e69a0d92bc1a725fbe52052cc82e1a2 Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Fri, 30 Sep 2022 00:09:49 +0200 Subject: [PATCH 17/19] rename remaining CONNECT_TO_WALL to CONNECT_WITH_WALL --- .../furniture_and_terrain/terrain-doors.json | 191 ++++++++++-------- .../terrain-embrasures.json | 2 +- .../terrain-fences-gates.json | 8 +- .../terrain-mechanisms.json | 16 +- .../furniture_and_terrain/terrain-migo.json | 6 +- .../terrain-triffid.json | 6 +- .../furniture_and_terrain/terrain-walls.json | 12 +- .../terrain-windows.json | 189 +++++++++-------- .../terrain_habitat_wall.json | 2 +- .../terrain_spaceship.json | 4 +- .../furniture_and_terrain/terrain-doors.json | 2 +- 11 files changed, 240 insertions(+), 198 deletions(-) diff --git a/data/json/furniture_and_terrain/terrain-doors.json b/data/json/furniture_and_terrain/terrain-doors.json index ab6f9466c3beb..06a73a2d0ca90 100644 --- a/data/json/furniture_and_terrain/terrain-doors.json +++ b/data/json/furniture_and_terrain/terrain-doors.json @@ -9,7 +9,7 @@ "move_cost": 0, "looks_like": "t_reinforced_door_glass_c", "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "MINEABLE", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_laminated_door_glass_o", "bash": { "str_min": 100, @@ -33,7 +33,7 @@ "move_cost": 2, "looks_like": "t_reinforced_door_glass_o", "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], "close": "t_laminated_door_glass_c", "bash": { "str_min": 100, @@ -56,7 +56,7 @@ "move_cost": 0, "looks_like": "t_reinforced_door_glass_c", "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "MINEABLE", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_ballistic_door_glass_o", "bash": { "str_min": 200, @@ -85,7 +85,7 @@ "move_cost": 2, "looks_like": "t_reinforced_door_glass_o", "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], "close": "t_ballistic_door_glass_c", "bash": { "str_min": 200, @@ -108,7 +108,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "MINEABLE", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_reinforced_door_glass_o", "bash": { "str_min": 40, @@ -141,7 +141,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "MINEABLE", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "MINEABLE", "SUPPORTS_ROOF" ], "open": "t_reinforced_door_glass_lab_o", "bash": { "str_min": 40, @@ -174,7 +174,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], "close": "t_reinforced_door_glass_c", "bash": { "str_min": 40, @@ -201,7 +201,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "MINEABLE", "SUPPORTS_ROOF" ], "close": "t_reinforced_door_glass_lab_c", "bash": { "str_min": 40, @@ -228,7 +228,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_o", "deconstruct": { "ter_set": "t_door_frame", @@ -268,7 +268,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_lab_o", "deconstruct": { "ter_set": "t_door_lab_frame", @@ -307,7 +307,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_white_o", "deconstruct": { "ter_set": "t_door_white_frame", @@ -346,7 +346,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_gray_o", "deconstruct": { "ter_set": "t_door_gray_frame", @@ -385,7 +385,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_red_o", "deconstruct": { "ter_set": "t_door_red_frame", @@ -424,7 +424,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_green_o", "deconstruct": { "ter_set": "t_door_green_frame", @@ -462,7 +462,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_white_frame", "items": [ @@ -499,7 +499,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_gray_frame", "items": [ @@ -536,7 +536,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_red_frame", "items": [ @@ -573,7 +573,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_green_frame", "items": [ @@ -618,7 +618,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -656,7 +656,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -694,7 +694,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -732,7 +732,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -761,7 +761,7 @@ "looks_like": "t_door_frame", "color": "brown", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 6, "str_max": 25, @@ -785,7 +785,7 @@ "looks_like": "t_door_frame", "color": "brown", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 6, "str_max": 25, @@ -809,7 +809,7 @@ "looks_like": "t_door_frame", "color": "brown", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 6, "str_max": 25, @@ -833,7 +833,7 @@ "looks_like": "t_door_frame", "color": "brown", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 6, "str_max": 25, @@ -858,7 +858,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_glass_red_o", "deconstruct": { "ter_set": "t_door_red_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -883,7 +883,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_glass_green_o", "deconstruct": { "ter_set": "t_door_green_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -908,7 +908,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_glass_white_o", "deconstruct": { "ter_set": "t_door_white_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -933,7 +933,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_glass_gray_o", "deconstruct": { "ter_set": "t_door_gray_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -958,7 +958,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_red_c", "deconstruct": { "ter_set": "t_door_red_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -983,7 +983,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_green_c", "deconstruct": { "ter_set": "t_door_green_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -1007,7 +1007,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_white_c", "deconstruct": { "ter_set": "t_door_white_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -1031,7 +1031,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_gray_c", "deconstruct": { "ter_set": "t_door_gray_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -1056,7 +1056,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "examine_action": "door_peephole", "open": "t_door_o_peep", "deconstruct": { @@ -1104,7 +1104,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -1142,7 +1142,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -1181,7 +1181,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -1211,7 +1211,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_frame", "items": [ @@ -1248,7 +1248,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_lab_frame", "items": [ @@ -1284,7 +1284,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_frame", "items": [ @@ -1324,7 +1324,15 @@ "move_cost": 0, "coverage": 100, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR_REINFORCED", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ + "FLAMMABLE_ASH", + "DOOR", + "NOITEM", + "BARRICADABLE_DOOR_REINFORCED", + "CONNECT_WITH_WALL", + "BLOCK_WIND", + "SUPPORTS_ROOF" + ], "open": "t_rdoor_o", "deconstruct": { "ter_set": "t_door_c", @@ -1369,7 +1377,7 @@ "REDUCE_SCENT", "BARRICADABLE_DOOR_REINFORCED_DAMAGED", "PERMEABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { @@ -1399,7 +1407,7 @@ "color": "red", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR_REINFORCED", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR_REINFORCED", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_c", "items": [ @@ -1443,7 +1451,7 @@ "FLAMMABLE_ASH", "NOITEM", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_DOOR", "LOCKED", "BLOCK_WIND", @@ -1491,7 +1499,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_DOOR", "LOCKED", "PICKABLE", @@ -1540,7 +1548,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_DOOR", "LOCKED", "PICKABLE", @@ -1589,7 +1597,7 @@ "ALARMED", "NOITEM", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_DOOR", "LOCKED", "BLOCK_WIND", @@ -1630,7 +1638,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "CONNECT_TO_WALL", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], "open": "t_door_curtain_o", "deconstruct": { "ter_set": "t_dirt", @@ -1663,7 +1671,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "CONNECT_TO_WALL", "EASY_DECONSTRUCT", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "EASY_DECONSTRUCT", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_makeshift_o", "deconstruct": { "ter_set": "t_door_frame", "items": [ { "item": "2x4", "count": 6 }, { "item": "rope_makeshift_6", "count": 2 } ] }, "bash": { @@ -1692,7 +1700,7 @@ "color": "dark_gray", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_dirt", "items": [ { "item": "stick", "count": 1 }, { "item": "sheet", "count": 2 }, { "item": "withered", "count": 12 } ] @@ -1725,7 +1733,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "CONNECT_TO_WALL", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], "open": "t_door_grass_curtain_o", "deconstruct": { "ter_set": "t_dirt", @@ -1757,7 +1765,7 @@ "color": "dark_gray", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_dirt", "items": [ { "item": "stick", "count": 1 }, { "item": "grass_sheet", "count": 2 }, { "item": "cordage_6", "count": 6 } ] @@ -1789,7 +1797,7 @@ "color": "brown", "move_cost": 2, "roof": "t_wood_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "EASY_DECONSTRUCT", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_door_frame", "items": [ { "item": "2x4", "count": 6 }, { "item": "rope_makeshift_6", "count": 2 } ] }, "close": "t_door_makeshift_c", "bash": { @@ -1817,7 +1825,7 @@ "looks_like": "t_floor", "color": "brown", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 6, "str_max": 25, @@ -1841,7 +1849,7 @@ "looks_like": "t_door_frame", "color": "brown", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 6, "str_max": 25, @@ -1865,7 +1873,7 @@ "looks_like": "t_door_frame", "color": "dark_gray", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 18, "str_max": 75, @@ -1884,7 +1892,7 @@ "looks_like": "t_mdoor_frame", "color": "dark_gray", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 18, "str_max": 75, @@ -1904,7 +1912,7 @@ "color": "dark_gray", "move_cost": 2, "roof": "t_metal_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "bash": { "str_min": 18, "str_max": 75, @@ -2143,7 +2151,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_metal_roof", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_metal_o", "oxytorch": { "result": "t_mdoor_frame", @@ -2174,7 +2182,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_metal_flat_roof", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_metal_corrugated_o", "bash": { "str_min": 30, @@ -2199,7 +2207,7 @@ "color": "cyan", "move_cost": 0, "roof": "t_metal_floor", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "AUTO_WALL_SYMBOL", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "AUTO_WALL_SYMBOL", "SUPPORTS_ROOF" ], "open": "t_secretdoor_metal_o", "bash": { "str_min": 80, @@ -2220,7 +2228,7 @@ "color": "cyan", "move_cost": 2, "roof": "t_metal_floor", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_secretdoor_metal_c", "bash": { "str_min": 80, @@ -2241,7 +2249,7 @@ "color": "light_gray", "move_cost": 0, "roof": "t_metal_floor", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "AUTO_WALL_SYMBOL", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "AUTO_WALL_SYMBOL", "SUPPORTS_ROOF" ], "open": "t_secretdoor_concrete_o", "bash": { "str_min": 80, @@ -2268,7 +2276,7 @@ "symbol": "'", "color": "light_gray", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_secretdoor_concrete_c", "bash": { "str_min": 80, @@ -2297,7 +2305,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_metal_roof", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_metal_lab_o", "bash": { "str_min": 80, @@ -2322,7 +2330,7 @@ "color": "cyan", "move_cost": 2, "roof": "t_metal_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_metal_c", "bash": { "str_min": 80, @@ -2347,7 +2355,7 @@ "color": "cyan", "move_cost": 2, "roof": "t_metal_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_metal_corrugated_c", "bash": { "str_min": 30, @@ -2372,7 +2380,7 @@ "color": "cyan", "move_cost": 2, "roof": "t_metal_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_metal_lab_c", "bash": { "str_min": 80, @@ -2398,7 +2406,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_metal_roof", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_metal_o_peep", "examine_action": "door_peephole", "bash": { @@ -2425,7 +2433,7 @@ "color": "cyan", "move_cost": 2, "roof": "t_metal_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_metal_c_peep", "bash": { "str_min": 80, @@ -2453,7 +2461,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_metal_roof", - "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_TO_WALL", "LOCKED", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_WITH_WALL", "LOCKED", "BLOCK_WIND", "SUPPORTS_ROOF" ], "oxytorch": { "result": "t_mdoor_frame", "duration": "14 seconds", @@ -2486,7 +2494,7 @@ }, "symbol": "+", "color": "cyan", - "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_TO_WALL", "LOCKED", "BLOCK_WIND", "PICKABLE", "SUPPORTS_ROOF" ] + "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_WITH_WALL", "LOCKED", "BLOCK_WIND", "PICKABLE", "SUPPORTS_ROOF" ] }, { "type": "terrain", @@ -2502,7 +2510,16 @@ "lockpick_result": "t_door_metal_c", "lockpick_message": "With a satisfying click, the lock on the door opens.", "roof": "t_metal_roof", - "flags": [ "NOITEM", "REDUCE_SCENT", "OPENCLOSE_INSIDE", "CONNECT_TO_WALL", "LOCKED", "BLOCK_WIND", "PICKABLE", "SUPPORTS_ROOF" ], + "flags": [ + "NOITEM", + "REDUCE_SCENT", + "OPENCLOSE_INSIDE", + "CONNECT_WITH_WALL", + "LOCKED", + "BLOCK_WIND", + "PICKABLE", + "SUPPORTS_ROOF" + ], "open": "t_door_metal_o", "prying": { "result": "t_door_metal_o", @@ -2539,7 +2556,7 @@ "color": "cyan", "move_cost": 0, "roof": "t_metal_roof", - "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_TO_WALL", "THIN_OBSTACLE", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SUPPORTS_ROOF" ], "hacksaw": { "result": "t_mdoor_frame", "duration": "15 minutes", @@ -2577,7 +2594,7 @@ "color": "cyan", "move_cost": 2, "roof": "t_metal_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_bar_c", "bash": { "str_min": 40, @@ -2613,7 +2630,7 @@ "message": "You finish cutting the metal.", "byproducts": [ { "item": "pipe", "count": 12 } ] }, - "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_TO_WALL", "LOCKED", "THIN_OBSTACLE", "PICKABLE", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_WITH_WALL", "LOCKED", "THIN_OBSTACLE", "PICKABLE", "SUPPORTS_ROOF" ], "examine_action": "locked_object_pickable", "oxytorch": { "result": "t_mdoor_frame", @@ -2645,7 +2662,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_glass_o", "deconstruct": { "ter_set": "t_door_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -2669,7 +2686,7 @@ "color": "light_cyan", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "DOOR", "NOITEM", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_glass_lab_o", "deconstruct": { "ter_set": "t_door_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -2693,7 +2710,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_c", "deconstruct": { "ter_set": "t_door_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -2717,7 +2734,7 @@ "color": "light_cyan", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_lab_c", "deconstruct": { "ter_set": "t_door_frame", "items": [ { "item": "glass_sheet", "count": 1 } ] }, "bash": { @@ -2739,7 +2756,7 @@ "symbol": "+", "looks_like": "t_door_glass_c", "color": "white", - "flags": [ "DOOR", "NOITEM", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "DOOR", "NOITEM", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_glass_frosted_o", "copy-from": "t_door_glass_c" }, @@ -2751,7 +2768,7 @@ "symbol": "+", "looks_like": "t_door_glass_frosted_c", "color": "white", - "flags": [ "DOOR", "NOITEM", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "DOOR", "NOITEM", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "open": "t_door_glass_frosted_lab_o", "copy-from": "t_door_glass_frosted_c" }, @@ -2763,7 +2780,7 @@ "symbol": "'", "looks_like": "t_door_glass_o", "color": "white", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_frosted_c", "copy-from": "t_door_glass_o" }, @@ -2775,7 +2792,7 @@ "symbol": "'", "looks_like": "t_door_glass_frosted_o", "color": "white", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_glass_frosted_lab_c", "copy-from": "t_door_glass_lab_o" }, @@ -2790,7 +2807,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_metal_flat_roof", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_door_metal_bulkhead_o", "bash": { "str_min": 80, @@ -2812,7 +2829,7 @@ "move_cost": 1, "coverage": 95, "roof": "t_metal_flat_roof", - "flags": [ "CONNECT_TO_WALL", "FLAT", "ROAD", "SUPPORTS_ROOF" ], + "flags": [ "CONNECT_WITH_WALL", "FLAT", "ROAD", "SUPPORTS_ROOF" ], "close": "t_door_metal_bulkhead_c", "bash": { "str_min": 80, diff --git a/data/json/furniture_and_terrain/terrain-embrasures.json b/data/json/furniture_and_terrain/terrain-embrasures.json index 322597d01f8f6..ac0d7a080a196 100644 --- a/data/json/furniture_and_terrain/terrain-embrasures.json +++ b/data/json/furniture_and_terrain/terrain-embrasures.json @@ -236,7 +236,7 @@ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "WALL", "MOUNTABLE", "PERMEABLE", diff --git a/data/json/furniture_and_terrain/terrain-fences-gates.json b/data/json/furniture_and_terrain/terrain-fences-gates.json index 7d151c0f458d8..4e4c743791409 100644 --- a/data/json/furniture_and_terrain/terrain-fences-gates.json +++ b/data/json/furniture_and_terrain/terrain-fences-gates.json @@ -26,7 +26,7 @@ "symbol": ".", "color": "brown", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAMMABLE", "FLAT", "CONNECT_TO_WALL", "BURROWABLE" ], + "flags": [ "TRANSPARENT", "FLAMMABLE", "FLAT", "CONNECT_WITH_WALL", "BURROWABLE" ], "bash": { "str_min": 6, "str_max": 150, @@ -44,7 +44,7 @@ "symbol": "&", "color": "cyan", "move_cost": 0, - "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_TO_WALL", "MINEABLE", "BURROWABLE" ], + "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_WITH_WALL", "MINEABLE", "BURROWABLE" ], "bash": { "str_min": 60, "str_max": 210, @@ -357,7 +357,7 @@ "color": "brown", "looks_like": "t_chickenwire_gate_c", "move_cost": 0, - "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "BURROWABLE", "CONNECT_TO_WALL" ], + "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "BURROWABLE", "CONNECT_WITH_WALL" ], "open": "t_screen_door_o", "deconstruct": { "ter_set": "t_floor", @@ -392,7 +392,7 @@ "color": "brown", "looks_like": "t_chickenwire_gate_o", "move_cost": 2, - "flags": [ "TRANSPARENT", "PERMEABLE", "BURROWABLE", "CONNECT_TO_WALL" ], + "flags": [ "TRANSPARENT", "PERMEABLE", "BURROWABLE", "CONNECT_WITH_WALL" ], "close": "t_screen_door_c", "deconstruct": { "ter_set": "t_floor", diff --git a/data/json/furniture_and_terrain/terrain-mechanisms.json b/data/json/furniture_and_terrain/terrain-mechanisms.json index 24b68ace47622..50228da697625 100644 --- a/data/json/furniture_and_terrain/terrain-mechanisms.json +++ b/data/json/furniture_and_terrain/terrain-mechanisms.json @@ -255,7 +255,7 @@ "symbol": "=", "color": "light_gray", "move_cost": 0, - "flags": [ "NOITEM", "CONNECT_TO_WALL" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL" ], "//": "For the player to chat with an NPC through the intercom, the npc must have 'name_unique': 'the_intercom' and must be within 10 tiles of the intercom.", "examine_action": "intercom", "bash": { @@ -277,7 +277,7 @@ "color": "pink", "move_cost": 0, "roof": "t_metal_roof", - "flags": [ "NOITEM", "CONNECT_TO_WALL" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL" ], "examine_action": "cardreader_robofac", "bash": { "str_min": 18, @@ -298,7 +298,7 @@ "color": "pink", "move_cost": 0, "roof": "t_metal_roof", - "flags": [ "NOITEM", "CONNECT_TO_WALL" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL" ], "examine_action": { "type": "cardreader", "flags": [ "SCIENCE_CARD" ], @@ -326,7 +326,7 @@ "color": "pink", "move_cost": 0, "roof": "t_metal_roof", - "flags": [ "NOITEM", "CONNECT_TO_WALL" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL" ], "examine_action": { "type": "cardreader", "flags": [ "MILITARY_CARD" ], @@ -355,7 +355,7 @@ "symbol": "6", "color": "pink", "move_cost": 0, - "flags": [ "NOITEM", "CONNECT_TO_WALL" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL" ], "examine_action": { "type": "cardreader", "flags": [ "INDUSTRIAL_CARD" ], @@ -384,7 +384,7 @@ "symbol": "6", "color": "pink", "move_cost": 0, - "flags": [ "NOITEM", "CONNECT_TO_WALL" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL" ], "examine_action": "cardreader_fp", "bash": { "str_min": 18, @@ -429,7 +429,7 @@ "color": "pink", "move_cost": 0, "roof": "t_metal_roof", - "flags": [ "NOITEM", "CONNECT_TO_WALL" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL" ], "examine_action": { "type": "cardreader", "flags": [ "COOP_CARD" ], @@ -720,7 +720,7 @@ "color": "light_gray", "move_cost": 0, "roof": "t_metal_roof", - "flags": [ "NOITEM", "CONNECT_TO_WALL", "MINEABLE" ], + "flags": [ "NOITEM", "CONNECT_WITH_WALL", "MINEABLE" ], "bash": { "str_min": 200, "str_max": 600, diff --git a/data/json/furniture_and_terrain/terrain-migo.json b/data/json/furniture_and_terrain/terrain-migo.json index 17a9f04ac41f4..c6f019ce78500 100644 --- a/data/json/furniture_and_terrain/terrain-migo.json +++ b/data/json/furniture_and_terrain/terrain-migo.json @@ -106,7 +106,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_resin_roof", - "flags": [ "DOOR", "NOITEM", "CONNECT_TO_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], + "flags": [ "DOOR", "NOITEM", "CONNECT_WITH_WALL", "BLOCK_WIND", "SUPPORTS_ROOF" ], "open": "t_resin_hole_o", "deconstruct": { "ter_set": "t_resin_hole", "items": [ { "item": "resin_chunk", "count": [ 2, 5 ] } ] }, "bash": { @@ -127,7 +127,7 @@ "color": "light_gray", "move_cost": 2, "roof": "t_resin_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_resin_hole", "items": [ { "item": "resin_chunk", "count": [ 2, 5 ] } ] }, "close": "t_resin_hole_c", "bash": { @@ -148,7 +148,7 @@ "color": "light_gray", "move_cost": 4, "roof": "t_resin_roof", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "SUPPORTS_ROOF" ], "bash": { "str_min": 100, "str_max": 500, diff --git a/data/json/furniture_and_terrain/terrain-triffid.json b/data/json/furniture_and_terrain/terrain-triffid.json index b567c5b089b77..0b979a7a22de6 100644 --- a/data/json/furniture_and_terrain/terrain-triffid.json +++ b/data/json/furniture_and_terrain/terrain-triffid.json @@ -46,7 +46,7 @@ "symbol": "&", "color": "brown", "move_cost": 0, - "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_TO_WALL" ], + "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_WITH_WALL" ], "bash": { "str_min": 8, "str_max": 150, @@ -162,7 +162,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_flat_roof", - "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "BLOCK_WIND" ], + "flags": [ "FLAMMABLE_ASH", "DOOR", "NOITEM", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "BLOCK_WIND" ], "open": "t_bramble_door_o", "bash": { "str_min": 12, @@ -182,7 +182,7 @@ "color": "brown", "move_cost": 2, "roof": "t_flat_roof", - "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_TO_WALL", "ROAD" ], + "flags": [ "FLAMMABLE_ASH", "TRANSPARENT", "FLAT", "BARRICADABLE_DOOR", "CONNECT_WITH_WALL", "ROAD" ], "close": "t_bramble_door_c", "bash": { "str_min": 12, diff --git a/data/json/furniture_and_terrain/terrain-walls.json b/data/json/furniture_and_terrain/terrain-walls.json index ce77d8095296d..527dbed699923 100644 --- a/data/json/furniture_and_terrain/terrain-walls.json +++ b/data/json/furniture_and_terrain/terrain-walls.json @@ -885,7 +885,7 @@ "move_cost": 0, "coverage": 100, "roof": "t_rock_roof", - "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "CONNECT_TO_WALL", "MINEABLE", "BLOCK_WIND" ], + "flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL", "NO_SCENT", "AUTO_WALL_SYMBOL", "CONNECT_WITH_WALL", "MINEABLE", "BLOCK_WIND" ], "bash": { "str_min": 120, "str_max": 400, @@ -1276,7 +1276,7 @@ "color": "light_red", "move_cost": 0, "coverage": 35, - "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_TO_WALL" ], + "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_WITH_WALL" ], "bash": { "str_min": 4, "str_max": 110, @@ -1375,7 +1375,7 @@ "symbol": "&", "color": "brown", "move_cost": 0, - "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_TO_WALL" ], + "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_WITH_WALL" ], "bash": { "str_min": 8, "str_max": 150, @@ -1396,7 +1396,7 @@ "color": "brown", "move_cost": 0, "coverage": 100, - "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "CONNECT_TO_WALL", "WALL", "BLOCK_WIND" ], + "flags": [ "FLAMMABLE", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "CONNECT_WITH_WALL", "WALL", "BLOCK_WIND" ], "bash": { "str_min": 35, "str_max": 150, @@ -1445,7 +1445,7 @@ "items": [ { "item": "2x4", "count": [ 0, 3 ] }, { "item": "splinter", "count": [ 3, 6 ] } ] }, "shoot": { "chance_to_hit": 25, "reduce_damage": [ 20, 40 ], "reduce_damage_laser": [ 20, 50 ], "destroy_damage": [ 30, 100 ] }, - "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_TO_WALL" ] + "flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "NOITEM", "SUPPORTS_ROOF", "REDUCE_SCENT", "PERMEABLE", "CONNECT_WITH_WALL" ] }, { "id": "t_wall_wattle_half", @@ -1779,7 +1779,7 @@ "message": "You finish cutting the metal.", "byproducts": [ { "item": "pipe", "count": 3 } ] }, - "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_TO_WALL", "THIN_OBSTACLE" ], + "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "CONNECT_WITH_WALL", "THIN_OBSTACLE" ], "oxytorch": { "result": "t_floor", "duration": "9 seconds", "byproducts": [ { "item": "pipe", "count": [ 1, 2 ] } ] }, "bash": { "str_min": 60, diff --git a/data/json/furniture_and_terrain/terrain-windows.json b/data/json/furniture_and_terrain/terrain-windows.json index 3b893c8ea11b2..6081fd945a8d1 100644 --- a/data/json/furniture_and_terrain/terrain-windows.json +++ b/data/json/furniture_and_terrain/terrain-windows.json @@ -14,7 +14,7 @@ "FLAMMABLE", "NOITEM", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -75,7 +75,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -138,7 +138,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -185,7 +185,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "MOUNTABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -291,7 +291,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "MOUNTABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -342,7 +342,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -403,7 +403,7 @@ "ALARMED", "NOITEM", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -469,7 +469,7 @@ "FLAMMABLE", "SUPPORTS_ROOF", "MOUNTABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -515,7 +515,7 @@ "FLAMMABLE", "NOITEM", "MOUNTABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "SMALL_PASSAGE", "PERMEABLE", "WINDOW", @@ -532,7 +532,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_flat_roof", - "flags": [ "FLAMMABLE", "NOITEM", "REDUCE_SCENT", "CONNECT_TO_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE", "NOITEM", "REDUCE_SCENT", "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_window_empty", "items": [ { "item": "2x4", "count": [ 3, 4 ] }, { "item": "nail", "charges": [ 6, 8 ] }, { "item": "glass_sheet", "count": 1 } ] @@ -567,7 +567,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_flat_roof", - "flags": [ "FLAMMABLE", "NOITEM", "CONNECT_TO_WALL", "BLOCK_WIND", "PERMEABLE", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE", "NOITEM", "CONNECT_WITH_WALL", "BLOCK_WIND", "PERMEABLE", "WINDOW", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_window_empty", "items": [ { "item": "2x4", "count": [ 3, 4 ] }, { "item": "nail", "charges": [ 6, 8 ] } ] @@ -602,7 +602,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_flat_roof", - "flags": [ "FLAMMABLE", "NOITEM", "REDUCE_SCENT", "CONNECT_TO_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE", "NOITEM", "REDUCE_SCENT", "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_window", "items": [ { "item": "2x4", "count": [ 6, 8 ] }, { "item": "nail", "charges": [ 12, 16 ] } ] }, "bash": { "str_min": 12, @@ -625,7 +625,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_flat_roof", - "flags": [ "FLAMMABLE", "NOITEM", "REDUCE_SCENT", "CONNECT_TO_WALL", "BLOCK_WIND", "PERMEABLE", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "FLAMMABLE", "NOITEM", "REDUCE_SCENT", "CONNECT_WITH_WALL", "BLOCK_WIND", "PERMEABLE", "WINDOW", "SUPPORTS_ROOF" ], "deconstruct": { "ter_set": "t_window_empty", "items": [ { "item": "2x4", "count": [ 6, 8 ] }, { "item": "nail", "charges": [ 12, 16 ] } ] @@ -657,7 +657,7 @@ "message": "You finish cutting the metal.", "byproducts": [ { "item": "rebar", "count": [ 1, 4 ] } ] }, - "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_TO_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" ], "oxytorch": { "result": "t_window_empty", "duration": "4 seconds", @@ -692,7 +692,7 @@ "move_cost": 0, "coverage": 95, "roof": "t_flat_roof", - "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_TO_WALL", "BLOCK_WIND", "PERMEABLE", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "NOITEM", "REDUCE_SCENT", "CONNECT_WITH_WALL", "BLOCK_WIND", "PERMEABLE", "WINDOW", "SUPPORTS_ROOF" ], "oxytorch": { "result": "t_window_empty", "duration": "4 seconds", @@ -738,7 +738,7 @@ "message": "You finish cutting the metal.", "byproducts": [ { "item": "rebar", "count": [ 1, 8 ] } ] }, - "flags": [ "TRANSPARENT", "NOITEM", "CONNECT_TO_WALL", "THIN_OBSTACLE", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "NOITEM", "CONNECT_WITH_WALL", "THIN_OBSTACLE", "WINDOW", "SUPPORTS_ROOF" ], "oxytorch": { "result": "t_window", "duration": "9 seconds", "byproducts": [ { "item": "rebar", "count": [ 1, 2 ] } ] }, "bash": { "str_min": 3, @@ -768,7 +768,7 @@ "message": "You finish cutting the metal.", "byproducts": [ { "item": "rebar", "count": [ 1, 8 ] } ] }, - "flags": [ "TRANSPARENT", "NOITEM", "CONNECT_TO_WALL", "WINDOW", "PERMEABLE", "SUPPORTS_ROOF", "THIN_OBSTACLE" ], + "flags": [ "TRANSPARENT", "NOITEM", "CONNECT_WITH_WALL", "WINDOW", "PERMEABLE", "SUPPORTS_ROOF", "THIN_OBSTACLE" ], "oxytorch": { "result": "t_window_empty", "duration": "9 seconds", "byproducts": [ { "item": "rebar", "count": [ 1, 2 ] } ] }, "bash": { "str_min": 60, @@ -799,7 +799,7 @@ "message": "You finish cutting the metal.", "byproducts": [ { "item": "rebar", "count": [ 1, 8 ] } ] }, - "flags": [ "TRANSPARENT", "NOITEM", "REDUCE_SCENT", "BLOCK_WIND", "ALARMED", "CONNECT_TO_WALL", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ "TRANSPARENT", "NOITEM", "REDUCE_SCENT", "BLOCK_WIND", "ALARMED", "CONNECT_WITH_WALL", "WINDOW", "SUPPORTS_ROOF" ], "oxytorch": { "result": "t_window_alarm", "duration": "9 seconds", "byproducts": [ { "item": "rebar", "count": [ 1, 2 ] } ] }, "bash": { "str_min": 3, @@ -835,7 +835,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -883,7 +883,7 @@ "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", "BLOCK_WIND", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "WINDOW", "SUPPORTS_ROOF" ], @@ -1018,7 +1018,7 @@ "flags": [ "TRANSPARENT", "NOITEM", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_WINDOW", "BLOCK_WIND", "REDUCE_SCENT", @@ -1060,7 +1060,15 @@ "message": "You finish cutting the metal.", "byproducts": [ { "item": "pipe", "count": [ 1, 12 ] }, { "item": "sheet_metal", "count": 4 } ] }, - "flags": [ "NOITEM", "CONNECT_TO_WALL", "BARRICADABLE_WINDOW_CURTAINS", "BLOCK_WIND", "REDUCE_SCENT", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ + "NOITEM", + "CONNECT_WITH_WALL", + "BARRICADABLE_WINDOW_CURTAINS", + "BLOCK_WIND", + "REDUCE_SCENT", + "WINDOW", + "SUPPORTS_ROOF" + ], "curtain_transform": "t_metal_grate_window", "examine_action": "curtains", "open": "t_metal_grate_window_with_curtain_open", @@ -1091,7 +1099,7 @@ "flags": [ "TRANSPARENT", "NOITEM", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_WINDOW_CURTAINS", "BLOCK_WIND", "REDUCE_SCENT", @@ -1141,7 +1149,7 @@ "flags": [ "TRANSPARENT", "NOITEM", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_WINDOW", "THIN_OBSTACLE", "PERMEABLE", @@ -1182,7 +1190,15 @@ "color": "light_gray", "move_cost": 0, "roof": "t_flat_roof", - "flags": [ "NOITEM", "CONNECT_TO_WALL", "THIN_OBSTACLE", "BARRICADABLE_WINDOW_CURTAINS", "PERMEABLE", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ + "NOITEM", + "CONNECT_WITH_WALL", + "THIN_OBSTACLE", + "BARRICADABLE_WINDOW_CURTAINS", + "PERMEABLE", + "WINDOW", + "SUPPORTS_ROOF" + ], "hacksaw": { "result": "t_window_reinforced_noglass", "duration": "10 minutes", @@ -1223,7 +1239,7 @@ "flags": [ "TRANSPARENT", "NOITEM", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BARRICADABLE_WINDOW_CURTAINS", "PERMEABLE", "WINDOW", @@ -1285,7 +1301,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1326,7 +1342,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -1366,7 +1382,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1412,7 +1428,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1460,7 +1476,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -1509,7 +1525,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1550,7 +1566,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -1591,7 +1607,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1638,7 +1654,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1686,7 +1702,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -1734,7 +1750,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "REDUCE_SCENT", "WINDOW", @@ -1783,7 +1799,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -1831,7 +1847,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1880,7 +1896,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -1930,7 +1946,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -1981,7 +1997,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2025,7 +2041,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2069,7 +2085,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2117,7 +2133,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2168,7 +2184,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2218,7 +2234,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2259,7 +2275,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2300,7 +2316,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2347,7 +2363,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2395,7 +2411,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2444,7 +2460,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2493,7 +2509,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2542,7 +2558,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2592,7 +2608,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2643,7 +2659,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2694,7 +2710,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2742,7 +2758,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2790,7 +2806,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2839,7 +2855,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2889,7 +2905,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -2940,7 +2956,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -2989,7 +3005,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3038,7 +3054,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3088,7 +3104,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3139,7 +3155,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3190,7 +3206,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3234,7 +3250,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3277,7 +3293,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3325,7 +3341,7 @@ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3375,7 +3391,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3426,7 +3442,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3474,7 +3490,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3522,7 +3538,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3575,7 +3591,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3629,7 +3645,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3707,7 +3723,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3755,7 +3771,7 @@ "BARRICADABLE_WINDOW", "OPENCLOSE_INSIDE", "MOUNTABLE", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3803,7 +3819,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3852,7 +3868,7 @@ "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "BLOCK_WIND", "WINDOW", "SUPPORTS_ROOF" @@ -3902,7 +3918,7 @@ "OPENCLOSE_INSIDE", "MOUNTABLE", "BARRICADABLE_WINDOW_CURTAINS", - "CONNECT_TO_WALL", + "CONNECT_WITH_WALL", "THIN_OBSTACLE", "SMALL_PASSAGE", "PERMEABLE", @@ -3945,7 +3961,16 @@ "color": "light_gray", "move_cost": 0, "roof": "t_metal_flat_roof", - "flags": [ "TRANSPARENT", "NOITEM", "CONNECT_TO_WALL", "THIN_OBSTACLE", "BLOCK_WIND", "REDUCE_SCENT", "WINDOW", "SUPPORTS_ROOF" ], + "flags": [ + "TRANSPARENT", + "NOITEM", + "CONNECT_WITH_WALL", + "THIN_OBSTACLE", + "BLOCK_WIND", + "REDUCE_SCENT", + "WINDOW", + "SUPPORTS_ROOF" + ], "bash": { "str_min": 50, "str_max": 75, diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json index 6b4b27b8b0da5..648f55093d546 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_wall.json @@ -111,7 +111,7 @@ "color": "yellow", "description": "The glass panel that would have covered this porthole has been broken, allowing unfettered access to the rooms within.", "close": "t_wall_prefab_bglass_shutters", - "flags": [ "TRANSPARENT", "FLAMMABLE", "NOITEM", "MOUNTABLE", "CONNECT_TO_WALL", "SMALL_PASSAGE", "WINDOW" ], + "flags": [ "TRANSPARENT", "FLAMMABLE", "NOITEM", "MOUNTABLE", "CONNECT_WITH_WALL", "SMALL_PASSAGE", "WINDOW" ], "roof": "t_metal_flat_roof", "bash": { "str_min": 20, diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_spaceship.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_spaceship.json index 8466698e7eac3..ea38b73dc9f06 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_spaceship.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_spaceship.json @@ -74,7 +74,7 @@ "symbol": "+", "color": "light_red", "open": "t_afs_space_ship_hatch_o", - "flags": [ "NOITEM", "DOOR", "CONNECT_TO_WALL", "MINEABLE" ], + "flags": [ "NOITEM", "DOOR", "CONNECT_WITH_WALL", "MINEABLE" ], "copy-from": "t_door_metal_lab_c", "bash": { "str_min": 200, @@ -101,7 +101,7 @@ "copy-from": "t_door_metal_lab_o", "symbol": "'", "color": "light_red", - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD", "MINEABLE" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD", "MINEABLE" ], "bash": { "str_min": 200, "str_max": 600, diff --git a/data/mods/Xedra_Evolved/furniture_and_terrain/terrain-doors.json b/data/mods/Xedra_Evolved/furniture_and_terrain/terrain-doors.json index 70040b1546d43..4f91c77bcbca2 100644 --- a/data/mods/Xedra_Evolved/furniture_and_terrain/terrain-doors.json +++ b/data/mods/Xedra_Evolved/furniture_and_terrain/terrain-doors.json @@ -30,7 +30,7 @@ "symbol": "'", "color": "light_gray", "move_cost": 2, - "flags": [ "TRANSPARENT", "FLAT", "CONNECT_TO_WALL", "ROAD" ], + "flags": [ "TRANSPARENT", "FLAT", "CONNECT_WITH_WALL", "ROAD" ], "close": "t_secretdoor_wall_c", "bash": { "str_min": 30, From 2352b1ba03374358ced3754f85981eb16202d91b Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Fri, 30 Sep 2022 11:53:51 +0200 Subject: [PATCH 18/19] remove reset of auto groups, replace by removal through tilde prefix --- src/mapdata.cpp | 60 ++++++++++++++++++++++++------------------------- src/mapdata.h | 10 ++++++--- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 40374b9d03a94..97ccb677fb272 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -661,38 +661,44 @@ void map_data_common_t::set_flag( const ter_furn_flag flag ) } void map_data_common_t::set_connect_groups( const std::vector - &connect_group_string ) + &connect_groups_vec ) { - for( const std::string &group : connect_group_string ) { - const auto it = ter_connects_map.find( group ); - if( it != ter_connects_map.end() ) { - connect_groups.set( it->second ); - } else { // arbitrary connect groups are a bad idea for optimization reasons - debugmsg( "can't find terrain connection group %s", group.c_str() ); - } - } + set_groups( connect_groups, connect_groups_vec ); } -void map_data_common_t::set_connects_to( const std::vector &connect_group_string ) +void map_data_common_t::set_connects_to( const std::vector &connect_groups_vec ) { - for( const std::string &group : connect_group_string ) { - const auto it = ter_connects_map.find( group ); - if( it != ter_connects_map.end() ) { - connect_to_groups.set( it->second ); - } else { // arbitrary connect groups are a bad idea for optimization reasons - debugmsg( "can't find terrain connection group %s", group.c_str() ); - } - } + set_groups( connect_to_groups, connect_groups_vec ); } -void map_data_common_t::set_rotates_to( const std::vector &towards_group_string ) +void map_data_common_t::set_rotates_to( const std::vector &connect_groups_vec ) { - for( const std::string &group : towards_group_string ) { - const auto it = ter_connects_map.find( group ); + set_groups( rotate_to_groups, connect_groups_vec ); +} + +void map_data_common_t::set_groups( std::bitset &bits, + const std::vector &connect_groups_vec ) +{ + for( const std::string &group : connect_groups_vec ) { + if( group.empty() ) { + debugmsg( "Can't use empty string for terrain groups" ); + continue; + } + std::string grp = group; + bool remove = false; + if( grp.at( 0 ) == '~' ) { + grp = grp.substr( 1 ); + remove = true; + } + const auto it = ter_connects_map.find( grp ); if( it != ter_connects_map.end() ) { - rotate_to_groups.set( it->second ); - } else { // arbitrary rotates towards groups are a bad idea for optimization reasons - debugmsg( "can't find terrain rotates towards group %s", group.c_str() ); + if( remove ) { + bits.reset( it->second ); + } else { + bits.set( it->second ); + } + } else { + debugmsg( "can't find terrain group %s", group.c_str() ); } } } @@ -1421,15 +1427,12 @@ void ter_t::load( const JsonObject &jo, const std::string &src ) // connections from JSON are set. This is so that wall flags can set wall connections // but can be overridden by explicit connections in JSON. if( jo.has_member( "connect_groups" ) ) { - connect_groups.reset(); set_connect_groups( jo.get_as_string_array( "connect_groups" ) ); } if( jo.has_member( "connects_to" ) ) { - connect_to_groups.reset(); set_connects_to( jo.get_as_string_array( "connects_to" ) ); } if( jo.has_member( "rotates_to" ) ) { - rotate_to_groups.reset(); set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } @@ -1600,15 +1603,12 @@ void furn_t::load( const JsonObject &jo, const std::string &src ) } if( jo.has_member( "connect_groups" ) ) { - connect_groups.reset(); set_connect_groups( jo.get_as_string_array( "connect_groups" ) ); } if( jo.has_member( "connects_to" ) ) { - connect_to_groups.reset(); set_connects_to( jo.get_as_string_array( "connects_to" ) ); } if( jo.has_member( "rotates_to" ) ) { - rotate_to_groups.reset(); set_rotates_to( jo.get_as_string_array( "rotates_to" ) ); } diff --git a/src/mapdata.h b/src/mapdata.h index f808850f5c168..82342539f4365 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -550,11 +550,15 @@ struct map_data_common_t { std::bitset rotate_to_groups; // Set to be member of a connection target group - void set_connect_groups( const std::vector &connect_group_string ); + void set_connect_groups( const std::vector &connect_groups_vec ); // Set target connection group - void set_connects_to( const std::vector &connect_group_string ); + void set_connects_to( const std::vector &connect_groups_vec ); // Set target group to rotate towards - void set_rotates_to( const std::vector &towards_group_string ); + void set_rotates_to( const std::vector &connect_groups_vec ); + + // Set groups helper function + void set_groups( std::bitset &bits, + const std::vector &connect_groups_vec ); bool in_connect_groups( const std::bitset &test_connect_group ) const { return ( connect_groups & test_connect_group ).any(); From 4d6a8b59ace57b1253fb301380c15398933c787f Mon Sep 17 00:00:00 2001 From: mlange-42 Date: Fri, 30 Sep 2022 16:37:36 +0200 Subject: [PATCH 19/19] document the new behaviour --- doc/JSON_INFO.md | 43 ++++++++++++++++++++++++++++--------------- doc/TILESET.md | 29 ++++++++++++++++++----------- 2 files changed, 46 insertions(+), 26 deletions(-) diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index 2bb325fc83e19..1ce35b8dc0205 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -184,9 +184,9 @@ Use the `Home` key to return to the top. - [`id`](#id-1) - [`name`](#name-1) - [`flags`](#flags-1) + - [`connect_groups`](#connect_groups) - [`connects_to`](#connects_to) - - [Connect groups](#connect-groups) - - [`rotates_to` and `rotates_to_member`](#rotates_to-and-rotates_to_member) + - [`rotates_to`](#rotates_to) - [`symbol`](#symbol) - [`comfort`](#comfort) - [`floor_bedding_warmth`](#floor_bedding_warmth) @@ -4559,9 +4559,9 @@ Strength required to move the furniture around. Negative values indicate an unmo "trap": "spike_pit", "max_volume": "1000 L", "flags": ["TRANSPARENT", "DIGGABLE"], - "connects_to" : "WALL", - "rotates_to" : "INDOORFLOOR", - "rotates_to_member" : "INDOORFLOOR", + "connect_groups" : [ "WALL" ], + "connects_to" : [ "WALL" ], + "rotates_to" : [ "INDOORFLOOR" ], "close": "t_foo_closed", "open": "t_foo_open", "lockpick_result": "t_door_unlocked", @@ -4766,13 +4766,16 @@ Displayed name of the object. This will be translated. (Optional) Various additional flags, see "doc/JSON_FLAGS.md". -#### `connects_to` +#### `connect_groups` -(Optional) The group of terrains to which this terrain connects. This affects tile rotation and connections, and the ASCII symbol drawn by terrain with the flag "AUTO_WALL_SYMBOL". +(Optional) Makes the type a member of one or more [Connect groups](#connect-groups). + +Does not make the type connect or rotate itself, but serves as the passive side. +For the active, connecting or rotating side, see [`connects_to`](#connects_to) and [`rotates_to`](#rotates_to). Available groups are: -##### Connect groups +##### Connection groups ``` NONE PIT_DEEP @@ -4789,25 +4792,35 @@ CANVAS_WALL INDOORFLOOR SAND ``` -Example: `-` , `|` , `X` and `Y` are terrain which share the same `connects_to` value. `O` does not have it. `X` and `Y` also have the `AUTO_WALL_SYMBOL` flag. `X` will be drawn as a T-intersection (connected to west, south and east), `Y` will be drawn as a horizontal line (going from west to east, no connection to south). +`WALL` is implied by the flags `WALL` and `CONNECT_WITH_WALL`. +`INDOORFLOOR` is implied by the flag `INDOORS`. +Implicit groups can be removed be using tilde `~` as prefix of the group name. + +#### `connects_to` and + +(Optional) Makes the type connect to terrain types in the given groups (see [`connect_groups`](#connect_groups)). This affects tile rotation and connections, and the ASCII symbol drawn by terrain with the flag "AUTO_WALL_SYMBOL". + +Example: `-` , `|` , `X` and `Y` are terrain which share a group in `connect_groups` and `connects_to`. `O` does not have it. `X` and `Y` also have the `AUTO_WALL_SYMBOL` flag. `X` will be drawn as a T-intersection (connected to west, south and east), `Y` will be drawn as a horizontal line (going from west to east, no connection to south). ``` -X- -Y- | O ``` -#### `rotates_to` and `rotates_to_member` +Group `WALL` is implied by the flags `WALL` and `CONNECT_WITH_WALL`. +Implicit groups can be removed be using tilde `~` as prefix of the group name. + +#### `rotates_to` -(Optional) `rotates_to` specifies the group of terrain (or furniture) towards which this terrain (or furniture) rotates. -`rotates_to_member` adds the terrain (or furniture) to a group, as rotation target. -See [Connect groups](#Connect-groups) for available values. +(Optional) Makes the type rotate towards terrain types in the given groups (see [`connect_groups`](#connect_groups)). -In contrast to `connects_to`, this is not symmetric. -Only the terrain or furniture with `rotates_to` will rotate. Terrain can only rotate depending on terrain, while funiture can rotate depending on terrain and on other funiture. The parameters can e.g. be used to have window curtains on the indoor side only, or to orient traffic lights depending on the pavement. +Group `INDOORFLOOR` is implied by the flags `DOOR` and `WINDOW`. +Implicit groups can be removed be using tilde `~` as prefix of the group name. + #### `symbol` ASCII symbol of the object as it appears in the game. The symbol string must be exactly one character long. This can also be an array of 4 strings, which define the symbol during the different seasons. The first entry defines the symbol during spring. If it's not an array, the same symbol is used all year round. diff --git a/doc/TILESET.md b/doc/TILESET.md index 15dbb2a8e8ea9..beb4b99c7fc96 100644 --- a/doc/TILESET.md +++ b/doc/TILESET.md @@ -123,23 +123,31 @@ You can add `"rotates": true` to allow sprites to be rotated by the game automat `"multitile": true` signifies that there is an `additional_tiles` object (redundant? [probably](https://github.com/CleverRaven/Cataclysm-DDA/issues/46253)) with one or more objects that define sprites for game entities associated with this tile, such as broken versions of an item, or wall connections. Each object in the array has an `id` field, as above, and an `fg` field, which can be a single [root name](#root-name), an array of root names, or an array of objects as above. `"rotates": true` is implied with it and can be omitted. -#### Connecting terrain and furniture - `connects_to` +#### Connecting terrain and furniture - `connect_groups` and `connects_to` -For terrain or furniture that is intended to auto-connect using multitiles, set the property `connects_to` in the object definition (not in the tileset!) to an appropriate group: +For terrain or furniture that is intended to auto-connect using multitiles, set the properties `connect_groups` and `connects_to` in the object definition (not in the tileset!) to an appropriate group: ```json { "type": "terrain", "id": "t_brick_wall", ... + "connect_groups": "WALL", "connects_to": "WALL", ... } ``` -For details, see [JSON_INFO.md](./JSON_INFO.md#connects_to). +For both properties, arrays of multiple groups are possible. + +`connect_groups` adds the type to one or more groups, while `connects_to` makes the type connect to the given group(s). + +Connections are only set up from types that have a `connects_to` group to types that have the same group in `connect_groups`. + +For details, see JSON_INFO.md, sections [`connect_groups`](./JSON_INFO.md#connect_groups) and [`connects_to`](./JSON_INFO.md#connects_to). + +Wall work out of the box without modifying terrain definitions, as the required group `WALL` is implied by the flags `WALL` and `CONNECT_WITH_WALL` for `connect_groups` as well as `connects_to` (i.e. symmetric relation). -Connections are only set up between types that have the same `connects_to` group, so it is symmetric or bi-directional. Available groups are: ##### Connect groups @@ -212,17 +220,16 @@ In JSON, the multitile would be defined like this: #### Auto-rotating terrain and furniture - `rotates_to` Terrain and furniture can auto-rotate depending on other surrounding terrain or furniture using `rotates_to`. -For details, see [JSON_INFO.md](./JSON_INFO.md#rotates_to-and-rotates_to_member). +For details, see JSON_INFO.md, sections [`connect_groups`](./JSON_INFO.md#connect_groups) and [`rotates_to`](./JSON_INFO.md#rotates_to). Usage examples for terrain are doors and windows that look differently, seen from inside and outside (e.g. curtain). An example for furniture are street lights that orient towards the pavement. -The mechanism works similar to `connects_to`, and can be combined with it. -It makes also use of the same [Connect groups](#connect-groups). -Currently, however, auto-rotation is implemented only for `edge` and `end_piece` tiles (doors, windows) and `unconnected` tiles (e.g. street lights). +The mechanism works like to `connects_to`, and can be combined with it. +It also makes use of the same [Connect groups](#connect-groups), given by property `connect_groups`. +Currently, however, auto-rotation is implemented only for `edge` and `end_piece` tiles (doors, windows, furniture) and `unconnected` tiles (e.g. street lights). -Unlike `connects_to`, `rotates_to` is not symmetric. For the active/rotating type, `rotates_to` specifies a [Connect group](#connect-groups) the terrain should rotate towards (or rather, depend on). -For the passive/target type, `rotates_to_member` is used to add it to a [Connect group](#connect-groups). (The `connects_to` mechanism is not affected by setting groups this way.) +For the passive/target type, `connect_groups` is used to add it to a [Connect group](#connect-groups). Terrain can only use terrain to rotate towards, while furniture can use both, terrain and furniture. @@ -279,7 +286,7 @@ The full multitile would be defined like this: The order of sprites ensures that the multitile also works with only the first 4 instead of all 8 sprites. It also makes it compatible with tilesets that don't use the `rotates_to` feature. -Doors and windows work out of the box without modifying terrain definitions, as the required group `INDOORFLOOR` is implied by the flags `WINDOW`, `DOOR` (active) and `INDOORS` (target). +Doors and windows work out of the box without modifying terrain definitions, as the required group `INDOORFLOOR` is implied by the flags `WINDOW`, `DOOR` (active) and `INDOORS` (target/passive). ##### Unconnected `rotates_to`