From b4c66c516e6eac2c720b0621c6f82df692cb4eb6 Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Fri, 24 May 2024 19:22:24 -0400 Subject: [PATCH 1/8] Food continues to rot at temp above 63C --- src/item.cpp | 6 ++---- tests/rot_test.cpp | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index c1bb7ba75aeb8..be7de797c7ecc 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -7950,10 +7950,8 @@ float item::calc_hourly_rotpoints_at_temp( const units::temperature &temp ) cons { const units::temperature dropoff = units::from_fahrenheit( 38 ); // F, ~3 C const float max_rot_temp = 105; // F, ~41 C, Maximum rotting rate is at this temperature - const float safe_temp = 145; // F, ~63 C, safe temperature above which food stops rotting - if( temp <= temperatures::freezing || - temp > units::from_fahrenheit( safe_temp ) ) { + if( temp <= temperatures::freezing ) { return 0.f; } else if( temp < dropoff ) { // ditch our fancy equation and do a linear approach to 0 rot from 38 F (3 C) -> 32 F (0 C) @@ -7963,7 +7961,7 @@ float item::calc_hourly_rotpoints_at_temp( const units::temperature &temp ) cons // Exponential progress from 38 F (3 C) to 105 F (41 C) return 3600.f * std::exp2( ( units::to_fahrenheit( temp ) - 65.f ) / 16.f ); } else { - // Constant rot from 105 F (41 C) to 145 F (63 C) + // Constant rot from 105 F (41 C) upwards // This is approximately 20364.67 rot/hour return 3600.f * std::exp2( ( max_rot_temp - 65.f ) / 16.f ); } diff --git a/tests/rot_test.cpp b/tests/rot_test.cpp index 1247605a2f29d..5bb28be6d6d54 100644 --- a/tests/rot_test.cpp +++ b/tests/rot_test.cpp @@ -106,8 +106,9 @@ TEST_CASE( "Hourly_rotpoints", "[rot]" ) // No rot below 32F/0C CHECK( normal_item.calc_hourly_rotpoints_at_temp( units::from_celsius( 0 ) ) == 0 ); - // No rot above 145F/63C - CHECK( normal_item.calc_hourly_rotpoints_at_temp( units::from_celsius( 63 ) ) == 0 ); + // Max rot above 145F/63C + CHECK( normal_item.calc_hourly_rotpoints_at_temp( units::from_celsius( 63 ) ) == Approx( + 20364.67 ) ); // Make sure no off by one error at the border CHECK( normal_item.calc_hourly_rotpoints_at_temp( units::from_celsius( 62 ) ) == Approx( From ba01a2caf3d94668661561da29dcc799ff30251e Mon Sep 17 00:00:00 2001 From: TheMurderUnicorn Date: Fri, 24 May 2024 23:21:27 -0400 Subject: [PATCH 2/8] That's a nice sack --- data/json/mapgen/map_extras/roadblock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/mapgen/map_extras/roadblock.json b/data/json/mapgen/map_extras/roadblock.json index 666e150d36372..93d7c819796ef 100644 --- a/data/json/mapgen/map_extras/roadblock.json +++ b/data/json/mapgen/map_extras/roadblock.json @@ -159,7 +159,7 @@ ], "items": { "x": [ { "item": "corpses_verydead", "chance": 75 } ] }, "item": { - "#": [ { "item": "bag_canvas", "amount": [ 2, 5 ] }, { "item": "material_sand", "amount": [ 300, 2400 ] } ], + "#": [ { "item": "bag_durasack", "amount": [ 2, 5 ] }, { "item": "material_sand", "amount": [ 300, 2400 ] } ], ".": [ { "item": "splinter", "chance": 100, "amount": [ 1, 3 ] }, { "item": "2x4", "chance": 25 } ] }, "place_loot": [ { "group": "cop_armory", "x": [ 6, 10 ], "y": [ 15, 18 ], "chance": 100, "repeat": [ 4, 10 ] } ], From cdcc24acab7e920c3fe45f152d3f5477c12e75b1 Mon Sep 17 00:00:00 2001 From: TheMurderUnicorn Date: Fri, 24 May 2024 23:40:12 -0400 Subject: [PATCH 3/8] Change Sacks --- data/json/furniture_and_terrain/furniture-pallet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/furniture_and_terrain/furniture-pallet.json b/data/json/furniture_and_terrain/furniture-pallet.json index dda2e83b2f958..939aafba2f57d 100644 --- a/data/json/furniture_and_terrain/furniture-pallet.json +++ b/data/json/furniture_and_terrain/furniture-pallet.json @@ -78,7 +78,7 @@ "items": [ { "item": "material_cement", "container-item": "bag_canvas", "charges": 500, "count": [ 80, 90 ] }, { "item": "material_cement", "charges": [ 500, 1500 ] }, - { "item": "bag_canvas", "count": [ 2, 10 ], "damage": [ 1, 5 ] }, + { "item": "bag_durasack", "count": [ 2, 10 ], "damage": [ 1, 5 ] }, { "item": "pallet", "count": 1 } ] } From 929b6f6625a03df3ce542679d428ca3d0726de47 Mon Sep 17 00:00:00 2001 From: Maleclypse <54345792+Maleclypse@users.noreply.github.com> Date: Sat, 25 May 2024 08:00:04 -0500 Subject: [PATCH 4/8] [Magiclysm] Stormhammer weapon categories (#73795) * Stormhammer and Mage blade * Update data/mods/Magiclysm/items/ethereal_items.json * Update data/mods/Magiclysm/items/ethereal_items.json * Update data/mods/Magiclysm/items/ethereal_items.json --- data/mods/Magiclysm/items/ethereal_items.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/mods/Magiclysm/items/ethereal_items.json b/data/mods/Magiclysm/items/ethereal_items.json index eb0a1993568bf..c2faf0a7af90d 100644 --- a/data/mods/Magiclysm/items/ethereal_items.json +++ b/data/mods/Magiclysm/items/ethereal_items.json @@ -147,6 +147,7 @@ "looks_like": "warhammer", "material": [ "concentrated_mana" ], "techniques": [ "WBLOCK_2", "BRUTAL", "SWEEP" ], + "copy-from": "warhammer", "flags": [ "NONCONDUCTIVE", "BELT_CLIP", From 555e6e7998f201e4eda5979500ccd713c1d92da0 Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Sat, 25 May 2024 10:22:03 -0400 Subject: [PATCH 5/8] Add RISK_EXTREME flag, audit RISK_HIGH and RISK_LOW --- data/json/npcs/destination_locations.json | 5 +++ .../overmap/overmap_special/specials.json | 2 +- .../overmap_terrain/overmap_terrain.json | 13 +++--- .../overmap_terrain_agricultural.json | 1 + .../overmap_terrain_aircraft_carrier.json | 4 +- .../overmap_terrain/overmap_terrain_ants.json | 2 +- .../overmap_terrain_commercial.json | 2 +- .../overmap_terrain_fungal.json | 6 +-- .../overmap_terrain/overmap_terrain_lab.json | 40 +++++++++---------- .../overmap_terrain/overmap_terrain_mall.json | 2 +- .../overmap_terrain_mi-go.json | 12 +++--- .../overmap_terrain_microlab.json | 18 ++++----- .../overmap_terrain_military.json | 18 ++++----- .../overmap_terrain_nether.json | 4 +- .../overmap_terrain_oil_platform.json | 6 +-- .../overmap_terrain_private_resort.json | 2 +- .../overmap_terrain_public_institutional.json | 10 ++--- .../overmap_terrain_triffid.json | 28 ++++++------- .../mods/Aftershock/maps/overmap_terrain.json | 4 +- data/mods/Defense_Mode/mapgen/megastore.json | 2 +- .../mods/DinoMod/overmap/overmap_terrain.json | 4 +- data/mods/Isolation-Protocol/Map/overmap.json | 2 +- .../Magiclysm/worldgen/overmap_specials.json | 2 +- .../Magiclysm/worldgen/overmap_terrain.json | 2 +- .../overmap/overmap_terrain.json | 2 +- .../overmap_terrain_nether.json | 2 +- .../overmap_terrain_termites.json | 4 +- .../overmap_terrain_triffid.json | 4 +- doc/JSON_FLAGS.md | 5 ++- src/omdata.h | 1 + src/overmap.cpp | 1 + 31 files changed, 110 insertions(+), 100 deletions(-) diff --git a/data/json/npcs/destination_locations.json b/data/json/npcs/destination_locations.json index 041bc7a0e989d..d315071bf9ec9 100644 --- a/data/json/npcs/destination_locations.json +++ b/data/json/npcs/destination_locations.json @@ -114,6 +114,11 @@ "id": "source_of_people", "flags": [ "SOURCE_PEOPLE" ] }, + { + "type": "overmap_location", + "id": "risk_extreme", + "flags": [ "RISK_EXTREME" ] + }, { "type": "overmap_location", "id": "risk_high", diff --git a/data/json/overmap/overmap_special/specials.json b/data/json/overmap/overmap_special/specials.json index 667eb860b3be4..a6ddd0c2b13c4 100644 --- a/data/json/overmap/overmap_special/specials.json +++ b/data/json/overmap/overmap_special/specials.json @@ -7135,7 +7135,7 @@ "connections": [ { "point": [ 3, 3, 0 ], "terrain": "road", "connection": "local_road", "from": [ 3, 2, 0 ] } ], "city_distance": [ 0, 20 ], "occurrences": [ 5, 100 ], - "flags": [ "GLOBALLY_UNIQUE", "RISK_HIGH", "GENERIC_LOOT", "MAN_MADE" ] + "flags": [ "GLOBALLY_UNIQUE", "RISK_EXTREME", "GENERIC_LOOT", "MAN_MADE" ] }, { "type": "overmap_special", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain.json b/data/json/overmap/overmap_terrain/overmap_terrain.json index 296e8cbdefa81..699ccb143b911 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain.json @@ -31,7 +31,8 @@ "sym": "^", "see_cost": 5, "extras": "build", - "mondensity": 2 + "mondensity": 2, + "flags": [ "RISK_HIGH", "GENERIC_LOOT" ] }, { "type": "overmap_terrain", @@ -711,7 +712,7 @@ "sym": "O", "color": "white", "see_cost": 5, - "flags": [ "RISK_LOW", "SOURCE_SAFETY", "SOURCE_FOOD" ] + "flags": [ "SOURCE_SAFETY", "SOURCE_FOOD" ] }, { "type": "overmap_terrain", @@ -874,7 +875,7 @@ "sym": "#", "color": "brown", "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -883,7 +884,7 @@ "sym": "%", "color": "dark_gray", "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -955,7 +956,7 @@ "sym": "S", "color": "white", "see_cost": 3, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -1015,7 +1016,7 @@ "sym": "8", "color": "yellow", "see_cost": 3, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json b/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json index 5cb4907cd6dfc..26e88eca0b140 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json @@ -28,6 +28,7 @@ "name": "rural building", "sym": "#", "color": "i_brown", + "delete": { "flags": [ "RISK_HIGH" ] }, "extend": { "flags": [ "SOURCE_FOOD", "SOURCE_SAFETY", "RISK_LOW", "SOURCE_FARMING" ] } }, { diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_aircraft_carrier.json b/data/json/overmap/overmap_terrain/overmap_terrain_aircraft_carrier.json index fdb1377a37453..a2b9f7a6156cd 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_aircraft_carrier.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_aircraft_carrier.json @@ -129,7 +129,7 @@ "color": "red", "see_cost": 5, "spawns": { "group": "GROUP_AIRCRAFT_CARRIER", "population": [ 20, 40 ], "chance": 100 }, - "flags": [ "RISK_HIGH", "LAKE" ] + "flags": [ "RISK_EXTREME", "LAKE" ] }, { "type": "overmap_terrain", @@ -179,6 +179,6 @@ "color": "red", "see_cost": 5, "spawns": { "group": "GROUP_AIRCRAFT_CARRIER_TECHNICIANS", "population": [ 20, 35 ], "chance": 100 }, - "flags": [ "RISK_HIGH", "LAKE" ] + "flags": [ "RISK_EXTREME", "LAKE" ] } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_ants.json b/data/json/overmap/overmap_terrain/overmap_terrain_ants.json index beb780eb61a1c..4dcc19cbd341c 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_ants.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_ants.json @@ -6,7 +6,7 @@ "sym": "%", "color": "brown", "see_cost": 2, - "flags": [ "KNOWN_DOWN", "RISK_HIGH", "REQUIRES_PREDECESSOR" ] + "flags": [ "KNOWN_DOWN", "RISK_EXTREME", "REQUIRES_PREDECESSOR" ] }, { "type": "overmap_terrain", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json b/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json index 9096596393939..8c0f650601e0a 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json @@ -714,7 +714,7 @@ "spawns": { "group": "GROUP_VANILLA", "population": [ 10, 20 ], "chance": 100 }, "flags": [ "SIDEWALK", - "RISK_HIGH", + "RISK_EXTREME", "SOURCE_FOOD", "SOURCE_DRINK", "SOURCE_GUN", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json b/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json index 4198541232351..03f4f3d00a5da 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json @@ -7,7 +7,7 @@ "color": "yellow", "see_cost": 3, "extras": "marloss", - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -17,7 +17,7 @@ "color": "light_gray", "see_cost": 2, "extras": "marloss", - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -27,6 +27,6 @@ "color": "cyan", "see_cost": 5, "extras": "marloss", - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_lab.json b/data/json/overmap/overmap_terrain/overmap_terrain_lab.json index 575bc7253c69e..be337191fab5a 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_lab.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_lab.json @@ -7,7 +7,7 @@ "color": "light_blue", "spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 }, "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -17,7 +17,7 @@ "color": "blue", "see_cost": 5, "spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 }, - "flags": [ "KNOWN_DOWN", "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "KNOWN_DOWN", "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -27,7 +27,7 @@ "color": "light_blue", "spawns": { "group": "GROUP_LAB", "population": [ 0, 8 ], "chance": 30 }, "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -56,7 +56,7 @@ "color": "light_blue", "spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 }, "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -86,7 +86,7 @@ "color": "light_blue", "spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 }, "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -126,7 +126,7 @@ "color": "light_blue", "see_cost": 5, "spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 }, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -172,7 +172,7 @@ "see_cost": 5, "extras": "subway", "spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 }, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -190,7 +190,7 @@ "sym": "F", "color": "green", "see_cost": 3, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -208,7 +208,7 @@ "sym": "L", "color": "cyan", "see_cost": 5, - "flags": [ "RISK_HIGH" ], + "flags": [ "RISK_EXTREME" ], "spawns": { "group": "GROUP_CENTRAL_LAB", "population": [ 0, 5 ], "chance": 20 } }, { @@ -359,7 +359,7 @@ "extras": "research_facility_interior", "see_cost": 5, "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -516,7 +516,7 @@ "sym": "L", "color": "light_blue", "see_cost": 5, - "flags": [ "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -525,7 +525,7 @@ "sym": "X", "color": "white", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -543,7 +543,7 @@ "color": "yellow", "see_cost": 5, "spawns": { "group": "GROUP_VANILLA", "population": [ 1, 4 ], "chance": 30 }, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -568,7 +568,7 @@ "color": "white", "see_cost": 5, "spawns": { "group": "GROUP_VANILLA", "population": [ 3, 15 ], "chance": 70 }, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -592,7 +592,7 @@ "sym": "R", "color": "green", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -617,7 +617,7 @@ "color": "light_gray", "see_cost": 5, "spawns": { "group": "GROUP_VANILLA", "population": [ 5, 15 ], "chance": 30 }, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -626,7 +626,7 @@ "sym": "F", "color": "light_gray", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -636,7 +636,7 @@ "color": "red", "see_cost": 5, "spawns": { "group": "GROUP_LAB_HOSPITAL", "population": [ 7, 15 ], "chance": 100 }, - "flags": [ "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -645,7 +645,7 @@ "sym": "M", "color": "red", "see_cost": 5, - "flags": [ "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -655,6 +655,6 @@ "color": "cyan", "see_cost": 5, "spawns": { "group": "GROUP_LAB_MAINTENANCE", "population": [ 5, 10 ], "chance": 100 }, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_mall.json b/data/json/overmap/overmap_terrain/overmap_terrain_mall.json index a6c151a9e5503..8fb68b8d3e9d8 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_mall.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_mall.json @@ -7,7 +7,7 @@ "sym": "M", "see_cost": 5, "mondensity": 2, - "flags": [ "SIDEWALK", "RISK_HIGH", "SOURCE_FOOD", "SOURCE_DRINK", "SOURCE_MEDICINE", "SOURCE_FABRICATION" ] + "flags": [ "SIDEWALK", "RISK_EXTREME", "SOURCE_FOOD", "SOURCE_DRINK", "SOURCE_MEDICINE", "SOURCE_FABRICATION" ] }, { "type": "overmap_terrain", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_mi-go.json b/data/json/overmap/overmap_terrain/overmap_terrain_mi-go.json index 9a8387a2b8e98..9928252f20b6c 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_mi-go.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_mi-go.json @@ -6,7 +6,7 @@ "sym": "<", "color": "dark_gray", "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -15,7 +15,7 @@ "sym": ">", "color": "light_gray", "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -24,7 +24,7 @@ "sym": ">", "color": "light_gray", "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -33,7 +33,7 @@ "sym": "_", "color": "light_gray", "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -51,7 +51,7 @@ "sym": ">", "color": "light_gray", "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -60,6 +60,6 @@ "sym": "=", "color": "dark_gray", "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json b/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json index bcf731b2a448a..08080069873e7 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json @@ -6,7 +6,7 @@ "sym": "L", "color": "light_blue", "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -30,7 +30,7 @@ "sym": "S", "color": "light_blue", "see_cost": 5, - "flags": [ "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -60,7 +60,7 @@ "sym": "L", "color": "cyan", "see_cost": 5, - "flags": [ "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -80,7 +80,7 @@ "sym": "L", "color": "red", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -97,7 +97,7 @@ "sym": "L", "color": "light_red", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -137,7 +137,7 @@ "sym": "L", "color": "cyan", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -168,7 +168,7 @@ "color": "green", "spawns": { "group": "GROUP_RATKIN_LAB", "population": [ 12, 25 ], "chance": 80 }, "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -195,7 +195,7 @@ "color": "green", "spawns": { "group": "GROUP_RATKIN_LAB", "population": [ 12, 25 ], "chance": 80 }, "see_cost": 5, - "flags": [ "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -205,7 +205,7 @@ "color": "green", "spawns": { "group": "GROUP_RATKIN_LAB", "population": [ 12, 25 ], "chance": 80 }, "see_cost": 5, - "flags": [ "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_military.json b/data/json/overmap/overmap_terrain/overmap_terrain_military.json index f8ad329644785..27c448cdf004d 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_military.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_military.json @@ -7,7 +7,7 @@ "color": "blue", "see_cost": 5, "extras": "build", - "flags": [ "RISK_HIGH", "SOURCE_GUN", "SOURCE_AMMO", "SOURCE_FOOD" ] + "flags": [ "RISK_EXTREME", "SOURCE_GUN", "SOURCE_AMMO", "SOURCE_FOOD" ] }, { "type": "overmap_terrain", @@ -17,7 +17,7 @@ "color": "i_blue", "see_cost": 5, "extras": "build", - "flags": [ "RISK_HIGH", "SOURCE_GUN", "SOURCE_AMMO", "SOURCE_FOOD" ] + "flags": [ "RISK_EXTREME", "SOURCE_GUN", "SOURCE_AMMO", "SOURCE_FOOD" ] }, { "type": "overmap_terrain", @@ -267,7 +267,7 @@ "sym": "B", "color": "red", "see_cost": 2, - "flags": [ "KNOWN_DOWN", "RISK_HIGH", "SOURCE_WEAPON", "SOURCE_AMMO" ] + "flags": [ "KNOWN_DOWN", "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, { "type": "overmap_terrain", @@ -276,7 +276,7 @@ "sym": "B", "color": "red", "see_cost": 2, - "flags": [ "KNOWN_UP", "RISK_HIGH", "SOURCE_WEAPON", "SOURCE_AMMO" ] + "flags": [ "KNOWN_UP", "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, { "type": "overmap_terrain", @@ -285,7 +285,7 @@ "sym": "B", "color": "red", "see_cost": 2, - "flags": [ "RISK_HIGH", "SOURCE_WEAPON", "SOURCE_AMMO" ] + "flags": [ "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, { "type": "overmap_terrain", @@ -295,7 +295,7 @@ "color": "red", "see_cost": 2, "extras": "build", - "flags": [ "RISK_HIGH", "SOURCE_WEAPON", "SOURCE_AMMO" ] + "flags": [ "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, { "type": "overmap_terrain", @@ -305,7 +305,7 @@ "color": "red", "see_cost": 2, "extras": "build", - "flags": [ "RISK_HIGH", "SOURCE_WEAPON", "SOURCE_AMMO" ] + "flags": [ "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, { "type": "overmap_terrain", @@ -323,7 +323,7 @@ "sym": "0", "color": "red", "see_cost": 2, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -380,7 +380,7 @@ "sym": "H", "color": "red", "see_cost": 5, - "flags": [ "SOURCE_FUEL", "SOURCE_GUN", "SOURCE_VEHICLES", "RISK_HIGH" ] + "flags": [ "SOURCE_FUEL", "SOURCE_GUN", "SOURCE_VEHICLES", "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_nether.json b/data/json/overmap/overmap_terrain/overmap_terrain_nether.json index eee8fda216baf..b9f7fcaf093a6 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_nether.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_nether.json @@ -6,7 +6,7 @@ "sym": " ", "color": "black", "see_cost": 10, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -15,6 +15,6 @@ "sym": " ", "color": "black", "see_cost": 10, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_oil_platform.json b/data/json/overmap/overmap_terrain/overmap_terrain_oil_platform.json index 94713b2ebe867..2bb1c28dcecf9 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_oil_platform.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_oil_platform.json @@ -41,7 +41,7 @@ "color": "red", "see_cost": 5, "spawns": { "group": "GROUP_OIL_PLATFORM", "population": [ 15, 20 ], "chance": 100 }, - "flags": [ "RISK_HIGH", "OCEAN" ] + "flags": [ "RISK_HIGH", "OCEAN", "SOURCE_FUEL", "GENERIC_LOOT" ] }, { "type": "overmap_terrain", @@ -59,7 +59,7 @@ "color": "red", "see_cost": 5, "spawns": { "group": "GROUP_OIL_PLATFORM", "population": [ 25, 35 ], "chance": 100 }, - "flags": [ "RISK_HIGH", "OCEAN" ] + "flags": [ "RISK_HIGH", "OCEAN", "SOURCE_FUEL", "GENERIC_LOOT" ] }, { "type": "overmap_terrain", @@ -163,6 +163,6 @@ "sym": "O", "color": "red", "see_cost": 5, - "flags": [ "RISK_HIGH", "OCEAN" ] + "flags": [ "RISK_HIGH", "OCEAN", "SOURCE_FUEL", "GENERIC_LOOT" ] } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_private_resort.json b/data/json/overmap/overmap_terrain/overmap_terrain_private_resort.json index 3ef185f836e3e..3775945130b35 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_private_resort.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_private_resort.json @@ -7,7 +7,7 @@ "color": "yellow", "see_cost": 5, "mondensity": 1, - "flags": [ "RISK_HIGH", "SOURCE_DRINK", "SOURCE_LUXURY" ] + "flags": [ "RISK_EXTREME", "SOURCE_DRINK", "SOURCE_LUXURY" ] }, { "id": [ "p_resort_1nw", "p_resort_pm" ], diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_public_institutional.json b/data/json/overmap/overmap_terrain/overmap_terrain_public_institutional.json index abb27dd070d46..704595b5622a6 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_public_institutional.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_public_institutional.json @@ -217,7 +217,7 @@ "name": "hospital", "sym": "H", "color": "red", - "extend": { "flags": [ "RISK_HIGH", "SOURCE_MEDICINE", "SOURCE_CHEMISTRY" ] } + "extend": { "flags": [ "RISK_EXTREME", "SOURCE_MEDICINE", "SOURCE_CHEMISTRY" ] } }, { "type": "overmap_terrain", @@ -286,7 +286,7 @@ "color": "light_blue", "see_cost": 5, "mondensity": 2, - "flags": [ "SIDEWALK", "RISK_HIGH", "SOURCE_BOOKS" ] + "flags": [ "SIDEWALK", "RISK_EXTREME", "SOURCE_BOOKS" ] }, { "type": "overmap_terrain", @@ -296,7 +296,7 @@ "color": "light_blue", "see_cost": 5, "mondensity": 2, - "flags": [ "SIDEWALK", "RISK_HIGH", "SOURCE_BOOKS" ] + "flags": [ "SIDEWALK", "RISK_EXTREME", "SOURCE_BOOKS" ] }, { "type": "overmap_terrain", @@ -331,7 +331,7 @@ "color": "light_blue", "see_cost": 5, "mondensity": 2, - "flags": [ "SOURCE_BOOKS", "RISK_HIGH" ] + "flags": [ "SOURCE_BOOKS", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -350,7 +350,7 @@ "sym": "p", "color": "i_light_blue", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_triffid.json b/data/json/overmap/overmap_terrain/overmap_terrain_triffid.json index 08e8d49d8e2e6..5ea0f0eeac51e 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_triffid.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_triffid.json @@ -8,7 +8,7 @@ "color": "light_red", "see_cost": 5, "mondensity": 2, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH", "REQUIRES_PREDECESSOR" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME", "REQUIRES_PREDECESSOR" ] }, { "type": "overmap_terrain", @@ -19,7 +19,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -30,7 +30,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -41,7 +41,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -52,7 +52,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -63,7 +63,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -74,7 +74,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -85,7 +85,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -96,7 +96,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -107,7 +107,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -118,7 +118,7 @@ "see_cost": 5, "mondensity": 2, "spawns": { "group": "GROUP_TRIFFID_HEARTGUARDS", "population": [ 50, 60 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -127,7 +127,7 @@ "sym": "T", "color": "light_red", "see_cost": 5, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -136,7 +136,7 @@ "sym": "T", "color": "light_red", "see_cost": 5, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -145,7 +145,7 @@ "sym": "T", "color": "light_red", "see_cost": 5, - "flags": [ "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/mods/Aftershock/maps/overmap_terrain.json b/data/mods/Aftershock/maps/overmap_terrain.json index 0afa296fda6f3..f2d49e6a3894d 100644 --- a/data/mods/Aftershock/maps/overmap_terrain.json +++ b/data/mods/Aftershock/maps/overmap_terrain.json @@ -96,7 +96,7 @@ "color": "pink", "see_cost": 3, "extras": "marloss", - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "id": "afs_crashed_cargo_shuttle", @@ -114,7 +114,7 @@ "sym": "s", "color": "light_green", "see_cost": 2, - "flags": [ "RISK_HIGH", "SOURCE_GUN", "SOURCE_AMMO" ] + "flags": [ "RISK_EXTREME", "SOURCE_GUN", "SOURCE_AMMO" ] }, { "type": "overmap_terrain", diff --git a/data/mods/Defense_Mode/mapgen/megastore.json b/data/mods/Defense_Mode/mapgen/megastore.json index 64cee04521165..99cb64030db0d 100644 --- a/data/mods/Defense_Mode/mapgen/megastore.json +++ b/data/mods/Defense_Mode/mapgen/megastore.json @@ -27,7 +27,7 @@ "see_cost": 5, "flags": [ "SIDEWALK", - "RISK_HIGH", + "RISK_EXTREME", "SOURCE_FOOD", "SOURCE_DRINK", "SOURCE_GUN", diff --git a/data/mods/DinoMod/overmap/overmap_terrain.json b/data/mods/DinoMod/overmap/overmap_terrain.json index 8bd6ccf3c8c7a..112e5313a9970 100644 --- a/data/mods/DinoMod/overmap/overmap_terrain.json +++ b/data/mods/DinoMod/overmap/overmap_terrain.json @@ -25,7 +25,7 @@ "color": "light_blue", "spawns": { "group": "GROUP_DINOLAB", "population": [ 40, 45 ], "chance": 80 }, "see_cost": 5, - "flags": [ "NO_ROTATE", "RISK_HIGH", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] }, { "type": "overmap_terrain", @@ -64,6 +64,6 @@ "sym": ">", "color": "light_gray", "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] } ] diff --git a/data/mods/Isolation-Protocol/Map/overmap.json b/data/mods/Isolation-Protocol/Map/overmap.json index 17cab8c7a2ad4..32a7efc3308ff 100644 --- a/data/mods/Isolation-Protocol/Map/overmap.json +++ b/data/mods/Isolation-Protocol/Map/overmap.json @@ -14,7 +14,7 @@ "sym": "L", "color": "light_red", "see_cost": 5, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/mods/Magiclysm/worldgen/overmap_specials.json b/data/mods/Magiclysm/worldgen/overmap_specials.json index ae280b6e80806..1e014dec03d87 100644 --- a/data/mods/Magiclysm/worldgen/overmap_specials.json +++ b/data/mods/Magiclysm/worldgen/overmap_specials.json @@ -292,7 +292,7 @@ "city_sizes": [ 0, 20 ], "occurrences": [ 0, 2 ], "spawns": { "group": "GROUP_OGRE", "population": [ 1, 10 ], "radius": [ 1, 6 ] }, - "flags": [ "WILDERNESS", "RISK_HIGH" ] + "flags": [ "WILDERNESS", "RISK_EXTREME" ] }, { "type": "overmap_special", diff --git a/data/mods/Magiclysm/worldgen/overmap_terrain.json b/data/mods/Magiclysm/worldgen/overmap_terrain.json index db9c7d6a8bb91..7696cbde348bf 100644 --- a/data/mods/Magiclysm/worldgen/overmap_terrain.json +++ b/data/mods/Magiclysm/worldgen/overmap_terrain.json @@ -115,7 +115,7 @@ "color": "c_light_cyan", "looks_like": "forest_water", "see_cost": 5, - "flags": [ "SOURCE_FORAGE", "RISK_HIGH" ] + "flags": [ "SOURCE_FORAGE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/mods/MindOverMatter/overmap/overmap_terrain.json b/data/mods/MindOverMatter/overmap/overmap_terrain.json index 2ec3faca26d07..0ff9af330672a 100644 --- a/data/mods/MindOverMatter/overmap/overmap_terrain.json +++ b/data/mods/MindOverMatter/overmap/overmap_terrain.json @@ -113,7 +113,7 @@ "extras": "phavian_lab_interior", "see_cost": 5, "mondensity": 2, - "flags": [ "RISK_HIGH" ] + "flags": [ "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_nether.json b/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_nether.json index 142f667ecacca..8c7c6eccfeb5b 100644 --- a/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_nether.json +++ b/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_nether.json @@ -6,6 +6,6 @@ "sym": "O", "color": "light_blue", "see_cost": 3, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] } ] diff --git a/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_termites.json b/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_termites.json index d9d08b0c1240a..125f9960c276e 100644 --- a/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_termites.json +++ b/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_termites.json @@ -6,7 +6,7 @@ "sym": "%", "color": "brown", "see_cost": 2, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_HIGH", "REQUIRES_PREDECESSOR" ] + "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME", "REQUIRES_PREDECESSOR" ] }, { "type": "overmap_terrain", @@ -15,7 +15,7 @@ "sym": "%", "color": "brown", "see_cost": 2, - "flags": [ "KNOWN_DOWN", "RISK_HIGH" ] + "flags": [ "KNOWN_DOWN", "RISK_EXTREME" ] }, { "type": "overmap_terrain", diff --git a/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_triffid.json b/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_triffid.json index ab4f4c6236056..f6a525985bd1d 100644 --- a/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_triffid.json +++ b/data/mods/TropiCataclysm/overmap/overmap_terrain/overmap_terrain_triffid.json @@ -6,7 +6,7 @@ "sym": "T", "color": "magenta", "see_cost": 3, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, { "type": "overmap_terrain", @@ -15,6 +15,6 @@ "sym": "T", "color": "light_red", "see_cost": 3, - "flags": [ "NO_ROTATE", "RISK_HIGH" ] + "flags": [ "NO_ROTATE", "RISK_EXTREME" ] } ] diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index bc6eb0f6ce746..0c6cd9afcb1bb 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -1311,8 +1311,9 @@ See [Character](#character) - ```SOURCE_MEDICINE``` For NPC AI, this location may contain useful medicines for looting. - ```SOURCE_LUXURY``` For NPC AI, this location may contain valuable/feel-good items to sell/keep. - ```SOURCE_PEOPLE``` For NPC AI, this location may have other survivors. -- ```RISK_HIGH``` For NPC AI, this location has a high risk associated with it (e.g. labs, superstores, etc.). -- ```RISK_LOW``` For NPC AI, this location is secluded and remote, and appears to be safe. +- ```RISK_EXTREME``` For NPC AI, this location is extremely risky to even approach. Location should almost always contain active portals, huge hordes of zombies, or other very lethal enemies. Some examples would labs, superstores, and mi-go structures. +- ```RISK_HIGH``` For NPC AI, this location is risky to visit. This is the minimum amount of risk for locations inside of a city. +- ```RISK_LOW``` For NPC AI, this location is specifically a place of safety. Such locations should be fortified, remote, or be controlled by a neutral faction that provides security. This flag should only be applied to specific areas of nearly-guaranteed safety. Wilderness should not receive this flag unless there is some sort of specific shelter (e.g. an uninhabitated cave). - ```GENERIC_LOOT``` This is a place that may contain any of the above, but at a lower frequency, usually a house. diff --git a/src/omdata.h b/src/omdata.h index 5fde4ee375a00..9675a92d3135b 100644 --- a/src/omdata.h +++ b/src/omdata.h @@ -189,6 +189,7 @@ enum class oter_flags : int { ravine, ravine_edge, generic_loot, + risk_extreme, risk_high, risk_low, source_ammo, diff --git a/src/overmap.cpp b/src/overmap.cpp index da860f93a491a..15e728d96740c 100644 --- a/src/overmap.cpp +++ b/src/overmap.cpp @@ -696,6 +696,7 @@ std::string enum_to_string( oter_flags data ) case oter_flags::ravine: return "RAVINE"; case oter_flags::ravine_edge: return "RAVINE_EDGE"; case oter_flags::generic_loot: return "GENERIC_LOOT"; + case oter_flags::risk_extreme: return "RISK_EXTREME"; case oter_flags::risk_high: return "RISK_HIGH"; case oter_flags::risk_low: return "RISK_LOW"; case oter_flags::source_ammo: return "SOURCE_AMMO"; From 4c6b91838c7e7d3363c98fc709e28b508145728a Mon Sep 17 00:00:00 2001 From: PatrikLundell Date: Sat, 25 May 2024 23:18:25 +0200 Subject: [PATCH 6/8] Removed one getlocal (#73940) Co-authored-by: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> --- src/activity_actor.cpp | 2 +- src/activity_handlers.cpp | 4 +- src/activity_item_handling.cpp | 10 ++--- src/advanced_inv_pane.cpp | 2 +- src/auto_pickup.cpp | 2 +- src/avatar.cpp | 2 +- src/basecamp.cpp | 2 +- src/basecamp.h | 17 ++++---- src/character.cpp | 8 ++-- src/character_guns.cpp | 2 +- src/character_inventory.cpp | 6 +-- src/clzones.cpp | 2 +- src/crafting.cpp | 8 ++-- src/creature.cpp | 5 +++ src/creature.h | 3 ++ src/faction_camp.cpp | 4 +- src/game.cpp | 12 +++--- src/iexamine.cpp | 14 ++++--- src/inventory_ui.cpp | 4 +- src/item_location.cpp | 12 +++--- src/iuse.cpp | 6 +-- src/iuse_actor.cpp | 5 ++- src/magic_spell_effect.cpp | 11 ++--- src/map.cpp | 27 ++++++------ src/map.h | 14 +++++-- src/map_selector.cpp | 50 ++++++++++++++++++++--- src/map_selector.h | 10 +++-- src/mapgen.cpp | 4 +- src/npcmove.cpp | 13 +++--- src/npctalk.cpp | 6 +-- src/overmapbuffer.cpp | 2 +- src/ranged.cpp | 4 +- src/rng.h | 9 ++++ src/timed_event.cpp | 2 +- src/veh_interact.cpp | 4 +- src/vehicle.cpp | 9 ++-- src/visitable.cpp | 8 ++-- tests/act_build_test.cpp | 4 +- tests/crafting_test.cpp | 2 +- tests/degradation_test.cpp | 4 +- tests/eoc_test.cpp | 4 +- tests/faction_price_rules_test.cpp | 4 +- tests/harvest_test.cpp | 4 +- tests/invlet_test.cpp | 10 ++--- tests/item_autopickup_test.cpp | 12 +++--- tests/item_contents_test.cpp | 2 +- tests/item_location_test.cpp | 5 ++- tests/item_pickup_test.cpp | 6 +-- tests/item_pocket_test.cpp | 21 +++++----- tests/iuse_actor_test.cpp | 2 +- tests/map_helpers.cpp | 2 +- tests/map_test.cpp | 4 +- tests/npc_shopkeeper_item_groups_test.cpp | 18 ++++---- tests/projectile_test.cpp | 2 +- tests/reloading_test.cpp | 2 +- tests/unseal_and_spill_test.cpp | 14 +++---- tests/visitable_remove_test.cpp | 4 +- tests/wield_times_test.cpp | 2 +- 58 files changed, 257 insertions(+), 176 deletions(-) diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 2869c7d016785..10e41e47fd875 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -6955,7 +6955,7 @@ void longsalvage_activity_actor::finish( player_activity &act, Character &who ) // Check first and only if possible attempt it with player char // This suppresses warnings unless it is an item the player wears if( actor->valid_to_cut_up( nullptr, it ) ) { - item_location item_loc( map_cursor( who.pos() ), &it ); + item_location item_loc( map_cursor( who.pos_bub() ), &it ); actor->try_to_cut_up( who, *salvage_tool, item_loc ); return; } diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index fb00061fc7e31..8a16cbe761c50 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -2118,7 +2118,7 @@ void activity_handlers::vehicle_finish( player_activity *act, Character *you ) { map &here = get_map(); //Grab this now, in case the vehicle gets shifted - const optional_vpart_position vp = here.veh_at( here.getlocal( tripoint( act->values[0], + const optional_vpart_position vp = here.veh_at( here.bub_from_abs( tripoint( act->values[0], act->values[1], you->posz() ) ) ); veh_interact::complete_vehicle( *you ); @@ -3872,7 +3872,7 @@ void activity_handlers::spellcasting_finish( player_activity *act, Character *yo // choose target for spell before continuing const std::optional target = act->coords.empty() ? spell_being_cast.select_target( - you ) : get_map().getlocal( act->coords.front() ); + you ) : get_map().bub_from_abs( act->coords.front() ).raw(); if( target ) { // npcs check for target viability if( !you->is_npc() || spell_being_cast.is_valid_target( *you, *target ) ) { diff --git a/src/activity_item_handling.cpp b/src/activity_item_handling.cpp index c5a25d9d2f325..339cf79c9accf 100644 --- a/src/activity_item_handling.cpp +++ b/src/activity_item_handling.cpp @@ -431,7 +431,7 @@ std::vector drop_on_map( Character &you, item_drop_reason reason, std::vector items_dropped; for( const item &it : items ) { item &dropped_item = here.add_item_or_charges( where, it ); - items_dropped.emplace_back( map_cursor( where.raw() ), &dropped_item ); + items_dropped.emplace_back( map_cursor( where ), &dropped_item ); item( it ).handle_pickup_ownership( you ); } @@ -1856,7 +1856,7 @@ static bool fetch_activity( const int distance = ACTIVITY_SEARCH_DISTANCE ) { map &here = get_map(); - if( !here.can_put_items_ter_furn( here.getlocal( you.backlog.front().coords.back() ) ) ) { + if( !here.can_put_items_ter_furn( here.bub_from_abs( you.backlog.front().coords.back() ) ) ) { return false; } const std::vector> mental_map_2 = @@ -1957,7 +1957,7 @@ static bool butcher_corpse_activity( Character &you, const tripoint_bub_ms &src_ elem.set_var( "activity_var", you.name ); you.assign_activity( ACT_BUTCHER_FULL, 0, true ); // TODO: fix point types - you.activity.targets.emplace_back( map_cursor( src_loc.raw() ), &elem ); + you.activity.targets.emplace_back( map_cursor( src_loc ), &elem ); you.activity.placement = here.getglobal( src_loc ); return true; } @@ -3132,7 +3132,7 @@ static bool generic_multi_activity_do( player_activity act = player_activity( disassemble_activity_actor( r.time_to_craft_moves( you, recipe_time_flag::ignore_proficiencies ) * qty ) ); // TODO: fix point types - act.targets.emplace_back( map_cursor( src_loc.raw() ), &elem ); + act.targets.emplace_back( map_cursor( src_loc ), &elem ); act.placement = here.getglobal( src_loc ); act.position = qty; act.index = false; @@ -3532,7 +3532,7 @@ int get_auto_consume_moves( Character &you, const bool food ) } } else { for( item &it : here.i_at( here.getlocal( loc ) ) ) { - item_location i_loc( map_cursor( here.getlocal( loc ) ), &it ); + item_location i_loc( map_cursor( here.bub_from_abs( loc ) ), &it ); visit_item_contents( i_loc, visit ); } } diff --git a/src/advanced_inv_pane.cpp b/src/advanced_inv_pane.cpp index 1220ae710534e..ded76c351ac05 100644 --- a/src/advanced_inv_pane.cpp +++ b/src/advanced_inv_pane.cpp @@ -252,7 +252,7 @@ void advanced_inventory_pane::add_items_from_area( advanced_inv_area &square, square.i_stacked( square.get_vehicle_stack() ) : square.i_stacked( m.i_at( square.pos ) ); - map_cursor loc_cursor( square.pos ); + map_cursor loc_cursor( tripoint_bub_ms( square.pos ) ); for( size_t x = 0; x < stacks.size(); ++x ) { std::vector locs; locs.reserve( stacks[x].size() ); diff --git a/src/auto_pickup.cpp b/src/auto_pickup.cpp index a88b03de9ed85..8e1d5f0945b30 100644 --- a/src/auto_pickup.cpp +++ b/src/auto_pickup.cpp @@ -249,7 +249,7 @@ drop_locations auto_pickup::select_items( const std::vector &from, const tripoint &location ) { drop_locations result; - const map_cursor map_location = map_cursor( location ); + const map_cursor map_location = map_cursor( tripoint_bub_ms( location ) ); // iterate over all item stacks found in location for( const item_stack::iterator &stack : from ) { diff --git a/src/avatar.cpp b/src/avatar.cpp index 73db67bcb3a78..b0ed97fac3136 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -1254,7 +1254,7 @@ void avatar::rebuild_aim_cache() { double pi = 2 * acos( 0.0 ); - const tripoint local_last_target = get_map().getlocal( last_target_pos.value() ); + const tripoint local_last_target = get_map().bub_from_abs( last_target_pos.value() ).raw(); float base_angle = atan2f( local_last_target.y - posy(), local_last_target.x - posx() ); diff --git a/src/basecamp.cpp b/src/basecamp.cpp index 46f9e55169b58..210a8889f7180 100644 --- a/src/basecamp.cpp +++ b/src/basecamp.cpp @@ -860,7 +860,7 @@ bool basecamp::point_within_camp( const tripoint_abs_omt &p ) const void basecamp::load_data( const std::string &data ) { std::stringstream stream( data ); - stream >> name >> bb_pos.x >> bb_pos.y; + stream >> name >> bb_pos.x() >> bb_pos.y(); // add space to name replace( name.begin(), name.end(), '_', ' ' ); } diff --git a/src/basecamp.h b/src/basecamp.h index 8584101fbc429..debbeb9ae1576 100644 --- a/src/basecamp.h +++ b/src/basecamp.h @@ -167,10 +167,10 @@ class basecamp return !name.empty() && omt_pos != tripoint_abs_omt(); } inline int board_x() const { - return bb_pos.x; + return bb_pos.x(); } inline int board_y() const { - return bb_pos.y; + return bb_pos.y(); } inline tripoint_abs_omt camp_omt_pos() const { return omt_pos; @@ -179,14 +179,17 @@ class basecamp return name; } tripoint get_bb_pos() const { + return bb_pos.raw(); + } + tripoint_abs_ms get_bb_pos_abs() const { return bb_pos; } - void validate_bb_pos( const tripoint &new_abs_pos ) { - if( bb_pos == tripoint_zero ) { + void validate_bb_pos( const tripoint_abs_ms &new_abs_pos ) { + if( bb_pos.raw() == tripoint_zero ) { bb_pos = new_abs_pos; } } - void set_bb_pos( const tripoint &new_abs_pos ) { + void set_bb_pos( const tripoint_abs_ms &new_abs_pos ) { bb_pos = new_abs_pos; } void set_by_radio( bool access_by_radio ); @@ -488,8 +491,8 @@ class basecamp // omt pos tripoint_abs_omt omt_pos; std::vector assigned_npcs; // NOLINT(cata-serialize) - // location of associated bulletin board in abs coords - tripoint bb_pos; + // location of associated bulletin board + tripoint_abs_ms bb_pos; std::map expansions; comp_list camp_workers; // NOLINT(cata-serialize) basecamp_map camp_map; // NOLINT(cata-serialize) diff --git a/src/character.cpp b/src/character.cpp index db996c696e935..c51123d74d729 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -1551,7 +1551,7 @@ bool Character::check_outbounds_activity( const player_activity &act, bool check map &here = get_map(); if( ( act.placement != tripoint_abs_ms() && act.placement != player_activity::invalid_place && !here.inbounds( here.getlocal( act.placement ) ) ) || ( !act.coords.empty() && - !here.inbounds( here.getlocal( act.coords.back() ) ) ) ) { + !here.inbounds( here.bub_from_abs( act.coords.back() ) ) ) ) { if( is_npc() && !check_only ) { // stash activity for when reloaded. stashed_outbounds_activity = act; @@ -3006,7 +3006,7 @@ std::vector Character::nearby( const return VisitResponse::NEXT; } ); - for( const map_cursor &cur : map_selector( pos(), radius ) ) { + for( const map_cursor &cur : map_selector( pos_bub(), radius ) ) { cur.visit_items( [&]( const item * e, const item * parent ) { if( func( e, parent ) ) { res.emplace_back( cur, const_cast( e ) ); @@ -3114,7 +3114,7 @@ units::mass Character::best_nearby_lifting_assist( const tripoint &world_pos ) c } } int lift_quality = std::max( { this->max_quality( qual_LIFT ), mech_lift, - map_selector( this->pos(), PICKUP_RANGE ).max_quality( qual_LIFT ), + map_selector( this->pos_bub(), PICKUP_RANGE ).max_quality( qual_LIFT ), vehicle_selector( world_pos, 4, true, true ).max_quality( qual_LIFT ) } ); return lifting_quality_to_mass( lift_quality ); @@ -11380,7 +11380,7 @@ bool Character::has_destination() const bool Character::has_destination_activity() const { return !get_destination_activity().is_null() && destination_point && - pos() == get_map().getlocal( *destination_point ); + pos_bub() == get_map().bub_from_abs( *destination_point ); } void Character::start_destination_activity() diff --git a/src/character_guns.cpp b/src/character_guns.cpp index 45196dbb8d33b..e8b4c9af9fe4a 100644 --- a/src/character_guns.cpp +++ b/src/character_guns.cpp @@ -115,7 +115,7 @@ std::vector Character::find_ammo( const item &obj, bool empty, in find_ammo_helper( const_cast( *this ), obj, empty, std::back_inserter( res ), true ); if( radius >= 0 ) { - for( map_cursor &cursor : map_selector( pos(), radius ) ) { + for( map_cursor &cursor : map_selector( pos_bub(), radius ) ) { find_ammo_helper( cursor, obj, empty, std::back_inserter( res ), false ); } for( vehicle_cursor &cursor : vehicle_selector( pos(), radius ) ) { diff --git a/src/character_inventory.cpp b/src/character_inventory.cpp index 71b608ee74ea1..7f2c214d0c69a 100644 --- a/src/character_inventory.cpp +++ b/src/character_inventory.cpp @@ -334,7 +334,7 @@ item_location Character::i_add( item it, bool /* should_stack */, const item *av if( added == item_location::nowhere ) { if( !allow_wield || !wield( it ) ) { if( allow_drop ) { - return item_location( map_cursor( pos() ), &get_map().add_item_or_charges( pos(), it ) ); + return item_location( map_cursor( pos_bub() ), &get_map().add_item_or_charges( pos(), it ) ); } else { return added; } @@ -368,7 +368,7 @@ item_location Character::i_add( item it, int &copies_remaining, } if( allow_drop && copies_remaining > 0 ) { item map_added = get_map().add_item_or_charges( pos_bub(), it, copies_remaining ); - added = added ? added : item_location( map_cursor( pos() ), &map_added ); + added = added ? added : item_location( map_cursor( pos_bub() ), &map_added ); } } return added; @@ -394,7 +394,7 @@ ret_val Character::i_add_or_fill( item &it, bool should_stack, co if( new_charge >= 1 ) { if( !allow_wield || !wield( it ) ) { if( allow_drop ) { - loc = item_location( map_cursor( pos() ), &get_map().add_item_or_charges( pos(), it ) ); + loc = item_location( map_cursor( pos_bub() ), &get_map().add_item_or_charges( pos(), it ) ); } } else { loc = item_location( *this, &weapon ); diff --git a/src/clzones.cpp b/src/clzones.cpp index 4a5b0e503119f..278e125a24a27 100644 --- a/src/clzones.cpp +++ b/src/clzones.cpp @@ -1391,7 +1391,7 @@ void zone_manager::add( const std::string &name, const zone_type_id &type, const zone_data new_zone = zone_data( name, type, fac, invert, enabled, start, end, options, personal ); // only non personal zones can be vehicle zones if( !personal ) { - optional_vpart_position const vp = here.veh_at( here.getlocal( start ) ); + optional_vpart_position const vp = here.veh_at( here.bub_from_abs( start ) ); if( vp && vp->vehicle().get_owner() == fac && vp.cargo() ) { // TODO:Allow for loot zones on vehicles to be larger than 1x1 if( start == end && diff --git a/src/crafting.cpp b/src/crafting.cpp index fa7b54c4a05a4..9d8b0395739da 100644 --- a/src/crafting.cpp +++ b/src/crafting.cpp @@ -788,7 +788,7 @@ static item_location set_item_map( const tripoint &loc, item &newit ) // Pass false to disallow overflow, null_item_reference indicates failure. item *it_on_map = &get_map().add_item_or_charges( tile, newit, false ); if( it_on_map != &null_item_reference() ) { - return item_location( map_cursor( tile ), it_on_map ); + return item_location( map_cursor( tripoint_bub_ms( tile ) ), it_on_map ); } } debugmsg( "Could not place %s on map near (%d, %d, %d)", newit.tname(), loc.x, loc.y, loc.z ); @@ -2736,7 +2736,7 @@ void Character::disassemble_all( bool one_pass ) bool found_any = false; std::vector to_disassemble; for( item &it : get_map().i_at( pos() ) ) { - to_disassemble.emplace_back( map_cursor( pos() ), &it ); + to_disassemble.emplace_back( map_cursor( pos_bub() ), &it ); } for( item_location &it_loc : to_disassemble ) { // Prevent disassembling an in process disassembly because it could have been created by a previous iteration of this loop @@ -3143,7 +3143,7 @@ item_location npc::get_item_to_craft() } for( item &itm : here.i_at( adj ) ) { if( itm.get_var( "crafter", "" ) == name ) { - to_craft = item_location( map_cursor( adj ), &itm ); + to_craft = item_location( map_cursor( tripoint_bub_ms( adj ) ), &itm ); if( !is_anyone_crafting( to_craft, this ) ) { return to_craft; } @@ -3185,7 +3185,7 @@ void npc::do_npc_craft( const std::optional &loc, const recipe_id &got } for( item &itm : here.i_at( adj ) ) { if( itm.is_craft() && itm.get_making().npc_can_craft( dummy ) ) { - item_location to_craft = item_location( map_cursor( adj ), &itm ); + item_location to_craft = item_location( map_cursor( tripoint_bub_ms( adj ) ), &itm ); if( !is_anyone_crafting( to_craft, this ) ) { craft_item_list.push_back( to_craft ); } diff --git a/src/creature.cpp b/src/creature.cpp index 552408de0daf9..dd692474f6be6 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -192,6 +192,11 @@ void Creature::setpos( const tripoint &p ) on_move( old_loc ); } +void Creature::setpos( const tripoint_bub_ms &p ) +{ + Creature::setpos( p.raw() ); +} + static units::volume size_to_volume( creature_size size_class ) { // returns midpoint of size from volume_to_size, minus 1_ml diff --git a/src/creature.h b/src/creature.h index 3748417a7db3e..b272f6a7af725 100644 --- a/src/creature.h +++ b/src/creature.h @@ -317,7 +317,10 @@ class Creature : public viewer inline int posz() const { return get_location().z(); } + // TODO: Get rid of untyped overload void setpos( const tripoint &p ); + void setpos( const tripoint_bub_ms &p ); + /** Checks if the creature fits into a given tile. Set the boolean argument to true if the creature would barely fit. */ bool can_move_to_vehicle_tile( const tripoint_abs_ms &loc, bool &cramped ) const; /** Helper overload for when the boolean is discardable */ diff --git a/src/faction_camp.cpp b/src/faction_camp.cpp index f958a1ce23966..53b0819afc1fc 100644 --- a/src/faction_camp.cpp +++ b/src/faction_camp.cpp @@ -2171,7 +2171,7 @@ void basecamp::abandon_camp() const tripoint ms_pos = sm_to_ms_copy( sm_pos ); // We cannot use bb_pos here, because bb_pos may be {0,0,0} if you haven't examined the bulletin board on camp ever. // here.remove_submap_camp( here.getlocal( bb_pos ) ); - here.remove_submap_camp( here.getlocal( ms_pos ) ); + here.remove_submap_camp( here.bub_from_abs( ms_pos ) ); add_msg( m_info, _( "You abandon %s." ), name ); } @@ -5960,7 +5960,7 @@ int basecamp::camp_morale( int change ) const void basecamp::place_results( const item &result ) { map &target_bay = get_camp_map(); - form_storage_zones( target_bay, target_bay.getglobal( target_bay.getlocal( bb_pos ) ) ); + form_storage_zones( target_bay, bb_pos ); tripoint new_spot = target_bay.getlocal( get_dumping_spot() ); // Special handling for liquids // find any storage-zoned LIQUIDCONT we can dump them in, set that as the item's destination instead diff --git a/src/game.cpp b/src/game.cpp index 2b6505973d610..0c53bd851772f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1170,7 +1170,7 @@ vehicle *game::place_vehicle_nearby( vehicle *veh = target_map.add_vehicle( id, tinymap_center, random_entry( angles ), rng( 50, 80 ), 0, false ); if( veh ) { - tripoint abs_local = m.getlocal( target_map.getabs( tinymap_center ) ); + tripoint abs_local = m.bub_from_abs( target_map.getabs( tinymap_center ) ).raw(); veh->sm_pos = ms_to_sm_remain( abs_local ); veh->pos = abs_local.xy(); @@ -9953,7 +9953,7 @@ void game::butcher() case MULTIBUTCHER: butcher_submenu( corpses ); for( map_stack::iterator &it : corpses ) { - u.activity.targets.emplace_back( map_cursor( u.pos() ), &*it ); + u.activity.targets.emplace_back( map_cursor( u.pos_bub() ), &*it ); } break; case MULTIDISASSEMBLE_ONE: @@ -9969,13 +9969,13 @@ void game::butcher() break; case BUTCHER_CORPSE: { butcher_submenu( corpses, indexer_index ); - u.activity.targets.emplace_back( map_cursor( u.pos() ), &*corpses[indexer_index] ); + u.activity.targets.emplace_back( map_cursor( u.pos_bub() ), &*corpses[indexer_index] ); } break; case BUTCHER_DISASSEMBLE: { // Pick index of first item in the disassembly stack item *const target = &*disassembly_stacks[indexer_index].first; - u.disassemble( item_location( map_cursor( u.pos() ), target ), true ); + u.disassemble( item_location( map_cursor( u.pos_bub() ), target ), true ); } break; case BUTCHER_SALVAGE: { @@ -9984,7 +9984,7 @@ void game::butcher() } else { // Pick index of first item in the salvage stack item *const target = &*salvage_stacks[indexer_index].first; - item_location item_loc( map_cursor( u.pos() ), target ); + item_location item_loc( map_cursor( u.pos_bub() ), target ); salvage_iuse->try_to_cut_up( u, *salvage_tool, item_loc ); } } @@ -11179,7 +11179,7 @@ point game::place_player( const tripoint &dest_loc, bool quick ) if( !corpses.empty() ) { u.assign_activity( ACT_BUTCHER, 0, true ); for( item *it : corpses ) { - u.activity.targets.emplace_back( map_cursor( u.pos() ), it ); + u.activity.targets.emplace_back( map_cursor( u.pos_bub() ), it ); } } } else if( pulp_butcher == "pulp" || pulp_butcher == "pulp_adjacent" || diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 02f7991a0118c..2c3ade98ba6d1 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -1978,7 +1978,7 @@ void iexamine::bulletin_board( Character &you, const tripoint &examp ) std::optional bcp = overmap_buffer.find_camp( omt ); if( bcp ) { basecamp *temp_camp = *bcp; - temp_camp->validate_bb_pos( here.getabs( examp ) ); + temp_camp->validate_bb_pos( here.getglobal( examp ) ); temp_camp->validate_assignees(); temp_camp->validate_sort_points(); temp_camp->scan_pseudo_items(); @@ -4063,10 +4063,12 @@ void iexamine::keg( Character &you, const tripoint &examp ) const std::string keg_name = here.name( examp ); const units::volume keg_cap = get_keg_capacity( examp ); - const bool has_container_with_liquid = map_cursor( examp ).has_item_with( []( const item & it ) { + const bool has_container_with_liquid = map_cursor( tripoint_bub_ms( examp ) ).has_item_with( []( + const item & it ) { return !it.is_container_empty() && it.can_unload(); } ); - const bool liquid_present = map_cursor( examp ).has_item_with( []( const item & it ) { + const bool liquid_present = map_cursor( tripoint_bub_ms( examp ) ).has_item_with( []( + const item & it ) { return it.made_of_from_type( phase_id::LIQUID ); } ); @@ -4771,7 +4773,7 @@ static void reload_furniture( Character &you, const tripoint &examp, bool allow_ for( map_stack::iterator itm = items.begin(); itm != items.end(); ) { if( itm->typeId() == ammo_itypeID ) { if( you.can_stash( *itm ) ) { - std::vector target_items{ item_location( map_cursor( examp ), &*itm ) }; + std::vector target_items{ item_location( map_cursor( tripoint_bub_ms( examp ) ), &*itm ) }; you.assign_activity( pickup_activity_actor( target_items, { 0 }, you.pos_bub(), false ) ); return; } else { @@ -4801,7 +4803,7 @@ static void reload_furniture( Character &you, const tripoint &examp, bool allow_ item pseudo( pseudo_type ); // maybe at some point we need a pseudo item_location or something // but for now this should at least work as intended - item_location pseudo_loc( map_cursor( examp ), &pseudo ); + item_location pseudo_loc( map_cursor( tripoint_bub_ms( examp ) ), &pseudo ); // used to only allow one type of ammo, changed with move to inventory_selector // todo: use furniture name instead of pseudo item name @@ -7199,7 +7201,7 @@ void iexamine::workbench_internal( Character &you, const tripoint &examp, for( item &it : items_at_furn ) { if( it.is_craft() ) { - crafts.emplace_back( map_cursor( examp ), &it ); + crafts.emplace_back( map_cursor( tripoint_bub_ms( examp ) ), &it ); } } } diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 9c9448aee6c34..750c44405da0b 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -2103,7 +2103,7 @@ void inventory_selector::add_map_items( const tripoint &target ) const std::string name = to_upper_case( here.name( target ) ); const item_category map_cat( name, no_translation( name ), translation(), 100 ); _add_map_items( target, map_cat, items, [target]( item & it ) { - return item_location( map_cursor( target ), &it ); + return item_location( map_cursor( tripoint_bub_ms( target ) ), &it ); } ); } } @@ -2167,7 +2167,7 @@ void inventory_selector::add_remote_map_items( tinymap *remote_map, const tripoi const std::string name = to_upper_case( remote_map->name( target ) ); const item_category map_cat( name, no_translation( name ), translation(), 100 ); _add_map_items( target, map_cat, items, [target]( item & it ) { - return item_location( map_cursor( target ), &it ); + return item_location( map_cursor( tripoint_bub_ms( target ) ), &it ); } ); } diff --git a/src/item_location.cpp b/src/item_location.cpp index 1c8cc36387e6d..ecca91eeaa147 100644 --- a/src/item_location.cpp +++ b/src/item_location.cpp @@ -220,7 +220,7 @@ class item_location::impl::item_on_map : public item_location::impl } tripoint position() const override { - return cur.pos(); + return cur.pos().raw(); } Character *carrier() const override { @@ -230,7 +230,7 @@ class item_location::impl::item_on_map : public item_location::impl std::string describe( const Character *ch ) const override { std::string res = get_map().name( cur.pos() ); if( ch ) { - res += std::string( " " ) += direction_suffix( ch->pos(), cur.pos() ); + res += std::string( " " ) += direction_suffix( ch->pos(), cur.pos().raw() ); } return res; } @@ -263,7 +263,7 @@ class item_location::impl::item_on_map : public item_location::impl item *obj = target(); int mv = ch.item_handling_cost( *obj, true, MAP_HANDLING_PENALTY, qty ); - mv += 100 * rl_dist( ch.pos(), cur.pos() ); + mv += 100 * rl_dist( ch.pos(), cur.pos().raw() ); // TODO: handle unpacking costs @@ -829,7 +829,7 @@ void item_location::deserialize( const JsonObject &obj ) ptr.reset( new impl::item_on_person( who_id, idx ) ); } else if( type == "map" ) { - ptr.reset( new impl::item_on_map( map_cursor( pos ), idx ) ); + ptr.reset( new impl::item_on_map( map_cursor( tripoint_bub_ms( pos ) ), idx ) ); } else if( type == "vehicle" ) { vehicle *const veh = veh_pointer_or_null( get_map().veh_at( pos ) ); @@ -842,7 +842,7 @@ void item_location::deserialize( const JsonObject &obj ) obj.read( "parent", parent ); if( !parent.ptr->valid() ) { debugmsg( "parent location does not point to valid item" ); - ptr.reset( new impl::item_on_map( map_cursor( pos ), idx ) ); // drop on ground + ptr.reset( new impl::item_on_map( map_cursor( tripoint_bub_ms( pos ) ), idx ) ); // drop on ground return; } const std::list parent_contents = parent->all_items_top(); @@ -1170,4 +1170,4 @@ bool item_location::can_reload_with( const item_location &ammo, bool now ) const } } return reloadable->can_reload_with( *ammo, now ); -} \ No newline at end of file +} diff --git a/src/iuse.cpp b/src/iuse.cpp index 9bf93e7c4ba4a..9deee32019ad1 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -2249,7 +2249,7 @@ class exosuit_interact for( const tripoint &p : here.points_in_radius( c.pos(), PICKUP_RANGE ) ) { for( item &i : here.i_at( p ) ) { if( filter( i ) ) { - candidates.emplace_back( map_cursor( p ), &i ); + candidates.emplace_back( map_cursor( tripoint_bub_ms( p ) ), &i ); } } } @@ -7065,7 +7065,7 @@ static void sendRadioSignal( Character &p, const flag_id &signal ) std::map use_methods = it.type->use_methods; if( use_methods.find( "transform" ) != use_methods.end() ) { it.type->get_use( "transform" )->call( &p, it, loc ); - item_location itm_loc = item_location( map_cursor( loc ), &it ); + item_location itm_loc = item_location( map_cursor( tripoint_bub_ms( loc ) ), &it ); here.update_lum( itm_loc, true ); } else { it.type->get_use( it.type->use_methods.begin()->first )->call( &p, it, loc ); @@ -7081,7 +7081,7 @@ static void sendRadioSignal( Character &p, const flag_id &signal ) // Invoke to transform a radio-modded explosive into its active form if( itm->has_flag( flag_RADIO_INVOKE_PROC ) ) { itm->type->invoke( &p, *itm, loc ); - item_location itm_loc = item_location( map_cursor( loc ), itm ); + item_location itm_loc = item_location( map_cursor( tripoint_bub_ms( loc ) ), itm ); here.update_lum( itm_loc, true ); } } diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index 6d3004ecd5ffd..72cea25d313fd 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -2527,7 +2527,8 @@ static item_location form_loc( Character &you, const tripoint &p, item &it ) if( you.has_item( it ) ) { return form_loc_recursive( you, it ); } - map_cursor mc( p ); + const tripoint_bub_ms bub = tripoint_bub_ms( p ); + map_cursor mc( bub ); if( mc.has_item( it ) ) { return form_loc_recursive( mc, it ); } @@ -2738,7 +2739,7 @@ static item_location get_item_location( Character &p, item &it, const tripoint & } // Item on the map - return item_location( map_cursor( pos ), &it ); + return item_location( map_cursor( tripoint_bub_ms( pos ) ), &it ); } std::optional repair_item_actor::use( Character *p, item &it, diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 32a1c01ad6181..b019f00423e04 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -1674,7 +1674,7 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint &targ } avatar *caster_you = caster.as_avatar(); auto walk_point = trajectory.begin(); - if( here.getlocal( *walk_point ) == source ) { + if( here.bub_from_abs( *walk_point ).raw() == source ) { ++walk_point; } // save the amount of moves the caster has so we can restore them after the dash @@ -1682,14 +1682,14 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint &targ creature_tracker &creatures = get_creature_tracker(); while( walk_point != trajectory.end() ) { if( caster_you != nullptr ) { - if( creatures.creature_at( here.getlocal( *walk_point ) ) || - !g->walk_move( here.getlocal( *walk_point ), false ) ) { + if( creatures.creature_at( here.bub_from_abs( *walk_point ) ) || + !g->walk_move( here.bub_from_abs( *walk_point ), false ) ) { if( walk_point != trajectory.begin() ) { --walk_point; } break; } else if( walk_point != trajectory.begin() ) { - sp.create_field( here.getlocal( *( walk_point - 1 ) ), caster ); + sp.create_field( here.bub_from_abs( *( walk_point - 1 ) ).raw(), caster ); g->draw_ter(); } } @@ -1702,7 +1702,8 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint &targ caster.set_moves( cur_moves ); tripoint far_target; - calc_ray_end( coord_to_angle( source, target ), sp.aoe( caster ), here.getlocal( *walk_point ), + calc_ray_end( coord_to_angle( source, target ), sp.aoe( caster ), + here.bub_from_abs( *walk_point ).raw(), far_target ); spell_effect::override_parameters params( sp, caster ); diff --git a/src/map.cpp b/src/map.cpp index c085aba18a10f..0e23500e40c6e 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -5220,7 +5220,7 @@ item_location map::add_item_ret_loc( const tripoint &pos, item obj, bool overflo int copies = 1; std::pair ret = _add_item_or_charges( pos, std::move( obj ), copies, overflow ); if( ret.first != nullptr && !ret.first->is_null() ) { - return item_location { map_cursor{ ret.second }, ret.first }; + return item_location { map_cursor{ tripoint_bub_ms( ret.second ) }, ret.first }; } return {}; @@ -6038,7 +6038,7 @@ std::list map::items_with( const tripoint &p, } for( item &it : i_at( p ) ) { if( filter( it ) ) { - ret.emplace_back( map_cursor( p ), &it ); + ret.emplace_back( map_cursor( tripoint_bub_ms( p ) ), &it ); } } return ret; @@ -6862,6 +6862,11 @@ void map::remove_submap_camp( const tripoint &p ) current_submap->camp.reset(); } +void map::remove_submap_camp( const tripoint_bub_ms &p ) +{ + map::remove_submap_camp( p.raw() ); +} + basecamp map::hoist_submap_camp( const tripoint &p ) { submap *const current_submap = get_submap_at( p ); @@ -9760,16 +9765,9 @@ tripoint_abs_ms map::getglobal( const tripoint_bub_ms &p ) const return project_to( abs_sub.xy() ) + p.raw(); } -tripoint map::getlocal( const tripoint &p ) const -{ - // TODO: fix point types - return p - sm_to_ms_copy( abs_sub.xy().raw() ); -} - tripoint map::getlocal( const tripoint_abs_ms &p ) const { - // TODO: fix point types - return getlocal( p.raw() ); + return ( p - sm_to_ms_copy( abs_sub.xy().raw() ) ).raw(); } tripoint_bub_ms map::bub_from_abs( const tripoint &p ) const @@ -9835,6 +9833,11 @@ submap *map::get_submap_at( const tripoint &p ) return unsafe_get_submap_at( p ); } +submap *map::get_submap_at( const tripoint_bub_ms &p ) +{ + return map::get_submap_at( p.raw() ); +} + const submap *map::get_submap_at( const tripoint &p ) const { if( !inbounds( p ) ) { @@ -10334,7 +10337,7 @@ std::list map::get_active_items_in_radius( const tripoint ¢er } if( elem.item_ref ) { - result.emplace_back( map_cursor( pos ), elem.item_ref.get() ); + result.emplace_back( map_cursor( tripoint_bub_ms( pos ) ), elem.item_ref.get() ); } } } @@ -10685,7 +10688,7 @@ std::vector map::get_haulable_items( const tripoint &pos ) target_items.reserve( items.size() ); for( item &it : items ) { if( is_haulable( it ) ) { - target_items.emplace_back( map_cursor( pos ), &it ); + target_items.emplace_back( map_cursor( tripoint_bub_ms( pos ) ), &it ); } } return target_items; diff --git a/src/map.h b/src/map.h index cd83b2b627bfe..56b6b7c2bb0fe 100644 --- a/src/map.h +++ b/src/map.h @@ -1800,6 +1800,7 @@ class map // Camps void add_camp( const tripoint_abs_omt &omt_pos, const std::string &name ); void remove_submap_camp( const tripoint & ); + void remove_submap_camp( const tripoint_bub_ms & ); basecamp hoist_submap_camp( const tripoint &p ); bool point_within_camp( const tripoint &point_check ) const; // Graffiti @@ -1966,10 +1967,9 @@ class map * Inverse of @ref getabs */ // TODO: Get rid of these and use bub_from_abs instead - tripoint getlocal( const tripoint &p ) const; tripoint getlocal( const tripoint_abs_ms &p ) const; point getlocal( const point &p ) const { - return getlocal( tripoint( p, abs_sub.z() ) ).xy(); + return getlocal( tripoint_abs_ms( point_abs_ms( p ), abs_sub.z() ) ).xy(); } // TODO: fix point types (remove the first overload) tripoint_bub_ms bub_from_abs( const tripoint &p ) const; @@ -2182,7 +2182,9 @@ class map inline const submap *unsafe_get_submap_at( const tripoint_bub_ms &p ) const { return unsafe_get_submap_at( p.raw() ); } + // TODO: Get rid of untyped overload submap *get_submap_at( const tripoint &p ); + submap *get_submap_at( const tripoint_bub_ms &p ); const submap *get_submap_at( const tripoint &p ) const; submap *get_submap_at( const point &p ) { return get_submap_at( tripoint( p, abs_sub.z() ) ); @@ -2219,11 +2221,17 @@ class map offset_p = point_sm_ms( l ); return unsafe_get_submap_at( p ); } + // TODO: Get rid of untyped overload submap *get_submap_at( const tripoint &p, point &offset_p ) { offset_p.x = p.x % SEEX; offset_p.y = p.y % SEEY; return get_submap_at( p ); } + submap *get_submap_at( const tripoint_bub_ms &p, point_sm_ms &offset_p ) { + offset_p.x() = p.x() % SEEX; + offset_p.y() = p.y() % SEEY; + return get_submap_at( p ); + } const submap *get_submap_at( const tripoint &p, point &offset_p ) const { offset_p.x = p.x % SEEX; offset_p.y = p.y % SEEY; @@ -2758,7 +2766,7 @@ class tinymap : private map map::collapse_at( tripoint_bub_ms( p ), silent, was_supporting, destroy_pos ); } tripoint getlocal( const tripoint &p ) const { - return map::getlocal( p ); // TODO: Make it typed + return map::getlocal( tripoint_abs_ms( p ) ); // TODO: Make it typed } tripoint_abs_sm get_abs_sub() const { return map::get_abs_sub(); // TODO: Convert to tripoint_abs_omt diff --git a/src/map_selector.cpp b/src/map_selector.cpp index 532291ba9692a..7aca740188f4f 100644 --- a/src/map_selector.cpp +++ b/src/map_selector.cpp @@ -14,9 +14,9 @@ class game; // NOLINTNEXTLINE(cata-static-declarations) extern std::unique_ptr g; -map_selector::map_selector( const tripoint &pos, int radius, bool accessible ) +map_selector::map_selector( const tripoint_bub_ms &pos, int radius, bool accessible ) { - for( const tripoint &e : closest_points_first( pos, radius ) ) { + for( const tripoint_bub_ms &e : closest_points_first( pos, radius ) ) { if( !accessible || get_map().clear_path( pos, e, radius, 1, 100 ) ) { data.emplace_back( e ); } @@ -30,12 +30,25 @@ tripoint_range points_in_range( const map &m ) tripoint( SEEX * m.getmapsize() - 1, SEEY * m.getmapsize() - 1, OVERMAP_HEIGHT ) ); } +tripoint_range points_in_range_bub( const map &m ) +{ + return tripoint_range( + tripoint_bub_ms( 0, 0, -OVERMAP_DEPTH ), + tripoint_bub_ms( SEEX * m.getmapsize() - 1, SEEY * m.getmapsize() - 1, OVERMAP_HEIGHT ) ); +} + std::optional random_point( const map &m, const std::function &predicate ) { return random_point( points_in_range( m ), predicate ); } +std::optional random_point( const map &m, + const std::function &predicate ) +{ + return random_point( points_in_range_bub( m ), predicate ); +} + std::optional random_point( const tripoint_range &range, const std::function &predicate ) { @@ -61,9 +74,36 @@ std::optional random_point( const tripoint_range &range, return random_entry( suitable ); } -map_cursor::map_cursor( const tripoint &pos ) : pos_( g ? get_map().getabs( pos ) : pos ) { } +std::optional random_point( const tripoint_range &range, + const std::function &predicate ) +{ + // Optimist approach: just assume there are plenty of suitable places and a randomly + // chosen point will have a good chance to hit one of them. + // If there are only few suitable places, we have to find them all, otherwise this loop may never finish. + for( int tries = 0; tries < 10; ++tries ) { + const tripoint_bub_ms p( rng( range.min().x(), range.max().x() ), rng( range.min().y(), + range.max().y() ), + rng( range.min().z(), range.max().z() ) ); + if( predicate( p ) ) { + return p; + } + } + std::vector suitable; + for( const tripoint_bub_ms &p : range ) { + if( predicate( p ) ) { + suitable.push_back( p ); + } + } + if( suitable.empty() ) { + return {}; + } + return random_entry( suitable ); +} + +map_cursor::map_cursor( const tripoint_bub_ms &pos ) : pos_abs_( g ? get_map().getglobal( + pos ) : tripoint_abs_ms( tripoint_zero ) ), pos_bub_( g ? tripoint_bub_ms( tripoint_zero ) : pos ) { } -tripoint map_cursor::pos() const +tripoint_bub_ms map_cursor::pos() const { - return g ? get_map().getlocal( pos_ ) : pos_; + return g ? get_map().bub_from_abs( pos_abs_ ) : pos_bub_; } diff --git a/src/map_selector.h b/src/map_selector.h index ca11d4eaeb085..333ff5e935fee 100644 --- a/src/map_selector.h +++ b/src/map_selector.h @@ -7,6 +7,7 @@ #include #include +#include "coordinates.h" #include "point.h" #include "visitable.h" @@ -15,11 +16,12 @@ class item; class map_cursor : public visitable { private: - tripoint pos_; + tripoint_abs_ms pos_abs_; + tripoint_bub_ms pos_bub_; public: - explicit map_cursor( const tripoint &pos ); - tripoint pos() const; + explicit map_cursor( const tripoint_bub_ms &pos ); + tripoint_bub_ms pos() const; // inherited from visitable VisitResponse visit_items( const std::function &func ) const @@ -44,7 +46,7 @@ class map_selector : public visitable * @param radius number of adjacent tiles to include (searching from pos outwards) * @param accessible whether found items must be accessible from pos to be considered */ - explicit map_selector( const tripoint &pos, int radius = 0, bool accessible = true ); + explicit map_selector( const tripoint_bub_ms &pos, int radius = 0, bool accessible = true ); // similar to item_location you are not supposed to store this class between turns map_selector( const map_selector &that ) = delete; diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 857cfaeb5eeab..d32c7fb2b2b01 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -7003,12 +7003,12 @@ void map::rotate( int turns, const bool setpos_safe ) const point new_pos = old.rotate( turns, { SEEX * 2, SEEY * 2 } ); if( setpos_safe ) { - const point local_sq = getlocal( sq ).xy(); + const point local_sq = bub_from_abs( sq ).xy().raw(); // setpos can't be used during mapgen, but spawn_at_precise clips position // to be between 0-11,0-11 and teleports NPCs when used inside of update_mapgen // calls const tripoint new_global_sq = sq - local_sq + new_pos; - np.setpos( get_map().getlocal( new_global_sq ) ); + np.setpos( get_map().bub_from_abs( new_global_sq ) ); } else { // OK, this is ugly: we remove the NPC from the whole map // Then we place it back from scratch diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 4c2a0632c5a83..680270e61334c 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -1224,9 +1224,9 @@ void npc::regen_ai_cache() } } while( i != std::end( ai_cache.sound_alerts ) ) { - if( sees( here.getlocal( i->abs_pos ) ) ) { + if( sees( here.bub_from_abs( i->abs_pos ) ) ) { // if they were responding to a call for guards because of thievery - npc *const sound_source = creatures.creature_at( here.getlocal( i->abs_pos ) ); + npc *const sound_source = creatures.creature_at( here.bub_from_abs( i->abs_pos ) ); if( sound_source ) { if( my_fac == sound_source->my_fac && sound_source->known_stolen_item ) { sound_source->known_stolen_item = nullptr; @@ -1602,7 +1602,7 @@ void npc::execute_action( npc_action action ) case npc_investigate_sound: { tripoint cur_pos = pos(); - update_path( here.getlocal( ai_cache.s_abs_pos ) ); + update_path( here.bub_from_abs( ai_cache.s_abs_pos ) ); move_to_next(); if( pos() == cur_pos ) { ai_cache.stuck += 1; @@ -3364,7 +3364,8 @@ void npc::worker_downtime() } basecamp *temp_camp = *bcp; std::vector pts; - for( const tripoint &elem : here.points_in_radius( here.getlocal( temp_camp->get_bb_pos() ), + for( const tripoint &elem : here.points_in_radius( here.bub_from_abs( + temp_camp->get_bb_pos() ).raw(), 10 ) ) { if( creatures.creature_at( elem ) || !could_move_onto( elem ) || here.has_flag( ter_furn_flag::TFLAG_DEEP_WATER, elem ) || @@ -3599,7 +3600,7 @@ void npc::find_item() can_see = true; for( item &it : m_stack ) { if( consider_item( it, p ) ) { - wanted_item = item_location{ map_cursor{p}, &it }; + wanted_item = item_location{ map_cursor{tripoint_bub_ms( p )}, &it }; } } } @@ -5002,7 +5003,7 @@ void npc::go_to_omt_destination() } // TODO: fix point types tripoint sm_tri = - here.getlocal( project_to( omt_path.back() ).raw() ); + here.bub_from_abs( project_to( omt_path.back() ) ).raw(); tripoint centre_sub = sm_tri + point( SEEX, SEEY ); if( !here.passable( centre_sub ) ) { auto candidates = here.points_in_radius( centre_sub, 2 ); diff --git a/src/npctalk.cpp b/src/npctalk.cpp index 1c14bae1a9383..d67162a86bdfa 100644 --- a/src/npctalk.cpp +++ b/src/npctalk.cpp @@ -3621,7 +3621,7 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v tripoint_range points = here.points_in_radius( here.getlocal( abs_ms ), size_t( dov_target_max_radius.evaluate( d ) ), size_t( 0 ) ); for( const tripoint &search_loc : points ) { - if( rl_dist( here.getlocal( talker_pos ), search_loc ) <= min_target_dist ) { + if( rl_dist( here.bub_from_abs( talker_pos ).raw(), search_loc ) <= min_target_dist ) { continue; } if( search_type.value() == "terrain" ) { @@ -3692,7 +3692,7 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v target_pos = talker_pos + tripoint( rng( -max_radius, max_radius ), rng( -max_radius, max_radius ), 0 ); if( ( !outdoor_only || here.is_outside( target_pos ) ) && - ( !passable_only || here.passable( here.getlocal( target_pos ) ) ) && + ( !passable_only || here.passable( here.bub_from_abs( target_pos ) ) ) && rl_dist( target_pos, talker_pos ) >= min_radius ) { found = true; break; @@ -5440,7 +5440,7 @@ talk_effect_fun_t::func f_map_run_item_eocs( const JsonObject &jo, std::string_v for( const tripoint &pos : here.points_in_radius( center, max_radius ) ) { if( rl_dist( center, pos ) >= min_radius && here.inbounds( pos ) ) { for( item &it : here.i_at( pos ) ) { - items.emplace_back( map_cursor( pos ), &it ); + items.emplace_back( map_cursor( tripoint_bub_ms( pos ) ), &it ); } } } diff --git a/src/overmapbuffer.cpp b/src/overmapbuffer.cpp index 61472fcb617ac..f482f2f9f7431 100644 --- a/src/overmapbuffer.cpp +++ b/src/overmapbuffer.cpp @@ -1572,7 +1572,7 @@ void overmapbuffer::spawn_monster( const tripoint_abs_sm &p, bool spawn_nonlocal [&]( std::pair &monster_entry ) { monster &this_monster = monster_entry.second; const map &here = get_map(); - const tripoint local = here.getlocal( this_monster.get_location().raw() ); + const tripoint local = here.bub_from_abs( this_monster.get_location() ).raw(); // The monster position must be local to the main map when added to the game if( !spawn_nonlocal ) { cata_assert( here.inbounds( local ) ); diff --git a/src/ranged.cpp b/src/ranged.cpp index 066a3afba5c73..0e57b5c3740c3 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -3105,7 +3105,7 @@ bool target_ui::try_reacquire_target( bool critter, tripoint &new_dst ) } // Try to re-acquire target tile or tile where the target creature used to be - tripoint local_lt = get_map().getlocal( *you->last_target_pos ); + tripoint local_lt = get_map().bub_from_abs( *you->last_target_pos ).raw(); if( dist_fn( local_lt ) <= range ) { new_dst = local_lt; // Abort aiming if a creature moved in @@ -3321,7 +3321,7 @@ void target_ui::recalc_aim_turning_penalty() if( lt_ptr ) { curr_recoil_pos = lt_ptr->pos(); } else if( you->last_target_pos ) { - curr_recoil_pos = get_map().getlocal( *you->last_target_pos ); + curr_recoil_pos = get_map().bub_from_abs( *you->last_target_pos ).raw(); } else { curr_recoil_pos = src; } diff --git a/src/rng.h b/src/rng.h index 8ede68576817f..f95230620829d 100644 --- a/src/rng.h +++ b/src/rng.h @@ -10,6 +10,7 @@ #include #include +#include "coordinates.h" #include "units_fwd.h" class map; @@ -193,12 +194,20 @@ inline V random_entry_removed( C &container ) } /// Returns a range enclosing all valid points of the map. +// TODO: Remove untyped overload tripoint_range points_in_range( const map &m ); +tripoint_range points_in_range_bub( const map &m ); /// Returns a random point in the given range that satisfies the given predicate ( if any ). +// TODO: Remove untyped overload std::optional random_point( const tripoint_range &range, const std::function &predicate ); +std::optional random_point( const tripoint_range &range, + const std::function &predicate ); /// Same as other random_point with a range enclosing all valid points of the map. +// TODO: Remove untyped overload std::optional random_point( const map &m, const std::function &predicate ); +std::optional random_point( const map &m, + const std::function &predicate ); #endif // CATA_SRC_RNG_H diff --git a/src/timed_event.cpp b/src/timed_event.cpp index 1b3ae9c68a842..fa01b8ffb06f0 100644 --- a/src/timed_event.cpp +++ b/src/timed_event.cpp @@ -280,7 +280,7 @@ void timed_event::actualize() case timed_event_type::DSA_ALRP_SUMMON: { const tripoint_abs_sm u_pos = player_character.global_sm_location(); if( rl_dist( u_pos, map_point ) <= 4 ) { - const tripoint spot = here.getlocal( project_to( map_point ).raw() ); + const tripoint spot = here.bub_from_abs( project_to( map_point ) ).raw(); monster dispatcher( mon_dsa_alien_dispatch ); fake_spell summoning( spell_dks_summon_alrp, true, 12 ); summoning.get_spell( player_character ).cast_all_effects( dispatcher, spot ); diff --git a/src/veh_interact.cpp b/src/veh_interact.cpp index e1e71fe67aaec..f2725f94f9e17 100644 --- a/src/veh_interact.cpp +++ b/src/veh_interact.cpp @@ -612,7 +612,7 @@ void veh_interact::cache_tool_availability() mech_jack = player_character.mounted_creature->mech_str_addition() + 10; } int max_quality = std::max( { player_character.max_quality( qual_JACK ), mech_jack, - map_selector( player_character.pos(), PICKUP_RANGE ).max_quality( qual_JACK ), + map_selector( player_character.pos_bub(), PICKUP_RANGE ).max_quality( qual_JACK ), vehicle_selector( player_character.pos(), 2, true, *veh ).max_quality( qual_JACK ) } ); max_jack = lifting_quality_to_mass( max_quality ); @@ -3075,7 +3075,7 @@ void veh_interact::complete_vehicle( Character &you ) // during this player/NPCs activity. // check the vehicle points that were stored at beginning of activity. for( const tripoint &pt : you.activity.coord_set ) { - ovp = here.veh_at( here.getlocal( pt ) ); + ovp = here.veh_at( here.bub_from_abs( pt ) ); if( ovp ) { break; } diff --git a/src/vehicle.cpp b/src/vehicle.cpp index a12fa24680ccf..e357958eb0751 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -632,7 +632,7 @@ void vehicle::autopilot_patrol() autodrive_local_target = tripoint_zero; return; } - if( !here.inbounds( here.getlocal( autodrive_local_target ) ) ) { + if( !here.inbounds( here.bub_from_abs( autodrive_local_target ) ) ) { autodrive_local_target = tripoint_zero; is_patrolling = false; return; @@ -6734,15 +6734,16 @@ void vehicle::do_towing_move() towed_veh->selfdrive( point( turn_x, accel_y ) ); } else { towed_veh->skidding = true; - std::vector lineto = line_to( here.getlocal( towed_tow_point ), - here.getlocal( tower_tow_point ) ); + std::vector lineto = line_to( here.bub_from_abs( towed_tow_point ).raw(), + here.bub_from_abs( tower_tow_point ).raw() ); tripoint nearby_destination; if( lineto.size() >= 2 ) { nearby_destination = lineto[1]; } else { nearby_destination = tower_tow_point; } - const tripoint destination_delta( here.getlocal( tower_tow_point ).xy() - nearby_destination.xy() + + const tripoint destination_delta( here.bub_from_abs( tower_tow_point ).raw().xy() - + nearby_destination.xy() + tripoint( 0, 0, towed_veh->global_pos3().z ) ); const tripoint move_destination( clamp( destination_delta.x, -1, 1 ), clamp( destination_delta.y, -1, 1 ), diff --git a/src/visitable.cpp b/src/visitable.cpp index 6c2023ceb4cf4..9a1c9df878b2c 100644 --- a/src/visitable.cpp +++ b/src/visitable.cpp @@ -472,7 +472,7 @@ VisitResponse map_cursor::visit_items( const std::function &func ) const { map &here = get_map(); - tripoint p = pos(); + tripoint p = pos().raw(); // check furniture pseudo items if( here.furn( p ) != furn_str_id::NULL_ID() ) { @@ -697,14 +697,14 @@ std::list map_cursor::remove_items_with( const } // fetch the appropriate item stack - point offset; + point_sm_ms offset; submap *sub = here.get_submap_at( pos(), offset ); - cata::colony &stack = sub->get_items( offset ); + cata::colony &stack = sub->get_items( offset.raw() ); for( auto iter = stack.begin(); iter != stack.end(); ) { if( filter( *iter ) ) { // if necessary remove item from the luminosity map - sub->update_lum_rem( offset, *iter ); + sub->update_lum_rem( offset.raw(), *iter ); // finally remove the item res.push_back( *iter ); diff --git a/tests/act_build_test.cpp b/tests/act_build_test.cpp index 73296ca51f123..4980a864c14d8 100644 --- a/tests/act_build_test.cpp +++ b/tests/act_build_test.cpp @@ -36,7 +36,7 @@ void run_activities( Character &u, int max_moves ) while( ( !u.activity.is_null() || u.is_auto_moving() ) && turns < max_moves ) { u.set_moves( u.get_speed() ); if( u.is_auto_moving() ) { - u.setpos( get_map().getlocal( *u.destination_point ) ); + u.setpos( get_map().bub_from_abs( *u.destination_point ) ); get_map().build_map_cache( u.pos().z ); u.start_destination_activity(); } @@ -134,7 +134,7 @@ void run_test_case( Character &u ) } SECTION( "1-step construction activity with pre_terrain and starting far away" ) { - u.setpos( { ACTIVITY_SEARCH_DISTANCE - 1, 0, 0} ); + u.setpos( tripoint_bub_ms{ ACTIVITY_SEARCH_DISTANCE - 1, 0, 0} ); here.build_map_cache( u.pos().z ); tripoint_bub_ms const tri_window( tripoint_south ); construction const build = diff --git a/tests/crafting_test.cpp b/tests/crafting_test.cpp index 5d940ffa2e08f..4c4d66c0ba811 100644 --- a/tests/crafting_test.cpp +++ b/tests/crafting_test.cpp @@ -790,7 +790,7 @@ TEST_CASE( "UPS_modded_tools", "[crafting][ups]" ) if( ups_on_ground ) { item &ups_on_map = get_map().add_item( test_loc, ups ); REQUIRE( !ups_on_map.is_null() ); - ups_loc = item_location( map_cursor( test_loc ), &ups_on_map ); + ups_loc = item_location( map_cursor( tripoint_bub_ms( test_loc ) ), &ups_on_map ); } else { ups_loc = dummy.i_add( ups ); REQUIRE( dummy.has_item( *ups_loc ) ); diff --git a/tests/degradation_test.cpp b/tests/degradation_test.cpp index 4c82dde64ea78..7369f2c17606f 100644 --- a/tests/degradation_test.cpp +++ b/tests/degradation_test.cpp @@ -235,7 +235,7 @@ static void setup_repair( item &fix, player_activity &act, Character &u ) item &thread = m.add_item_or_charges( spawn_pos, item( itype_thread ) ); item &tailor = m.add_item_or_charges( spawn_pos, item( itype_tailors_kit ) ); thread.charges = 400; - tailor.reload( u, { map_cursor( spawn_pos ), &thread }, 400 ); + tailor.reload( u, { map_cursor( tripoint_bub_ms( spawn_pos ) ), &thread }, 400 ); REQUIRE( m.i_at( spawn_pos ).begin()->typeId() == tailor.typeId() ); // Setup materials @@ -245,7 +245,7 @@ static void setup_repair( item &fix, player_activity &act, Character &u ) // Setup activity item_location fixloc( u, &fix ); - item_location tailorloc( map_cursor( spawn_pos ), &tailor ); + item_location tailorloc( map_cursor( tripoint_bub_ms( spawn_pos ) ), &tailor ); act.values.emplace_back( /* repeat_type::FULL */ 3 ); act.str_values.emplace_back( "repair_fabric" ); act.targets.emplace_back( tailorloc ); diff --git a/tests/eoc_test.cpp b/tests/eoc_test.cpp index fce034c121eb5..4582ddfce7808 100644 --- a/tests/eoc_test.cpp +++ b/tests/eoc_test.cpp @@ -698,7 +698,7 @@ TEST_CASE( "dialogue_copy", "[eoc]" ) CHECK( d_copy.actor( true )->get_character() != nullptr ); item hammer( "hammer" ) ; - item_location hloc( map_cursor( tripoint_zero ), &hammer ); + item_location hloc( map_cursor( tripoint_bub_ms( tripoint_zero ) ), &hammer ); computer comp( "test_computer", 0, tripoint_zero ); dialogue d2( get_talker_for( hloc ), get_talker_for( comp ) ); dialogue d2_copy( d2 ); @@ -722,7 +722,7 @@ TEST_CASE( "EOC_meta_test", "[eoc]" ) standard_npc dude; monster zombie( mon_zombie ); item hammer( "hammer" ) ; - item_location hloc( map_cursor( tripoint_zero ), &hammer ); + item_location hloc( map_cursor( tripoint_bub_ms( tripoint_zero ) ), &hammer ); computer comp( "test_computer", 0, tripoint_zero ); dialogue d_empty( std::make_unique(), std::make_unique() ); diff --git a/tests/faction_price_rules_test.cpp b/tests/faction_price_rules_test.cpp index 160e2d5da003b..0f8c411cd4dc4 100644 --- a/tests/faction_price_rules_test.cpp +++ b/tests/faction_price_rules_test.cpp @@ -51,7 +51,7 @@ TEST_CASE( "basic_price_check", "[npc][trade]" ) } trade_selector::entry_t bck_entry{ - item_location{ map_cursor( tripoint_zero ), &backpack }, 1 }; + item_location{ map_cursor( tripoint_bub_ms( tripoint_zero ) ), &backpack }, 1 }; int const price_combined = trading_price( *buyer, *seller, bck_entry ); @@ -151,7 +151,7 @@ TEST_CASE( "faction_price_rules", "[npc][factions][trade]" ) int const battery_price = *guy.get_price_rules( battery )->price; REQUIRE( battery.price( true ) != battery_price ); trade_selector::entry_t tbd_entry{ - item_location{ map_cursor( tripoint_zero ), &tbd }, 1 }; + item_location{ map_cursor( tripoint_bub_ms( tripoint_zero ) ), &tbd }, 1 }; REQUIRE( npc_trading::trading_price( get_avatar(), guy, tbd_entry ) == Approx( units::to_cent( tbd.type->price_post ) * 1.25 + diff --git a/tests/harvest_test.cpp b/tests/harvest_test.cpp index 4387776cc0fde..560015e8275bd 100644 --- a/tests/harvest_test.cpp +++ b/tests/harvest_test.cpp @@ -41,7 +41,7 @@ static void butcher_mon( const mtype_id &monid, const activity_id &actid, int *c cow.die( nullptr ); u.move_to( cow.get_location() ); player_activity act( actid, 0, true ); - act.targets.emplace_back( map_cursor( u.pos() ), &*here.i_at( cow_loc ).begin() ); + act.targets.emplace_back( map_cursor( u.pos_bub() ), &*here.i_at( cow_loc ).begin() ); while( !act.is_null() ) { activity_handlers::butcher_finish( &act, &u ); } @@ -81,4 +81,4 @@ TEST_CASE( "Harvest_drops_from_dissecting_corpse", "[harvest]" ) CHECK( cbm_count > 0 ); CHECK( sample_count == 0 ); } -} \ No newline at end of file +} diff --git a/tests/invlet_test.cpp b/tests/invlet_test.cpp index 49fa4f9b850b9..070db29c2480b 100644 --- a/tests/invlet_test.cpp +++ b/tests/invlet_test.cpp @@ -253,11 +253,11 @@ static void pick_up_from_feet( Character &you, const std::string &id ) map_stack items = get_map().i_at( you.pos() ); size_t size_before = items.size(); - item *found = retrieve_item( map_cursor( you.pos() ), id ); + item *found = retrieve_item( map_cursor( you.pos_bub() ), id ); REQUIRE( found ); you.set_moves( 100 ); - const std::vector target_items = { item_location( map_cursor( you.pos() ), found ) }; + const std::vector target_items = { item_location( map_cursor( you.pos_bub() ), found ) }; you.assign_activity( pickup_activity_actor( target_items, { 0 }, you.pos_bub(), false ) ); you.activity.do_turn( you ); @@ -269,7 +269,7 @@ static void wear_from_feet( Character &you, const std::string &id ) map_stack items = get_map().i_at( you.pos() ); size_t size_before = items.size(); - item *found = retrieve_item( map_cursor( you.pos() ), id ); + item *found = retrieve_item( map_cursor( you.pos_bub() ), id ); REQUIRE( found ); you.wear_item( *found, false ); @@ -283,7 +283,7 @@ static void wield_from_feet( Character &you, const std::string &id ) map_stack items = get_map().i_at( you.pos() ); size_t size_before = items.size(); - item *found = retrieve_item( map_cursor( you.pos() ), id ); + item *found = retrieve_item( map_cursor( you.pos_bub() ), id ); REQUIRE( found ); you.wield( *found ); @@ -322,7 +322,7 @@ static item &item_at( Character &you, const std::string &id, const inventory_loc { switch( loc ) { case GROUND: { - item *found = retrieve_item( map_cursor( you.pos() ), id ); + item *found = retrieve_item( map_cursor( you.pos_bub() ), id ); REQUIRE( found ); return *found; } diff --git a/tests/item_autopickup_test.cpp b/tests/item_autopickup_test.cpp index 29ce14eb00162..9d0bcaa9e1154 100644 --- a/tests/item_autopickup_test.cpp +++ b/tests/item_autopickup_test.cpp @@ -200,7 +200,7 @@ TEST_CASE( "auto_pickup_should_recognize_container_content", "[autopickup][item] // this is where items will be picked up from const tripoint ground = they.pos(); - const map_cursor location = map_cursor( ground ); + const map_cursor location = map_cursor( tripoint_bub_ms( ground ) ); // wear backpack and store item reference auto backpack_iter = *they.wear_item( item( itype_backpack ) ); @@ -278,7 +278,7 @@ TEST_CASE( "auto_pickup_should_improve_your_life", "[autopickup][item]" ) // this is where items will be picked up from const tripoint ground = they.pos(); - const map_cursor location = map_cursor( ground ); + const map_cursor location = map_cursor( tripoint_bub_ms( ground ) ); // wear backpack and store item reference auto backpack_iter = *they.wear_item( item( itype_backpack ) ); @@ -319,7 +319,7 @@ TEST_CASE( "auto_pickup_should_consider_item_rigidness_and_seal", "[autopickup][ // this is where items will be picked up from const tripoint ground = they.pos(); - const map_cursor location = map_cursor( ground ); + const map_cursor location = map_cursor( tripoint_bub_ms( ground ) ); // wear backpack and store item reference auto backpack_iter = *they.wear_item( item( itype_backpack ) ); @@ -440,7 +440,7 @@ TEST_CASE( "auto_pickup_should_respect_volume_and_weight_limits", "[autopickup][ // this is where items will be picked up from const tripoint ground = they.pos(); - const map_cursor location = map_cursor( ground ); + const map_cursor location = map_cursor( tripoint_bub_ms( ground ) ); // wear backpack and store item reference auto backpack_iter = *they.wear_item( item( itype_backpack ) ); @@ -517,7 +517,7 @@ TEST_CASE( "auto_pickup_should_consider_item_ownership", "[autopickup][item]" ) // this is where items will be picked up from const tripoint ground = they.pos(); - const map_cursor location = map_cursor( ground ); + const map_cursor location = map_cursor( tripoint_bub_ms( ground ) ); // wear backpack and store item reference auto backpack_iter = *they.wear_item( item( itype_backpack ) ); @@ -578,7 +578,7 @@ TEST_CASE( "auto_pickup_should_not_implicitly_pickup_corpses", "[autopickup][ite // this is where items will be picked up from const tripoint ground = they.pos(); - const map_cursor location = map_cursor( ground ); + const map_cursor location = map_cursor( tripoint_bub_ms( ground ) ); // wield body bag and store item reference they.set_wielded_item( item( itype_bag_body_bag ) ); diff --git a/tests/item_contents_test.cpp b/tests/item_contents_test.cpp index 16bd0dc94514e..e23874815ca9a 100644 --- a/tests/item_contents_test.cpp +++ b/tests/item_contents_test.cpp @@ -131,7 +131,7 @@ TEST_CASE( "overflow_test_into_parent_item", "[item]" ) } REQUIRE( contents_pre == 1 ); - item_location jar_loc( map_cursor( origin ), &jar ); + item_location jar_loc( map_cursor( tripoint_bub_ms( origin ) ), &jar ); jar_loc.overflow(); map &here = get_map(); CHECK( here.i_at( origin ).empty() ); diff --git a/tests/item_location_test.cpp b/tests/item_location_test.cpp index 4142435856b16..afd742eda2233 100644 --- a/tests/item_location_test.cpp +++ b/tests/item_location_test.cpp @@ -31,7 +31,8 @@ TEST_CASE( "item_location_can_maintain_reference_despite_item_removal", "[item][ m.add_item( pos, item( "tshirt" ) ); m.add_item( pos, item( "jeans" ) ); m.add_item( pos, item( "jeans" ) ); - map_cursor cursor( pos ); + const tripoint_bub_ms bub = tripoint_bub_ms( pos ); + map_cursor cursor( bub ); item *tshirt = nullptr; cursor.visit_items( [&tshirt]( item * i, item * ) { if( i->typeId() == itype_tshirt ) { @@ -64,7 +65,7 @@ TEST_CASE( "item_location_doesnt_return_stale_map_item", "[item][item_location]" tripoint pos( 60, 60, 0 ); m.i_clear( pos ); m.add_item( pos, item( "tshirt" ) ); - item_location item_loc( map_cursor( pos ), &m.i_at( pos ).only_item() ); + item_location item_loc( map_cursor( tripoint_bub_ms( pos ) ), &m.i_at( pos ).only_item() ); REQUIRE( item_loc->typeId() == itype_tshirt ); m.i_rem( pos, &*item_loc ); m.add_item( pos, item( "jeans" ) ); diff --git a/tests/item_pickup_test.cpp b/tests/item_pickup_test.cpp index 01a758b5607b7..6bcabb0e706f2 100644 --- a/tests/item_pickup_test.cpp +++ b/tests/item_pickup_test.cpp @@ -100,7 +100,7 @@ TEST_CASE( "putting_items_into_inventory_with_put_in_or_i_add", "[pickup][invent they.clear_worn(); WHEN( "avatar tries to get the backpack with pick_up" ) { - item_location backpack_loc( map_cursor( ground ), &backpack_map ); + item_location backpack_loc( map_cursor( tripoint_bub_ms( ground ) ), &backpack_map ); const drop_locations &pack_droplocs = { std::make_pair( backpack_loc, 1 ) }; they.pick_up( pack_droplocs ); process_activity( they ); @@ -111,7 +111,7 @@ TEST_CASE( "putting_items_into_inventory_with_put_in_or_i_add", "[pickup][invent } WHEN( "avatar tries to get the rope with pick_up" ) { - item_location rope_loc( map_cursor( ground ), &rope_map ); + item_location rope_loc( map_cursor( tripoint_bub_ms( ground ) ), &rope_map ); const drop_locations &rope_droplocs = { std::make_pair( rope_loc, 1 ) }; they.pick_up( rope_droplocs ); process_activity( they ); @@ -172,7 +172,7 @@ TEST_CASE( "pickup_m4_with_a_rope_in_a_hiking_backpack", "[pickup][container]" ) WHEN( "they pick up the M4" ) { // Get item_location for m4 on the map - item_location m4_loc( map_cursor( they.pos() ), &m4a1 ); + item_location m4_loc( map_cursor( they.pos_bub() ), &m4a1 ); const drop_locations &thing = { std::make_pair( m4_loc, 1 ) }; CHECK_FALSE( backpack.has_item( m4a1 ) ); // Now pick up the M4 diff --git a/tests/item_pocket_test.cpp b/tests/item_pocket_test.cpp index 7aceff9c28b1c..46b57e9e22dc1 100644 --- a/tests/item_pocket_test.cpp +++ b/tests/item_pocket_test.cpp @@ -1829,10 +1829,11 @@ static void test_pickup_autoinsert_sub_sub( bool autopickup, bool wear, bool sof Character &u = get_player_character(); clear_map(); clear_character( u, true ); - item_location cont1( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos(), cont_nest_rigid ) ); - item_location cont2( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos(), cont_nest_soft ) ); - item_location obj1( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos(), rigid_obj ) ); - item_location obj2( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos(), soft_obj ) ); + item_location cont1( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos(), + cont_nest_rigid ) ); + item_location cont2( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos(), cont_nest_soft ) ); + item_location obj1( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos(), rigid_obj ) ); + item_location obj2( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos(), soft_obj ) ); pickup_activity_actor act_actor( { obj1, obj2 }, { 1, 1 }, u.pos_bub(), autopickup ); u.assign_activity( act_actor ); @@ -2059,7 +2060,7 @@ static void test_pickup_autoinsert_sub_sub( bool autopickup, bool wear, bool sof item_location c = give_item_to_char( u, soft_nested ? cont2 : cont1 ); WHEN( "item stack too large to fit in top-level container" ) { stack.charges = 300; - item_location obj3( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos(), stack ) ); + item_location obj3( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos(), stack ) ); REQUIRE( obj3->charges == 300 ); u.cancel_activity(); pickup_activity_actor new_actor( { obj3 }, { 300 }, u.pos_bub(), autopickup ); @@ -2090,7 +2091,7 @@ static void test_pickup_autoinsert_sub_sub( bool autopickup, bool wear, bool sof } WHEN( "item stack too large to fit in top-level container" ) { stack.charges = 300; - item_location obj3( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos_bub(), stack ) ); + item_location obj3( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos_bub(), stack ) ); REQUIRE( obj3->charges == 300 ); u.cancel_activity(); pickup_activity_actor new_actor( { obj3 }, { 300 }, u.pos_bub(), autopickup ); @@ -2122,7 +2123,7 @@ static void test_pickup_autoinsert_sub_sub( bool autopickup, bool wear, bool sof obj2.remove_item(); WHEN( "item stack too large to fit in top-level container" ) { stack.charges = 300; - item_location obj3( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos_bub(), stack ) ); + item_location obj3( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos_bub(), stack ) ); REQUIRE( obj3->charges == 300 ); u.cancel_activity(); pickup_activity_actor new_actor( { obj3 }, { 300 }, u.pos_bub(), autopickup ); @@ -2254,7 +2255,7 @@ TEST_CASE( "multipocket_liquid_transfer_test", "[pocket][item][liquid]" ) item cont_suit( "test_robofac_armor_rig" ); // Place a container at the character's feet - item_location jug_w_water( map_cursor( u.pos() ), &m.add_item_or_charges( u.pos(), cont_jug ) ); + item_location jug_w_water( map_cursor( u.pos_bub() ), &m.add_item_or_charges( u.pos(), cont_jug ) ); GIVEN( "character wearing a multipocket liquid container" ) { item_location suit( u, & **u.wear_item( cont_suit, false ) ); @@ -2623,7 +2624,7 @@ TEST_CASE( "item_cannot_contain_contents_it_already_has", "[item][pocket]" ) map &m = get_map(); clear_map(); - item_location backpack_loc( map_cursor( ipos ), &m.add_item( ipos, backpack ) ); + item_location backpack_loc( map_cursor( tripoint_bub_ms( ipos ) ), &m.add_item( ipos, backpack ) ); item_location bottle_loc( backpack_loc, &backpack_loc->only_item() ); item_location water_loc( bottle_loc, &bottle_loc->only_item() ); @@ -2763,7 +2764,7 @@ TEST_CASE( "auto_whitelist", "[item][pocket][item_spawn]" ) clear_map(); tripoint_abs_omt const this_omt = project_to( get_avatar().get_location() ); - tripoint const this_bub = get_map().getlocal( project_to( this_omt ) ); + tripoint_bub_ms const this_bub = get_map().bub_from_abs( project_to( this_omt ) ); manual_nested_mapgen( this_omt, nested_mapgen_auto_wl_test ); REQUIRE( !get_map().i_at( this_bub + tripoint_zero ).empty() ); REQUIRE( !get_map().i_at( this_bub + tripoint_east ).empty() ); diff --git a/tests/iuse_actor_test.cpp b/tests/iuse_actor_test.cpp index 3d3a556db0147..0534a56ed24a2 100644 --- a/tests/iuse_actor_test.cpp +++ b/tests/iuse_actor_test.cpp @@ -151,7 +151,7 @@ static void cut_up_yields( const std::string &target ) units::mass cut_up_target_mass = cut_up_target.weight(); item &spawned_item = here.add_item_or_charges( guy.pos(), cut_up_target ); - item_location item_loc( map_cursor( guy.pos() ), &spawned_item ); + item_location item_loc( map_cursor( guy.pos_bub() ), &spawned_item ); REQUIRE( smallest_yield_mass <= cut_up_target_mass ); diff --git a/tests/map_helpers.cpp b/tests/map_helpers.cpp index 508c77e429e5d..2195cedcd3298 100644 --- a/tests/map_helpers.cpp +++ b/tests/map_helpers.cpp @@ -146,7 +146,7 @@ void clear_map_and_put_player_underground() { clear_map(); // Make sure the player doesn't block the path of the monster being tested. - get_player_character().setpos( { 0, 0, -2 } ); + get_player_character().setpos( tripoint_bub_ms{ 0, 0, -2 } ); } monster &spawn_test_monster( const std::string &monster_type, const tripoint &start, diff --git a/tests/map_test.cpp b/tests/map_test.cpp index 574f8c1e6dc9d..1ca60b70b3390 100644 --- a/tests/map_test.cpp +++ b/tests/map_test.cpp @@ -57,7 +57,7 @@ TEST_CASE( "map_coordinate_conversion_functions" ) // Verify consistency between different implementations CHECK( here.getabs( test_bub ) == here.getabs( test_bub.raw() ) ); CHECK( here.getglobal( test_bub ) == here.getglobal( test_bub.raw() ) ); - CHECK( here.getlocal( test_abs ) == here.getlocal( test_abs.raw() ) ); + CHECK( here.getlocal( test_abs ) == here.bub_from_abs( test_abs ).raw() ); CHECK( here.bub_from_abs( test_abs ) == here.bub_from_abs( test_abs.raw() ) ); CHECK( here.getabs( test_bub ) == here.getglobal( test_bub ).raw() ); @@ -197,7 +197,7 @@ TEST_CASE( "inactive_container_with_active_contents", "[active_item][map]" ) item &bp = here.add_item( test_loc, bottle_plastic ); here.update_submaps_with_active_items(); - item_location bp_loc( map_cursor( test_loc ), &bp ); + item_location bp_loc( map_cursor( tripoint_bub_ms( test_loc ) ), &bp ); item_location dis_loc( bp_loc, &bp.only_item() ); REQUIRE( here.get_submaps_with_active_items().count( test_loc_sm ) != 0 ); diff --git a/tests/npc_shopkeeper_item_groups_test.cpp b/tests/npc_shopkeeper_item_groups_test.cpp index 835306d13e811..952791577044b 100644 --- a/tests/npc_shopkeeper_item_groups_test.cpp +++ b/tests/npc_shopkeeper_item_groups_test.cpp @@ -39,7 +39,7 @@ TEST_CASE( "npc_shopkeeper_item_groups", "[npc][trade]" ) std::pair har_pants = has_and_can_restock( guy, pants ); REQUIRE( har_pants.first == true ); REQUIRE( har_pants.second == true ); - REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_zero }, &pants } ) ); + REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &pants } ) ); } } @@ -49,14 +49,14 @@ TEST_CASE( "npc_shopkeeper_item_groups", "[npc][trade]" ) REQUIRE( creatures.creature_at( npc_pos ) != nullptr ); item backpack( "test_backpack" ); backpack.set_owner( guy ); - REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_zero }, &backpack } ) ); + REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &backpack } ) ); WHEN( "backpack is worn - not available for sale" ) { auto backpack_iter = *guy.wear_item( backpack ); item &it = *backpack_iter; - REQUIRE( !guy.wants_to_sell( { map_cursor{ tripoint_zero }, &it } ) ); + REQUIRE( !guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &it } ) ); item scrap( "scrap" ); scrap.set_owner( guy ); - REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_zero }, &scrap } ) ); + REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &scrap } ) ); item_location const scrap_inv = guy.i_add( scrap ); REQUIRE( scrap_inv ); THEN( "sell_belongings is true - item in inventory available for sale" ) { @@ -79,7 +79,7 @@ TEST_CASE( "npc_shopkeeper_item_groups", "[npc][trade]" ) THEN( "item is available for restocking but not selling" ) { REQUIRE( har_hammer.first == true ); REQUIRE( har_hammer.second == true ); - REQUIRE( !guy.wants_to_sell( { map_cursor{ tripoint_zero }, &hammer } ) ); + REQUIRE( !guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &hammer } ) ); } } WHEN( "condition met" ) { @@ -88,7 +88,7 @@ TEST_CASE( "npc_shopkeeper_item_groups", "[npc][trade]" ) THEN( "item is available for selling and restocking" ) { REQUIRE( har_hammer.first == true ); REQUIRE( har_hammer.second == true ); - REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_zero }, &hammer } ) ); + REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &hammer } ) ); } } } @@ -101,7 +101,7 @@ TEST_CASE( "npc_shopkeeper_item_groups", "[npc][trade]" ) THEN( "item is not available for selling or restocking" ) { REQUIRE( har_multitool.first == true ); REQUIRE( har_multitool.second == false ); - REQUIRE( !guy.wants_to_sell( { map_cursor{ tripoint_zero }, &multitool } ) ); + REQUIRE( !guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &multitool } ) ); } } WHEN( "condition met" ) { @@ -110,7 +110,7 @@ TEST_CASE( "npc_shopkeeper_item_groups", "[npc][trade]" ) THEN( "item is available for selling and restocking" ) { REQUIRE( har_multitool.first == true ); REQUIRE( har_multitool.second == true ); - REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_zero }, &multitool } ) ); + REQUIRE( guy.wants_to_sell( { map_cursor{ tripoint_bub_ms( tripoint_zero ) }, &multitool } ) ); } } } @@ -126,7 +126,7 @@ TEST_CASE( "npc_shopkeeper_item_groups", "[npc][trade]" ) CAPTURE( num, bag.display_name() ); REQUIRE( ret ); bag.set_owner( guy ); - item_location const loc( map_cursor{ tripoint_zero}, &bag ); + item_location const loc( map_cursor{ tripoint_bub_ms( tripoint_zero )}, &bag ); WHEN( "condition for contents not met" ) { THEN( "container can't be sold" ) { REQUIRE( !guy.wants_to_sell( loc ) ); diff --git a/tests/projectile_test.cpp b/tests/projectile_test.cpp index a07d0da8c9ff0..302b84680c092 100644 --- a/tests/projectile_test.cpp +++ b/tests/projectile_test.cpp @@ -50,7 +50,7 @@ TEST_CASE( "projectiles_through_obstacles", "[projectile]" ) creature_tracker &creatures = get_creature_tracker(); // Move the player out of the way of the test area - get_player_character().setpos( { 2, 2, 0 } ); + get_player_character().setpos( tripoint_bub_ms{ 2, 2, 0 } ); // Ensure that a projectile fired from a gun can pass through a chain link fence // First, set up a test area - three tiles in a row diff --git a/tests/reloading_test.cpp b/tests/reloading_test.cpp index 7c953e3f237bd..0a31f8597ddb2 100644 --- a/tests/reloading_test.cpp +++ b/tests/reloading_test.cpp @@ -1131,7 +1131,7 @@ TEST_CASE( "reload_liquid_container", "[reload],[liquid]" ) SECTION( "liquid in container on floor" ) { ammo_jug.remove_item(); - ammo_jug = item_location( map_cursor( near_point ), &here.add_item( near_point, + ammo_jug = item_location( map_cursor( tripoint_bub_ms( near_point ) ), &here.add_item( near_point, item( "bottle_plastic" ) ) ); ammo_jug->fill_with( item( "water_clean" ) ); ammo_volume = ammo_jug->total_contained_volume(); diff --git a/tests/unseal_and_spill_test.cpp b/tests/unseal_and_spill_test.cpp index 2483d911c03ce..c6fccf38e8a3a 100644 --- a/tests/unseal_and_spill_test.cpp +++ b/tests/unseal_and_spill_test.cpp @@ -440,12 +440,12 @@ void test_scenario::run() break; } case container_location::vehicle: { - vehicle *veh = here.add_vehicle( vehicle_prototype_test_cargo_space, guy.pos(), + vehicle *veh = here.add_vehicle( vehicle_prototype_test_cargo_space, guy.pos_bub(), -90_degrees, 0, 0 ); REQUIRE( veh ); - here.board_vehicle( guy.pos(), &guy ); + here.board_vehicle( guy.pos_bub(), &guy ); std::optional vp = - here.veh_at( guy.pos() ).part_with_feature( vpart_bitflags::VPFLAG_CARGO, true ); + here.veh_at( guy.pos_bub() ).part_with_feature( vpart_bitflags::VPFLAG_CARGO, true ); REQUIRE( vp.has_value() ); std::optional added = veh->add_item( vp->part(), it ); REQUIRE( added.has_value() ); @@ -453,8 +453,8 @@ void test_scenario::run() break; } case container_location::ground: { - item &added = here.add_item( guy.pos(), it ); - it_loc = item_location( map_cursor( guy.pos() ), &added ); + item &added = here.add_item( guy.pos_bub(), it ); + it_loc = item_location( map_cursor( guy.pos_bub() ), &added ); break; } default: { @@ -862,9 +862,9 @@ void test_scenario::run() REQUIRE( !it_loc ); } INFO( "checking ground items" ); - match( map_cursor( guy.pos() ), here.i_at( guy.pos() ), ground ); + match( map_cursor( guy.pos_bub() ), here.i_at( guy.pos_bub() ), ground ); INFO( "checking vehicle items" ); - std::optional vp = here.veh_at( guy.pos() ) + std::optional vp = here.veh_at( guy.pos_bub() ) .part_with_feature( vpart_bitflags::VPFLAG_CARGO, true ); if( cur_container_loc == container_location::vehicle ) { REQUIRE( vp.has_value() ); diff --git a/tests/visitable_remove_test.cpp b/tests/visitable_remove_test.cpp index dd160e7e5b095..72907d93c35dd 100644 --- a/tests/visitable_remove_test.cpp +++ b/tests/visitable_remove_test.cpp @@ -326,8 +326,8 @@ TEST_CASE( "visitable_remove", "[visitable]" ) } REQUIRE( our + adj == count ); - map_selector sel( p.pos(), 1 ); - map_cursor cur( p.pos() ); + map_selector sel( p.pos_bub(), 1 ); + map_cursor cur( p.pos_bub() ); REQUIRE( count_items( sel, container_id ) == count ); REQUIRE( count_items( sel, liquid_id ) == count ); diff --git a/tests/wield_times_test.cpp b/tests/wield_times_test.cpp index 78384e71d0f60..a4efda1fb2008 100644 --- a/tests/wield_times_test.cpp +++ b/tests/wield_times_test.cpp @@ -49,7 +49,7 @@ static void wield_check_from_ground( avatar &guy, const itype_id &item_name, { item &spawned_item = get_map().add_item_or_charges( guy.pos(), item( item_name, calendar::turn, 1 ) ); - item_location item_loc( map_cursor( guy.pos() ), &spawned_item ); + item_location item_loc( map_cursor( guy.pos_bub() ), &spawned_item ); CHECK( item_loc.obtain_cost( guy ) == Approx( expected_moves ).epsilon( 0.1f ) ); } From 0061bcbbb8a2062b7fae4a07416172e9ef39dcda Mon Sep 17 00:00:00 2001 From: PatrikLundell Date: Sat, 25 May 2024 23:19:48 +0200 Subject: [PATCH 7/8] palette parameters + roof for saltworks (#74071) * palette parameters + roof for saltworks * vent pipe, not chimney --- .../version_1/modular_saltworks_common.json | 32 ++- .../modular_saltworks_construction.json | 252 ++++++++++++++++++ .../version_1/modular_saltworks_log.json | 111 -------- .../version_1/modular_saltworks_metal.json | 105 -------- .../modular_saltworks_migo_resin.json | 105 -------- .../version_1/modular_saltworks_palette.json | 248 +++++++++++++++++ .../modular_saltworks_rammed_earth.json | 105 -------- .../version_1/modular_saltworks_rock.json | 105 -------- .../version_1/modular_saltworks_wad.json | 105 -------- .../version_1/modular_saltworks_wood.json | 105 -------- ...recipe_modular_saltworks_construction.json | 80 ++++++ .../recipe_modular_saltworks_log.json | 47 ---- .../recipe_modular_saltworks_metal.json | 47 ---- .../recipe_modular_saltworks_migo_resin.json | 47 ---- ...recipe_modular_saltworks_rammed_earth.json | 47 ---- .../recipe_modular_saltworks_stone.json | 47 ---- .../recipe_modular_saltworks_wad.json | 47 ---- .../recipe_modular_saltworks_wood.json | 47 ---- 18 files changed, 604 insertions(+), 1078 deletions(-) create mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_construction.json delete mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_log.json delete mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_metal.json delete mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_migo_resin.json create mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_palette.json delete mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rammed_earth.json delete mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rock.json delete mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wad.json delete mode 100644 data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wood.json create mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_construction.json delete mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_log.json delete mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_metal.json delete mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_migo_resin.json delete mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_rammed_earth.json delete mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_stone.json delete mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wad.json delete mode 100644 data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wood.json diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_common.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_common.json index f4d42c740ae76..6e007f92de829 100644 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_common.json +++ b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_common.json @@ -1,11 +1,4 @@ [ - { - "type": "palette", - "id": "fbmsw_common_palette", - "terrain": { ".": "t_dirt" }, - "//": "Didn't like an empty terrain section, so a dummy entry has been added", - "furniture": { "r": "f_rack", "t": "f_table", "#": "f_stool", "H": "f_wood_keg", "^": "f_still", "s": "f_woodstove" } - }, { "type": "mapgen", "method": "json", @@ -36,11 +29,34 @@ "palettes": [ "fbmsw_common_palette" ] } }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery1_still_roof", + "object": { + "mapgensize": [ 7, 7 ], + "rows": [ + " ", + " ", + " ", + " ", + " ", + " C ", + " " + ], + "palettes": [ "fbmsw_common_palette" ] + } + }, { "type": "mapgen", "update_mapgen_id": "fbmsw_brewery1_southwest", "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery1_still" ], "x": 3, "y": 14 } ] } + "object": { + "place_nested": [ + { "chunks": [ "fbmsw_brewery1_still" ], "x": 3, "y": 14, "z": 0 }, + { "chunks": [ "fbmsw_brewery1_still_roof" ], "x": 3, "y": 14, "z": 1 } + ] + } }, { "type": "mapgen", diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_construction.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_construction.json new file mode 100644 index 0000000000000..5a3fdf8581183 --- /dev/null +++ b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_construction.json @@ -0,0 +1,252 @@ +[ + { + "type": "mapgen", + "update_mapgen_id": "faction_base_saltworks_0", + "method": "json", + "object": { "place_nested": [ { "chunks": [ "fbmsw_0" ], "x": 15, "y": 3 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_saltpan_construction", + "object": { + "parameters": { + "fbmsw_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmsw_log_palette", + "fbmsw_metal_palette", + "fbmsw_migo_resin_palette", + "fbmsw_rammed_earth_palette", + "fbmsw_rock_palette", + "fbmsw_wad_palette", + "fbmsw_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwowww", + "w.....w", + "w.c.c.w", + "o.~t~.o", + "w.~#~.w", + "w.....w", + "www+www" + ], + "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], + "palettes": [ { "param": "fbmsw_construction_palette" } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_saltpan_construction_roof", + "object": { + "parameters": { + "fbmsw_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmsw_log_palette", + "fbmsw_metal_palette", + "fbmsw_migo_resin_palette", + "fbmsw_rammed_earth_palette", + "fbmsw_rock_palette", + "fbmsw_wad_palette", + "fbmsw_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR" + ], + "palettes": [ { "param": "fbmsw_construction_palette" } ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_saltpan_construction_northeast", + "method": "json", + "object": { + "place_nested": [ + { "chunks": [ "fbmsw_saltpan_construction" ], "x": 14, "y": 3, "z": 0 }, + { "chunks": [ "fbmsw_saltpan_construction_roof" ], "x": 14, "y": 3, "z": 1 } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_shack_construction", + "object": { + "parameters": { + "fbmsw_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmsw_log_palette", + "fbmsw_metal_palette", + "fbmsw_migo_resin_palette", + "fbmsw_rammed_earth_palette", + "fbmsw_rock_palette", + "fbmsw_wad_palette", + "fbmsw_wood_palette" + ] + } + } + }, + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " woww", + " wwrrw", + " +..to", + " orrrw", + " wwoww" + ], + "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], + "palettes": [ { "param": "fbmsw_construction_palette" } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_shack_construction_roof", + "object": { + "parameters": { + "fbmsw_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmsw_log_palette", + "fbmsw_metal_palette", + "fbmsw_migo_resin_palette", + "fbmsw_rammed_earth_palette", + "fbmsw_rock_palette", + "fbmsw_wad_palette", + "fbmsw_wood_palette" + ] + } + } + }, + "mapgensize": [ 6, 6 ], + "rows": [ + " ", + " RRRR", + " RRRRR", + " RRRRR", + " RRRRR", + " RRRRR" + ], + "palettes": [ { "param": "fbmsw_construction_palette" } ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_shack_construction_southeast", + "method": "json", + "object": { + "place_nested": [ + { "chunks": [ "fbmsw_shack_construction" ], "x": 15, "y": 15, "z": 0 }, + { "chunks": [ "fbmsw_shack_construction_roof" ], "x": 15, "y": 15, "z": 1 } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery0_construction", + "object": { + "parameters": { + "fbmsw_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmsw_log_palette", + "fbmsw_metal_palette", + "fbmsw_migo_resin_palette", + "fbmsw_rammed_earth_palette", + "fbmsw_rock_palette", + "fbmsw_wad_palette", + "fbmsw_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "wwwwwww", + "w.rrr.w", + "oH....+", + "wO....w", + "o.....w", + "w.....w", + "wwwwwww" + ], + "flags": [ "ALLOW_TERRAIN_UNDER_OTHER_DATA" ], + "palettes": [ { "param": "fbmsw_construction_palette" } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "fbmsw_brewery0_construction_roof", + "object": { + "parameters": { + "fbmsw_construction_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + "fbmsw_log_palette", + "fbmsw_metal_palette", + "fbmsw_migo_resin_palette", + "fbmsw_rammed_earth_palette", + "fbmsw_rock_palette", + "fbmsw_wad_palette", + "fbmsw_wood_palette" + ] + } + } + }, + "mapgensize": [ 7, 7 ], + "rows": [ + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR", + "RRRRRRR" + ], + "palettes": [ { "param": "fbmsw_construction_palette" } ] + } + }, + { + "type": "mapgen", + "update_mapgen_id": "fbmsw_brewery0_construction_southwest", + "method": "json", + "object": { + "place_nested": [ + { "chunks": [ "fbmsw_brewery0_construction" ], "x": 3, "y": 14, "z": 0 }, + { "chunks": [ "fbmsw_brewery0_construction_roof" ], "x": 3, "y": 14, "z": 1 } + ] + } + } +] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_log.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_log.json deleted file mode 100644 index 4e035269829f9..0000000000000 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_log.json +++ /dev/null @@ -1,111 +0,0 @@ -[ - { - "type": "palette", - "id": "fbmsw_log_palette", - "terrain": { - ".": "t_floor_primitive", - "b": "t_floor_primitive", - "r": "t_floor_primitive", - "t": "t_floor_primitive", - "#": "t_floor_primitive", - "c": "t_floor_primitive", - "H": "t_floor_primitive", - "O": "t_floor_primitive", - "~": "t_swater_sh", - "o": "t_window_no_curtains", - "w": "t_wall_log", - "+": "t_door_c" - }, - "furniture": { - ".": "f_clear", - "b": "f_bench", - "r": "f_rack", - "t": "f_table", - "#": "f_stool", - "c": "f_counter", - "H": "f_wood_keg", - "O": "f_fvat_empty", - "~": "f_clear", - "o": "f_clear", - "w": "f_clear", - "+": "f_clear" - } - }, - { - "type": "mapgen", - "update_mapgen_id": "faction_base_saltworks_0", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_0" ], "x": 15, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_saltpan_log", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwowww", - "w.....w", - "w.c.c.w", - "o.~t~.o", - "w.~#~.w", - "w.....w", - "www+www" - ], - "palettes": [ "fbmsw_log_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_saltpan_log_northeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_log" ], "x": 14, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_shack_log", - "object": { - "mapgensize": [ 6, 6 ], - "rows": [ - " ", - " woww", - " wwrrw", - " +..to", - " orrrw", - " wwoww" - ], - "palettes": [ "fbmsw_log_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_shack_log_southeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_log" ], "x": 15, "y": 15 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_brewery0_log", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwwwww", - "w.rrr.w", - "oH....+", - "wO....w", - "o.....w", - "w.....w", - "wwwwwww" - ], - "palettes": [ "fbmsw_log_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_brewery0_log_southwest", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_log" ], "x": 3, "y": 14 } ] } - } -] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_metal.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_metal.json deleted file mode 100644 index fedd02b2c4609..0000000000000 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_metal.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "type": "palette", - "id": "fbmsw_metal_palette", - "terrain": { - ".": "t_metal_floor", - "b": "t_metal_floor", - "r": "t_metal_floor", - "t": "t_metal_floor", - "#": "t_metal_floor", - "c": "t_metal_floor", - "H": "t_metal_floor", - "O": "t_metal_floor", - "~": "t_swater_sh", - "o": "t_window_no_curtains", - "w": "t_scrap_wall", - "+": "t_door_c" - }, - "furniture": { - ".": "f_clear", - "b": "f_bench", - "r": "f_rack", - "t": "f_table", - "#": "f_stool", - "c": "f_counter", - "H": "f_wood_keg", - "O": "f_fvat_empty", - "~": "f_clear", - "o": "f_clear", - "w": "f_clear", - "+": "f_clear" - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_saltpan_metal", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwowww", - "w.....w", - "w.c.c.w", - "o.~t~.o", - "w.~#~.w", - "w.....w", - "www+www" - ], - "palettes": [ "fbmsw_metal_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_saltpan_metal_northeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_metal" ], "x": 14, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_shack_metal", - "object": { - "mapgensize": [ 6, 6 ], - "rows": [ - " ", - " woww", - " wwrrw", - " +..to", - " orrrw", - " wwoww" - ], - "palettes": [ "fbmsw_metal_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_shack_metal_southeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_metal" ], "x": 15, "y": 15 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_brewery0_metal", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwwwww", - "w.rrr.w", - "oH....+", - "wO....w", - "o.....w", - "w.....w", - "wwwwwww" - ], - "palettes": [ "fbmsw_metal_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_brewery0_metal_southwest", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_metal" ], "x": 3, "y": 14 } ] } - } -] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_migo_resin.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_migo_resin.json deleted file mode 100644 index 7f398715680e2..0000000000000 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_migo_resin.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "type": "palette", - "id": "fbmsw_migo_resin_palette", - "terrain": { - ".": "t_floor_resin", - "b": "t_floor_resin", - "r": "t_floor_resin", - "t": "t_floor_resin", - "#": "t_floor_resin", - "c": "t_floor_resin", - "H": "t_floor_resin", - "O": "t_floor_resin", - "~": "t_swater_sh", - "o": "t_wall_resin_cage", - "w": "t_wall_resin", - "+": "t_resin_hole_c" - }, - "furniture": { - ".": "f_clear", - "b": "f_bench", - "r": "f_rack", - "t": "f_table", - "#": "f_stool", - "c": "f_counter", - "H": "f_wood_keg", - "O": "f_fvat_empty", - "~": "f_clear", - "o": "f_clear", - "w": "f_clear", - "+": "f_clear" - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_saltpan_migo_resin", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwowww", - "w.....w", - "w.c.c.w", - "o.~t~.o", - "w.~#~.w", - "w.....w", - "www+www" - ], - "palettes": [ "fbmsw_migo_resin_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_saltpan_migo_resin_northeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_migo_resin" ], "x": 14, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_shack_migo_resin", - "object": { - "mapgensize": [ 6, 6 ], - "rows": [ - " ", - " woww", - " wwrrw", - " +..to", - " orrrw", - " wwoww" - ], - "palettes": [ "fbmsw_migo_resin_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_shack_migo_resin_southeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_migo_resin" ], "x": 15, "y": 15 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_brewery0_migo_resin", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwwwww", - "w.rrr.w", - "oH....+", - "wO....w", - "o.....w", - "w.....w", - "wwwwwww" - ], - "palettes": [ "fbmsw_migo_resin_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_brewery0_migo_resin_southwest", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_migo_resin" ], "x": 3, "y": 14 } ] } - } -] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_palette.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_palette.json new file mode 100644 index 0000000000000..2f5bbd12a660a --- /dev/null +++ b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_palette.json @@ -0,0 +1,248 @@ +[ + { + "type": "palette", + "id": "fbmsw_common_palette", + "terrain": { ".": "t_dirt" }, + "//": "Didn't like an empty terrain section, so a dummy entry has been added", + "furniture": { + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "H": "f_wood_keg", + "^": "f_still", + "s": "f_woodstove", + "C": "f_vent_pipe" + } + }, + { + "type": "palette", + "id": "fbmsw_log_palette", + "terrain": { + ".": "t_floor_primitive", + "b": "t_floor_primitive", + "r": "t_floor_primitive", + "t": "t_floor_primitive", + "#": "t_floor_primitive", + "c": "t_floor_primitive", + "H": "t_floor_primitive", + "O": "t_floor_primitive", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_wall_log", + "+": "t_door_c", + "R": "t_wood_treated_roof" + }, + "furniture": { + ".": "f_clear", + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "~": "f_clear", + "o": "f_clear", + "w": "f_clear", + "+": "f_clear" + } + }, + { + "type": "palette", + "id": "fbmsw_metal_palette", + "terrain": { + ".": "t_metal_floor", + "b": "t_metal_floor", + "r": "t_metal_floor", + "t": "t_metal_floor", + "#": "t_metal_floor", + "c": "t_metal_floor", + "H": "t_metal_floor", + "O": "t_metal_floor", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_scrap_wall", + "+": "t_door_c", + "R": "t_metal_flat_roof" + }, + "furniture": { + ".": "f_clear", + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "~": "f_clear", + "o": "f_clear", + "w": "f_clear", + "+": "f_clear" + } + }, + { + "type": "palette", + "id": "fbmsw_migo_resin_palette", + "terrain": { + ".": "t_floor_resin", + "b": "t_floor_resin", + "r": "t_floor_resin", + "t": "t_floor_resin", + "#": "t_floor_resin", + "c": "t_floor_resin", + "H": "t_floor_resin", + "O": "t_floor_resin", + "~": "t_swater_sh", + "o": "t_wall_resin_cage", + "w": "t_wall_resin", + "+": "t_resin_hole_c", + "R": "t_resin_roof" + }, + "furniture": { + ".": "f_clear", + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "~": "f_clear", + "o": "f_clear", + "w": "f_clear", + "+": "f_clear" + } + }, + { + "type": "palette", + "id": "fbmsw_rammed_earth_palette", + "terrain": { + ".": "t_dirtfloor", + "b": "t_dirtfloor", + "r": "t_dirtfloor", + "t": "t_dirtfloor", + "#": "t_dirtfloor", + "c": "t_dirtfloor", + "H": "t_dirtfloor", + "O": "t_dirtfloor", + "~": "t_swater_sh", + "o": "t_window_empty", + "w": "t_wall_rammed_earth", + "+": "t_door_makeshift_c", + "R": "t_log_sod_roof" + }, + "furniture": { + ".": "f_clear", + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "~": "f_clear", + "o": "f_clear", + "w": "f_clear", + "+": "f_clear" + } + }, + { + "type": "palette", + "id": "fbmsw_rock_palette", + "terrain": { + ".": "t_rock_floor", + "b": "t_rock_floor", + "r": "t_rock_floor", + "t": "t_rock_floor", + "#": "t_rock_floor", + "c": "t_rock_floor", + "H": "t_rock_floor", + "O": "t_rock_floor", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_rock_wall", + "+": "t_door_c", + "R": "t_wood_treated_roof" + }, + "furniture": { + ".": "f_clear", + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "~": "f_clear", + "o": "f_clear", + "w": "f_clear", + "+": "f_clear" + } + }, + { + "type": "palette", + "id": "fbmsw_wad_palette", + "terrain": { + ".": "t_dirtfloor", + "b": "t_dirtfloor", + "r": "t_dirtfloor", + "t": "t_dirtfloor", + "#": "t_dirtfloor", + "c": "t_dirtfloor", + "H": "t_dirtfloor", + "O": "t_dirtfloor", + "~": "t_swater_sh", + "o": "t_wall_wattle_half", + "w": "t_wall_wattle", + "+": "t_door_makeshift_c", + "R": "t_log_sod_roof" + }, + "furniture": { + ".": "f_clear", + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "~": "f_clear", + "o": "f_clear", + "w": "f_clear", + "+": "f_clear" + } + }, + { + "type": "palette", + "id": "fbmsw_wood_palette", + "terrain": { + ".": "t_floor", + "b": "t_floor", + "r": "t_floor", + "t": "t_floor", + "#": "t_floor", + "c": "t_floor", + "H": "t_floor", + "O": "t_floor", + "~": "t_swater_sh", + "o": "t_window_no_curtains", + "w": "t_wall_wood", + "+": "t_door_c", + "R": "t_wood_treated_roof" + }, + "furniture": { + ".": "f_clear", + "b": "f_bench", + "r": "f_rack", + "t": "f_table", + "#": "f_stool", + "c": "f_counter", + "H": "f_wood_keg", + "O": "f_fvat_empty", + "~": "f_clear", + "o": "f_clear", + "w": "f_clear", + "+": "f_clear" + } + } +] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rammed_earth.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rammed_earth.json deleted file mode 100644 index 2a7259ba924f7..0000000000000 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rammed_earth.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "type": "palette", - "id": "fbmsw_rammed_earth_palette", - "terrain": { - ".": "t_dirtfloor", - "b": "t_dirtfloor", - "r": "t_dirtfloor", - "t": "t_dirtfloor", - "#": "t_dirtfloor", - "c": "t_dirtfloor", - "H": "t_dirtfloor", - "O": "t_dirtfloor", - "~": "t_swater_sh", - "o": "t_window_empty", - "w": "t_wall_rammed_earth", - "+": "t_door_makeshift_c" - }, - "furniture": { - ".": "f_clear", - "b": "f_bench", - "r": "f_rack", - "t": "f_table", - "#": "f_stool", - "c": "f_counter", - "H": "f_wood_keg", - "O": "f_fvat_empty", - "~": "f_clear", - "o": "f_clear", - "w": "f_clear", - "+": "f_clear" - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_saltpan_rammed_earth", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwowww", - "w.....w", - "w.c.c.w", - "o.~t~.o", - "w.~#~.w", - "w.....w", - "www+www" - ], - "palettes": [ "fbmsw_rammed_earth_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_saltpan_rammed_earth_northeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_rammed_earth" ], "x": 14, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_shack_rammed_earth", - "object": { - "mapgensize": [ 6, 6 ], - "rows": [ - " ", - " woww", - " wwrrw", - " +..to", - " orrrw", - " wwoww" - ], - "palettes": [ "fbmsw_rammed_earth_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_shack_rammed_earth_southeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_rammed_earth" ], "x": 15, "y": 15 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_brewery0_rammed_earth", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwwwww", - "w.rrr.w", - "oH....+", - "wO....w", - "o.....w", - "w.....w", - "wwwwwww" - ], - "palettes": [ "fbmsw_rammed_earth_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_brewery0_rammed_earth_southwest", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_rammed_earth" ], "x": 3, "y": 14 } ] } - } -] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rock.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rock.json deleted file mode 100644 index 9ab8d2ecf4019..0000000000000 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_rock.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "type": "palette", - "id": "fbmsw_rock_palette", - "terrain": { - ".": "t_rock_floor", - "b": "t_rock_floor", - "r": "t_rock_floor", - "t": "t_rock_floor", - "#": "t_rock_floor", - "c": "t_rock_floor", - "H": "t_rock_floor", - "O": "t_rock_floor", - "~": "t_swater_sh", - "o": "t_window_no_curtains", - "w": "t_rock_wall", - "+": "t_door_c" - }, - "furniture": { - ".": "f_clear", - "b": "f_bench", - "r": "f_rack", - "t": "f_table", - "#": "f_stool", - "c": "f_counter", - "H": "f_wood_keg", - "O": "f_fvat_empty", - "~": "f_clear", - "o": "f_clear", - "w": "f_clear", - "+": "f_clear" - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_saltpan_rock", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwowww", - "w.....w", - "w.c.c.w", - "o.~t~.o", - "w.~#~.w", - "w.....w", - "www+www" - ], - "palettes": [ "fbmsw_rock_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_saltpan_rock_northeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_rock" ], "x": 14, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_shack_rock", - "object": { - "mapgensize": [ 6, 6 ], - "rows": [ - " ", - " woww", - " wwrrw", - " +..to", - " orrrw", - " wwoww" - ], - "palettes": [ "fbmsw_rock_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_shack_rock_southeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_rock" ], "x": 15, "y": 15 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_brewery0_rock", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwwwww", - "w.rrr.w", - "oH....+", - "wO....w", - "o.....w", - "w.....w", - "wwwwwww" - ], - "palettes": [ "fbmsw_rock_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_brewery0_rock_southwest", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_rock" ], "x": 3, "y": 14 } ] } - } -] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wad.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wad.json deleted file mode 100644 index 5ee8604606c5d..0000000000000 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wad.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "type": "palette", - "id": "fbmsw_wad_palette", - "terrain": { - ".": "t_dirtfloor", - "b": "t_dirtfloor", - "r": "t_dirtfloor", - "t": "t_dirtfloor", - "#": "t_dirtfloor", - "c": "t_dirtfloor", - "H": "t_dirtfloor", - "O": "t_dirtfloor", - "~": "t_swater_sh", - "o": "t_wall_wattle_half", - "w": "t_wall_wattle", - "+": "t_door_makeshift_c" - }, - "furniture": { - ".": "f_clear", - "b": "f_bench", - "r": "f_rack", - "t": "f_table", - "#": "f_stool", - "c": "f_counter", - "H": "f_wood_keg", - "O": "f_fvat_empty", - "~": "f_clear", - "o": "f_clear", - "w": "f_clear", - "+": "f_clear" - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_saltpan_wad", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwowww", - "w.....w", - "w.c.c.w", - "o.~t~.o", - "w.~#~.w", - "w.....w", - "www+www" - ], - "palettes": [ "fbmsw_wad_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_saltpan_wad_northeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_wad" ], "x": 14, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_shack_wad", - "object": { - "mapgensize": [ 6, 6 ], - "rows": [ - " ", - " woww", - " wwrrw", - " +..to", - " orrrw", - " wwoww" - ], - "palettes": [ "fbmsw_wad_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_shack_wad_southeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_wad" ], "x": 15, "y": 15 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_brewery0_wad", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwwwww", - "w.rrr.w", - "oH....+", - "wO....w", - "o.....w", - "w.....w", - "wwwwwww" - ], - "palettes": [ "fbmsw_wad_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_brewery0_wad_southwest", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_wad" ], "x": 3, "y": 14 } ] } - } -] diff --git a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wood.json b/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wood.json deleted file mode 100644 index a0a4236906049..0000000000000 --- a/data/json/mapgen/basecamps/expansion/modular_saltworks/version_1/modular_saltworks_wood.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "type": "palette", - "id": "fbmsw_wood_palette", - "terrain": { - ".": "t_floor", - "b": "t_floor", - "r": "t_floor", - "t": "t_floor", - "#": "t_floor", - "c": "t_floor", - "H": "t_floor", - "O": "t_floor", - "~": "t_swater_sh", - "o": "t_window_no_curtains", - "w": "t_wall_wood", - "+": "t_door_c" - }, - "furniture": { - ".": "f_clear", - "b": "f_bench", - "r": "f_rack", - "t": "f_table", - "#": "f_stool", - "c": "f_counter", - "H": "f_wood_keg", - "O": "f_fvat_empty", - "~": "f_clear", - "o": "f_clear", - "w": "f_clear", - "+": "f_clear" - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_saltpan_wood", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwowww", - "w.....w", - "w.c.c.w", - "o.~t~.o", - "w.~#~.w", - "w.....w", - "www+www" - ], - "palettes": [ "fbmsw_wood_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_saltpan_wood_northeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_saltpan_wood" ], "x": 14, "y": 3 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_shack_wood", - "object": { - "mapgensize": [ 6, 6 ], - "rows": [ - " ", - " woww", - " wwrrw", - " +..to", - " orrrw", - " wwoww" - ], - "palettes": [ "fbmsw_wood_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_shack_wood_southeast", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_shack_wood" ], "x": 15, "y": 15 } ] } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "fbmsw_brewery0_wood", - "object": { - "mapgensize": [ 7, 7 ], - "rows": [ - "wwwwwww", - "w.rrr.w", - "oH....+", - "wO....w", - "o.....w", - "w.....w", - "wwwwwww" - ], - "palettes": [ "fbmsw_wood_palette" ] - } - }, - { - "type": "mapgen", - "update_mapgen_id": "fbmsw_brewery0_wood_southwest", - "method": "json", - "object": { "place_nested": [ { "chunks": [ "fbmsw_brewery0_wood" ], "x": 3, "y": 14 } ] } - } -] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_construction.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_construction.json new file mode 100644 index 0000000000000..8cd1018d77b86 --- /dev/null +++ b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_construction.json @@ -0,0 +1,80 @@ +[ + { + "type": "recipe", + "activity_level": "MODERATE_EXERCISE", + "result": "faction_base_modular_saltpan_northeast", + "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in building.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_saltpan_construction_northeast", + "blueprint_name": "NE wall saltpan", + "blueprint_parameter_names": { + "fbmsw_construction_palette": { + "fbmsw_log_palette": "Log walls and wooden roof", + "fbmsw_metal_palette": "Metal walls and roof", + "fbmsw_migo_resin_palette": "Mi-go resin walls and roof", + "fbmsw_rammed_earth_palette": "Rammed earth walls and sod roof", + "fbmsw_rock_palette": "Rock walls and wooden roof", + "fbmsw_wad_palette": "Wattle-and-daub walls and sod roof", + "fbmsw_wood_palette": "Wooden walls and wooden roof" + } + }, + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], + "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] + }, + { + "type": "recipe", + "activity_level": "MODERATE_EXERCISE", + "result": "faction_base_modular_shack_construction_southeast", + "description": "We could use a storage room for chemicals and tools, so build a shack on the southeast side of the saltworks field.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_shack_construction_southeast", + "blueprint_name": "SE storage room", + "blueprint_parameter_names": { + "fbmsw_construction_palette": { + "fbmsw_log_palette": "Log walls and wooden roof", + "fbmsw_metal_palette": "Metal walls and roof", + "fbmsw_migo_resin_palette": "Mi-go resin walls and roof", + "fbmsw_rammed_earth_palette": "Rammed earth walls and sod roof", + "fbmsw_rock_palette": "Rock walls and wooden roof", + "fbmsw_wad_palette": "Wattle-and-daub walls and sod roof", + "fbmsw_wood_palette": "Wooden walls and wooden roof" + } + }, + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southeast" } ], + "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] + }, + { + "type": "recipe", + "activity_level": "MODERATE_EXERCISE", + "result": "faction_base_modular_brewery0_construction_southwest", + "description": "We could take advantage of the designation of this area to build a brewery.", + "category": "CC_BUILDING", + "subcategory": "CSC_BUILDING_BASES", + "autolearn": false, + "never_learn": true, + "construction_blueprint": "fbmsw_brewery0_construction_southwest", + "blueprint_name": "SW brewery", + "blueprint_parameter_names": { + "fbmsw_construction_palette": { + "fbmsw_log_palette": "Log walls and wooden roof", + "fbmsw_metal_palette": "Metal walls and roof", + "fbmsw_migo_resin_palette": "Mi-go resin walls and roof", + "fbmsw_rammed_earth_palette": "Rammed earth walls and sod roof", + "fbmsw_rock_palette": "Rock walls and wooden roof", + "fbmsw_wad_palette": "Wattle-and-daub walls and sod roof", + "fbmsw_wood_palette": "Wooden walls and wooden roof" + } + }, + "blueprint_requires": [ { "id": "fbmsw_0" } ], + "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], + "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] + } +] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_log.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_log.json deleted file mode 100644 index 3724b3e1ac40b..0000000000000 --- a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_log.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_saltpan_log_northeast", - "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a log building.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_saltpan_log_northeast", - "blueprint_name": "NE log wall saltpan", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], - "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_shack_log_southeast", - "description": "We could use a storage room for chemicals and tools, so build a log shack with a roof on the southeast side of the saltworks field.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_shack_log_southeast", - "blueprint_name": "SE log wall storage room", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southeast" } ], - "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_brewery0_log_southwest", - "description": "We could take advantage of the designation of this area to build a log brewery.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_brewery0_log_southwest", - "blueprint_name": "SW log wall brewery", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], - "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] - } -] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_metal.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_metal.json deleted file mode 100644 index bd9dea78f8390..0000000000000 --- a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_metal.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_saltpan_metal_northeast", - "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a metal shed.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_saltpan_metal_northeast", - "blueprint_name": "NE metal wall saltpan", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], - "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_shack_metal_southeast", - "description": "We could use a storage room for chemicals and tools, so build a metal shack with a roof on the southeast side of the saltworks field.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_shack_metal_southeast", - "blueprint_name": "SE metal wall storage room", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southeast" } ], - "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_brewery0_metal_southwest", - "description": "We could take advantage of the designation of this area to build a metal wall brewery.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_brewery0_metal_southwest", - "blueprint_name": "SW metal wall brewery", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], - "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] - } -] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_migo_resin.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_migo_resin.json deleted file mode 100644 index ab0e21f0a41a6..0000000000000 --- a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_migo_resin.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_saltpan_migo_resin_northeast", - "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in an adobe hut.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_saltpan_migo_resin_northeast", - "blueprint_name": "NE migo resin saltpan", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], - "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_shack_migo_resin_southeast", - "description": "We could use a storage room for chemicals and tools, so build an adobe shack with a roof on the southeast side of the saltworks field.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_shack_migo_resin_southeast", - "blueprint_name": "SE migo resin storage room", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southeast" } ], - "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_brewery0_migo_resin_southwest", - "description": "We could take advantage of the designation of this area to build an migo resin brewery.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_brewery0_migo_resin_southwest", - "blueprint_name": "SW migo resin brewery", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], - "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] - } -] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_rammed_earth.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_rammed_earth.json deleted file mode 100644 index 4161969d3dd07..0000000000000 --- a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_rammed_earth.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_saltpan_rammed_earth_northeast", - "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in an adobe hut.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_saltpan_rammed_earth_northeast", - "blueprint_name": "NE rammed earth saltpan", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], - "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_shack_rammed_earth_southeast", - "description": "We could use a storage room for chemicals and tools, so build an adobe shack with a roof on the southeast side of the saltworks field.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_shack_rammed_earth_southeast", - "blueprint_name": "SE rammed earth storage room", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southeast" } ], - "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_brewery0_rammed_earth_southwest", - "description": "We could take advantage of the designation of this area to build an rammed earth brewery.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_brewery0_rammed_earth_southwest", - "blueprint_name": "SW rammed earth brewery", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], - "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] - } -] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_stone.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_stone.json deleted file mode 100644 index 9c87d5a369048..0000000000000 --- a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_stone.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_saltpan_rock_northeast", - "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a stone building.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_saltpan_rock_northeast", - "blueprint_name": "NE stone wall saltpan", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], - "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_shack_rock_southeast", - "description": "We could use a storage room for chemicals and tools, so build a stone wall shack with a roof on the southeast side of the saltworks field.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_shack_rock_southeast", - "blueprint_name": "SE stone wall storage room", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southeast" } ], - "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_brewery0_rock_southwest", - "description": "We could take advantage of the designation of this area to build a stone brewery.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_brewery0_rock_southwest", - "blueprint_name": "SW stone wall brewery", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], - "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] - } -] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wad.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wad.json deleted file mode 100644 index 45c1463c0339d..0000000000000 --- a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wad.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_saltpan_wad_northeast", - "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in an adobe hut.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_saltpan_wad_northeast", - "blueprint_name": "NE wattle and daub saltpan", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], - "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_shack_wad_southeast", - "description": "We could use a storage room for chemicals and tools, so build an adobe shack with a roof on the southeast side of the saltworks field.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_shack_wad_southeast", - "blueprint_name": "SE wattle and daub storage room", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southeast" } ], - "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_brewery0_wad_southwest", - "description": "We could take advantage of the designation of this area to build an wattle and daub brewery.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_brewery0_wad_southwest", - "blueprint_name": "SW wattle and daub brewery", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], - "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] - } -] diff --git a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wood.json b/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wood.json deleted file mode 100644 index c5e7b97fa64c4..0000000000000 --- a/data/json/recipes/basecamps/expansion/recipe_modular_saltworks/version_1/recipe_modular_saltworks_wood.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_saltpan_wood_northeast", - "description": "We could divert saltwater from the swamp nearby to create a steady supply of salt for our needs in a wooden shed.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_saltpan_wood_northeast", - "blueprint_name": "NE wood panel saltpan", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_northeast" }, { "id": "Salt_Pan" }, { "id": "kitchen" }, { "id": "saltworks_recipes_1" } ], - "blueprint_excludes": [ { "id": "fbmsw_northeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_shack_wood_southeast", - "description": "We could use a storage room for chemicals and tools, so build a wood panel shack with a roof on the southeast side of the saltworks field.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_shack_wood_southeast", - "blueprint_name": "SE wood panel storage room", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southeast" } ], - "blueprint_excludes": [ { "id": "fbmsw_southeast" } ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "faction_base_modular_brewery0_wood_southwest", - "description": "We could take advantage of the designation of this area to build a wooden brewery.", - "category": "CC_BUILDING", - "subcategory": "CSC_BUILDING_BASES", - "autolearn": false, - "never_learn": true, - "construction_blueprint": "fbmsw_brewery0_wood_southwest", - "blueprint_name": "SW wood panel brewery", - "blueprint_requires": [ { "id": "fbmsw_0" } ], - "blueprint_provides": [ { "id": "fbmsw_southwest" }, { "id": "saltworks_recipes_2" }, { "id": "brewery" } ], - "blueprint_excludes": [ { "id": "fbmsw_southwest" } ] - } -] From 9f79be457eb17256f1f887785bdc5ec158543f0a Mon Sep 17 00:00:00 2001 From: John Candlebury Date: Sat, 25 May 2024 15:56:25 -0600 Subject: [PATCH 8/8] Aftershock: Basic Hacking EOCs (#74066) * Aftershock: Basic Hacking EOCs * Update data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json --- .../Aftershock/EOC/_reusable_conditions.json | 10 +++ data/mods/Aftershock/EOC/hacking_eoc.json | 61 +++++++++++++++++++ data/mods/Aftershock/effects.json | 4 ++ .../furniture_habitat.json | 17 +++++- data/mods/Aftershock/ter_fur_transform.json | 13 ++++ 5 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 data/mods/Aftershock/EOC/_reusable_conditions.json create mode 100644 data/mods/Aftershock/EOC/hacking_eoc.json diff --git a/data/mods/Aftershock/EOC/_reusable_conditions.json b/data/mods/Aftershock/EOC/_reusable_conditions.json new file mode 100644 index 0000000000000..dd33338c215c1 --- /dev/null +++ b/data/mods/Aftershock/EOC/_reusable_conditions.json @@ -0,0 +1,10 @@ +{ + "type": "effect_on_condition", + "id": "EOC_CONDITION_can_hack", + "condition": { + "and": [ { "u_has_item": "electrohack" }, "u_can_see" ] + }, + "effect": [ + + ] +} diff --git a/data/mods/Aftershock/EOC/hacking_eoc.json b/data/mods/Aftershock/EOC/hacking_eoc.json new file mode 100644 index 0000000000000..9695a42489465 --- /dev/null +++ b/data/mods/Aftershock/EOC/hacking_eoc.json @@ -0,0 +1,61 @@ +[ + { + "id": "ACT_afs_hack", + "type": "activity_type", + "activity_level": "NO_EXERCISE", + "verb": "hacking", + "based_on": "time", + "can_resume": false, + "completion_eoc": "EOC_finish_afs_hack" + }, + { + "id": "EOC_finish_afs_hack", + "type": "effect_on_condition", + "effect": [ { "u_add_effect": "afs_hack_done", "duration": "3 seconds" }, { "turn_cost": "1 s" } ] + }, + { + "type": "jmath_function", + "id": "afs_hack_skill", + "num_args": 1, + "return": "(u_skill('computer') + u_val('intelligence')/3 + u_hack_bonus) * (_0)" + }, + { + "type": "jmath_function", + "id": "afs_hack_time_adjust", + "num_args": 3, + "return": "_0 - _1 * afs_hack_skill(1) < _2 ? _2 : _0 - _1* afs_hack_skill(1)" + }, + { + "type": "effect_on_condition", + "id": "EOC_afs_hack_unlock", + "condition": { "and": [ { "expects_vars": [ "furn_pos", "difficulty" ] }, { "u_has_effect": "afs_hack_done" } ] }, + "effect": [ + { + "run_eocs": [ + { + "id": "_EOC_afs_hack_unlock", + "condition": { "roll_contested": { "math": [ "afs_hack_skill(1)" ] }, "die_size": 4, "difficulty": { "context_val": "difficulty" } }, + "effect": [ { "u_transform_radius": 0, "ter_furn_transform": "afs_multi_unlock", "target_var": { "context_val": "furn_pos" } } ], + "false_effect": { "u_message": "You fail to override the device." } + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_start_lock_hack", + "condition": { "and": [ { "expects_vars": [ "furn_pos", "t_delay", "difficulty" ] }, { "test_eoc": "EOC_CONDITION_can_hack" } ] }, + "effect": [ + { "math": [ "_t_delay", "=", "afs_hack_time_adjust(_t_delay, time('20s'), time('2m'))" ] }, + { "u_message": "You connect to the lock controller." }, + { "u_assign_activity": "ACT_afs_hack", "duration": { "context_val": "t_delay" } }, + { + "queue_eoc_with": "EOC_afs_hack_unlock", + "time_in_future": { "context_val": "t_delay" }, + "variables": { "furn_pos": { "context_val": "furn_pos" }, "difficulty": { "context_val": "difficulty" } } + } + ], + "false_effect": { "u_message": "You need either an electrohack or working computer to attempt a hack.", "popup": true } + } +] diff --git a/data/mods/Aftershock/effects.json b/data/mods/Aftershock/effects.json index 81eae2a358926..0af0100fafd60 100644 --- a/data/mods/Aftershock/effects.json +++ b/data/mods/Aftershock/effects.json @@ -247,6 +247,10 @@ "type": "effect_type", "id": "afs_medigel_eff_trigger" }, + { + "type": "effect_type", + "id": "afs_hack_done" + }, { "type": "effect_type", "id": "afs_combat_stims", 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 d5998a0c7ca09..32095b43deac5 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json @@ -157,7 +157,6 @@ "required_str": 5, "crafting_pseudo_item": "mirror", "flags": [ "NOITEM", "BLOCKSDOOR" ], - "examine_action": "change_appearance", "deconstruct": { "items": [ { "item": "large_lcd_screen", "count": 1 }, @@ -222,6 +221,22 @@ "coverage": 60, "oxytorch": { "result": "f_intermodal_crate_open", "duration": "14 seconds" }, "flags": [ "TRANSPARENT", "MOUNTABLE", "SHORT", "SMALL_HIDE", "PLACE_ITEM", "CONTAINER", "SEALED" ], + "examine_action": { + "type": "effect_on_condition", + "effect_on_conditions": [ + { + "id": "EOC_unlock_afs_crate", + "effect": [ + { "math": [ "_t_delay", "=", "time('20 m')" ] }, + { + "run_eoc_with": "EOC_start_lock_hack", + "variables": { "furn_pos": { "context_val": "pos" }, "t_delay": { "context_val": "t_delay" }, "difficulty": "9" }, + "alpha_talker": "avatar" + } + ] + } + ] + }, "bash": { "str_min": 40, "str_max": 200, diff --git a/data/mods/Aftershock/ter_fur_transform.json b/data/mods/Aftershock/ter_fur_transform.json index cc84f0020d63a..d8c025d2f9a77 100644 --- a/data/mods/Aftershock/ter_fur_transform.json +++ b/data/mods/Aftershock/ter_fur_transform.json @@ -1,4 +1,17 @@ [ + { + "type": "ter_furn_transform", + "//": "Used for unlocking all hackable furniture in the mod.", + "id": "afs_multi_unlock", + "furniture": [ + { + "result": "f_intermodal_crate_open", + "valid_furniture": [ "f_sealed_intermodal_crate" ], + "message": "The shipping crate bolts slide back and the lid pops open.", + "message_good": true + } + ] + }, { "type": "ter_furn_transform", "id": "transform_gratings",