diff --git a/data/json/overmap/overmap_terrain/overmap_terrain.json b/data/json/overmap/overmap_terrain/overmap_terrain.json index 086919a1b0efc..88f9580bd3ede 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain.json @@ -5,6 +5,7 @@ "name": "nothing", "sym": "%", "color": "white", + "vision_levels": "always_full", "flags": [ "NO_ROTATE" ] }, { @@ -13,6 +14,7 @@ "name": "Unexplored", "sym": "#", "color": "dark_gray", + "vision_levels": "always_full", "flags": [ "NO_ROTATE", "SHOULD_NOT_SPAWN" ] }, { @@ -22,6 +24,7 @@ "name": "nether-chewed field", "sym": "%", "color": "dark_gray", + "vision_levels": "always_full", "flags": [ "NO_ROTATE", "SHOULD_NOT_SPAWN" ] }, { @@ -30,6 +33,7 @@ "name": "city building", "sym": "^", "see_cost": 5, + "vision_levels": "city_building", "extras": "build", "mondensity": 2, "flags": [ "RISK_HIGH", "GENERIC_LOOT" ] @@ -46,6 +50,7 @@ "name": "solid earth", "sym": "#", "color": "brown", + "vision_levels": "always_full", "see_cost": 5, "travel_cost_type": "impassable", "flags": [ "NO_ROTATE" ] @@ -58,6 +63,7 @@ "looks_like": "empty_rock", "sym": "%", "color": "dark_gray", + "vision_levels": "always_full", "see_cost": 5, "travel_cost_type": "impassable", "flags": [ "NO_ROTATE" ] @@ -85,6 +91,7 @@ "name": "boat rental", "sym": "#", "color": "white", + "vision_levels": "isolated_building", "see_cost": 5, "extras": "build", "mondensity": 1, @@ -96,6 +103,7 @@ "name": "lighthouse", "sym": "0", "color": "yellow", + "vision_levels": "isolated_tower", "see_cost": 5, "flags": [ "RISK_LOW", "SOURCE_SAFETY" ] }, @@ -105,6 +113,7 @@ "name": "lighthouse", "sym": "0", "color": "yellow", + "vision_levels": "isolated_tower", "see_cost": 5 }, { @@ -114,6 +123,7 @@ "sym": "&", "color": "yellow", "see_cost": 5, + "vision_levels": "isolated_tower", "flags": [ "RISK_LOW", "SOURCE_SAFETY" ] }, { @@ -123,6 +133,7 @@ "sym": "0", "color": "yellow", "see_cost": 5, + "vision_levels": "isolated_tower", "flags": [ "RISK_LOW", "SOURCE_SAFETY" ] }, { @@ -131,12 +142,14 @@ "name": "small lighthouse", "sym": "0", "color": "yellow", + "vision_levels": "isolated_tower", "see_cost": 5 }, { "type": "overmap_terrain", "id": "island_sand", "name": "island", + "vision_levels": "island", "sym": ".", "color": "yellow", "see_cost": 1 @@ -146,6 +159,7 @@ "id": [ "island_forest", "island_forest_thick" ], "name": "island", "sym": "F", + "vision_levels": "island", "color": "green", "looks_like": "forest", "see_cost": 1 @@ -155,6 +169,7 @@ "id": "island_forest_water", "name": "island", "sym": "F", + "vision_levels": "island", "color": "cyan", "looks_like": "forest_water", "see_cost": 1 @@ -163,6 +178,7 @@ "type": "overmap_terrain", "id": "island_field", "name": "island", + "vision_levels": "island", "sym": ".", "color": "brown", "looks_like": "field", @@ -172,6 +188,7 @@ "type": "overmap_terrain", "id": "cabin_isherwood", "name": "cabin", + "vision_levels": "isolated_building", "sym": "C", "color": "i_green", "see_cost": 5 @@ -189,6 +206,7 @@ "riverside_dwelling3_roof" ], "name": "riverside dwelling", + "vision_levels": "isolated_building", "sym": "+", "color": "i_yellow", "see_cost": 5, @@ -199,6 +217,7 @@ { "type": "overmap_terrain", "id": [ "cabin_lake", "lake_cabin_boathouse", "cabin_strange" ], + "vision_levels": "isolated_building", "name": "cabin", "sym": "C", "color": "i_green", @@ -208,6 +227,7 @@ { "type": "overmap_terrain", "id": [ "lake_cabin_water" ], + "vision_levels": "water_body", "name": "lake", "sym": "#", "color": "blue", @@ -216,6 +236,7 @@ { "type": "overmap_terrain", "id": [ "cabin_lake_roof", "lake_cabin_boathouse_roof" ], + "vision_levels": "roof_or_air", "name": "cabin roof", "sym": "C", "color": "i_green", @@ -224,6 +245,7 @@ { "type": "overmap_terrain", "id": "cabin_strange_b", + "vision_levels": "underground_dirt", "name": "cabin basement", "sym": "C", "color": "i_green", @@ -233,6 +255,7 @@ { "type": "overmap_terrain", "id": "cabin_strange_roof", + "vision_levels": "roof_or_air", "name": "cabin roof", "sym": "C", "color": "i_green", @@ -256,6 +279,7 @@ "name": "cabin", "sym": "C", "color": "i_green", + "vision_levels": "isolated_building", "see_cost": 5, "extras": "build", "mondensity": 2, @@ -265,6 +289,7 @@ "type": "overmap_terrain", "id": [ "cabin_liam" ], "name": "cabin", + "vision_levels": "isolated_building", "sym": "C", "color": "i_green", "see_cost": 5, @@ -286,6 +311,7 @@ "cabin_roof_lapin", "bandit_cabin_roof" ], + "vision_levels": "roof_or_air", "name": "cabin roof", "sym": "C", "color": "i_green", @@ -316,6 +342,7 @@ "id": [ "lodge_ground1", "lodge_ground2" ], "name": "hunting lodge", "sym": "L", + "vision_levels": "isolated_building", "copy-from": "generic_forest", "color": "light_green", "see_cost": 4, @@ -326,6 +353,7 @@ "id": [ "lodge_ground_glooscap1", "lodge_ground_glooscap2" ], "name": "hunting lodge", "sym": "L", + "vision_levels": "isolated_building", "copy-from": "generic_forest", "color": "light_green", "see_cost": 4, @@ -335,6 +363,7 @@ "type": "overmap_terrain", "id": [ "lodge_2ndfloor1", "lodge_2ndfloor2" ], "name": "second floor hunting lodge", + "vision_levels": "isolated_building", "copy-from": "generic_forest", "sym": "L", "see_cost": 4, @@ -344,6 +373,7 @@ "type": "overmap_terrain", "id": [ "lodge_roof1", "lodge_roof2" ], "name": "hunting lodge roof", + "vision_levels": "roof_or_air", "copy-from": "generic_forest", "sym": "L", "see_cost": 4, @@ -358,6 +388,7 @@ "lodge_basement_residential4" ], "name": "hunting lodge basement", + "vision_levels": "underground_dirt", "copy-from": "generic_forest", "sym": "L", "see_cost": 4, @@ -373,6 +404,7 @@ "type": "overmap_terrain", "id": "dirtroad1_aban1", "name": "forest", + "vision_levels": "forested", "sym": "F", "color": "green", "see_cost": 4 @@ -380,6 +412,7 @@ { "type": "overmap_terrain", "id": [ "forest_aban1", "dirtroad2_aban1", "dirtplaza_aban1" ], + "vision_levels": "forested", "name": "forest", "sym": "F", "color": "green", @@ -388,6 +421,7 @@ { "type": "overmap_terrain", "id": [ "cabin_aban1", "cabin_aban1_roof" ], + "vision_levels": "forested", "name": "ruined cabin", "sym": "F", "color": "green", @@ -397,6 +431,7 @@ { "type": "overmap_terrain", "id": [ "barn_aban1", "barn_aban1_roof" ], + "vision_levels": "forested", "name": "barn", "sym": "F", "color": "green", @@ -406,6 +441,7 @@ { "type": "overmap_terrain", "id": [ "car_corner_aban1", "car_corner_aban1_roof" ], + "vision_levels": "forested", "name": "car corner", "sym": "F", "color": "green", @@ -414,6 +450,7 @@ { "type": "overmap_terrain", "id": [ "shipwreck_river_1", "shipwreck_river_2", "shipwreck_river_3", "shipwreck_river_4" ], + "vision_levels": "wreckage", "name": "shipwreck", "sym": "w", "color": "red", @@ -422,6 +459,7 @@ }, { "type": "overmap_terrain", + "vision_levels": "natural_depression", "id": "crater", "name": "crater", "sym": "o", @@ -446,6 +484,7 @@ "radio_tower_1", "radio_tower_roof_1" ], + "vision_levels": "isolated_tower", "name": "radio tower", "sym": "X", "color": "light_gray", @@ -463,6 +502,7 @@ "wasp_tower_even_2", "wasp_tower_top" ], + "vision_levels": "isolated_tower", "name": "radio tower", "sym": "X", "color": "light_gray", @@ -473,6 +513,7 @@ { "type": "overmap_terrain", "id": [ "wind_turbine_ground", "wind_turbine_pillar", "wind_turbine_pillar_platform", "wind_turbine_roof" ], + "vision_levels": "isolated_tower", "name": "wind turbine", "sym": "o", "color": "light_gray" @@ -480,6 +521,7 @@ { "type": "overmap_terrain", "id": [ "wind_turbine_nacelle" ], + "vision_levels": "isolated_tower", "name": "wind turbine", "sym": "Y", "color": "white" @@ -496,6 +538,7 @@ "bandit_camp_3_roof", "bandit_camp_4_roof" ], + "vision_levels": "isolated_building", "name": "wooden fort", "sym": "+", "color": "brown", @@ -518,6 +561,7 @@ "bandit_farm_8", "bandit_farm_7" ], + "vision_levels": "isolated_building", "name": "farm", "sym": "#", "color": "brown", @@ -581,6 +625,7 @@ { "type": "overmap_terrain", "id": [ "campsite", "campsite_a" ], + "vision_levels": "blends_till_details", "name": "campsite", "sym": "+", "color": "green", @@ -592,6 +637,7 @@ "type": "overmap_terrain", "id": "campsite_cabin_incomplete", "name": "incomplete cabin", + "vision_levels": "isolated_building", "sym": "+", "color": "light_green", "see_cost": 5, @@ -601,6 +647,7 @@ { "type": "overmap_terrain", "id": "campsite_cabin_incomplete_roof", + "vision_levels": "roof_or_air", "name": "incomplete cabin roof", "sym": "+", "color": "light_green", @@ -610,6 +657,7 @@ { "type": "overmap_terrain", "id": [ "campsite_field_biker", "campsite_field_biker_destroyed" ], + "vision_levels": "blends_till_details", "name": "field campsite", "sym": "+", "color": "light_green", @@ -621,6 +669,7 @@ "type": "overmap_terrain", "id": "pond_field", "name": "pond", + "vision_levels": "single_water", "sym": ".", "color": "blue", "see_cost": 5, @@ -630,6 +679,7 @@ "type": "overmap_terrain", "id": "hot_springs", "name": "hot spring", + "vision_levels": "single_water", "sym": ".", "color": "light_blue", "see_cost": 5, @@ -638,6 +688,7 @@ { "type": "overmap_terrain", "id": [ "hunter_shack", "hunter_shack_1" ], + "vision_levels": "isolated_building", "name": "swamp shack", "sym": "+", "color": "i_cyan", @@ -648,6 +699,7 @@ "type": "overmap_terrain", "id": [ "survivor_forest_camp" ], "name": "survivor forest camp", + "vision_levels": "blends_till_details", "sym": "+", "color": "green", "see_cost": 5, @@ -656,6 +708,7 @@ { "type": "overmap_terrain", "id": [ "hunter_shack_roof", "hunter_shack_roof_1" ], + "vision_levels": "roof_or_air", "name": "swamp shack roof", "sym": "+", "color": "i_cyan", @@ -664,6 +717,7 @@ { "type": "overmap_terrain", "id": [ "drug_lab", "bandit_drug_lab" ], + "vision_levels": "isolated_building", "name": "drug lab", "sym": "^", "color": "brown", @@ -672,6 +726,7 @@ { "type": "overmap_terrain", "id": "drug_lab_roof", + "vision_levels": "roof_or_air", "name": "drug lab roof", "sym": "^", "color": "brown", @@ -681,6 +736,7 @@ "type": "overmap_terrain", "id": [ "campground_1a", "campground_1b", "campground_2a", "campground_2b" ], "name": "campground", + "vision_levels": "blends_till_details", "sym": "+", "color": "i_green", "see_cost": 5, @@ -690,6 +746,7 @@ { "type": "overmap_terrain", "id": "campground_roof", + "vision_levels": "roof_or_air", "name": "campground roof", "sym": "+", "color": "i_green", @@ -700,6 +757,7 @@ "type": "overmap_terrain", "id": [ "godco_1", "godco_2", "godco_3", "godco_4", "godco_5", "godco_6", "godco_7", "godco_8", "godco_9" ], "name": "church retreat", + "vision_levels": "isolated_building", "sym": "+", "color": "i_green", "see_cost": 5, @@ -721,6 +779,7 @@ "godco_2_2", "godco_1_3" ], + "vision_levels": "isolated_building", "name": "church retreat roof", "sym": "+", "color": "i_green", @@ -730,6 +789,7 @@ "type": "overmap_terrain", "id": "desolatebarn", "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "isolated_building", "name": "desolate barn", "sym": "B", "color": "brown", @@ -738,6 +798,7 @@ { "type": "overmap_terrain", "id": [ "bandit_garage_1", "bandit_garage_2", "bandit_garage_1_roof", "bandit_garage_2_roof" ], + "vision_levels": "isolated_building", "name": "garage", "sym": "O", "color": "white", @@ -747,6 +808,7 @@ { "type": "overmap_terrain", "abstract": "generic_giant_sinkhole", + "vision_levels": "natural_depression", "sym": "O", "color": "brown", "flags": [ "REQUIRES_PREDECESSOR" ] @@ -783,6 +845,7 @@ "irradiator_1_7", "irradiator_1_9" ], + "vision_levels": "large_building", "name": "irradiation plant", "sym": "i", "color": "light_green", @@ -791,6 +854,7 @@ { "type": "overmap_terrain", "id": "irradiator_1_8", + "vision_levels": "large_building", "name": "irradiation plant", "sym": "I", "color": "light_green", @@ -810,6 +874,7 @@ "irradiator_1_9_roof" ], "name": "irradiation plant", + "vision_levels": "roof_or_air", "sym": "i", "color": "light_green", "see_cost": 5 @@ -817,6 +882,7 @@ { "type": "overmap_terrain", "id": "irradiator_1_8_roof", + "vision_levels": "roof_or_air", "name": "irradiation plant", "sym": "I", "color": "light_green", @@ -846,6 +912,7 @@ "name": "field", "sym": ".", "color": "brown", + "vision_levels": "open_land", "see_cost": 1 }, { @@ -861,6 +928,7 @@ "airliner_2c_-1" ], "name": "crashed airliner", + "vision_levels": "wreckage", "sym": "A", "color": "red", "see_cost": 5 @@ -868,6 +936,7 @@ { "type": "overmap_terrain", "id": [ "airliner_1b", "airliner_3c" ], + "vision_levels": "wreckage", "name": "wreckage", "sym": "A", "color": "light_gray", @@ -888,11 +957,13 @@ "name": "crash trail", "sym": ",", "color": "brown", + "vision_levels": "open_land", "see_cost": 2 }, { "type": "overmap_terrain", "id": [ "wasp_tower_roof" ], + "vision_levels": "roof_or_air", "name": "open air", "sym": ".", "color": "blue", @@ -902,6 +973,7 @@ "type": "overmap_terrain", "id": "lab_subway_vent_shaft-1", "name": "ventilation shaft", + "vision_levels": "underground_dirt", "sym": "#", "color": "brown", "see_cost": 5, @@ -910,6 +982,7 @@ { "type": "overmap_terrain", "id": [ "lab_subway_vent_shaft-2", "lab_subway_vent_shaft-3", "lab_subway_vent_shaft-4" ], + "vision_levels": "underground_stone", "name": "ventilation shaft", "sym": "%", "color": "dark_gray", @@ -919,6 +992,7 @@ { "type": "overmap_terrain", "abstract": "generic_bastion_fort", + "vision_levels": "large_building", "name": "bastion fort", "sym": "F", "color": "red" @@ -965,6 +1039,7 @@ { "type": "overmap_terrain", "id": [ "nest_dermatik", "nest_dermatik_roof" ], + "vision_levels": "natural_outcropping", "name": "mound of dirt", "sym": "O", "color": "brown", @@ -974,6 +1049,7 @@ "type": "overmap_terrain", "id": "rock_border", "name": "rock border", + "vision_levels": "always_full", "sym": "#", "color": "white", "flags": [ "NO_ROTATE" ], @@ -983,6 +1059,7 @@ "type": "overmap_terrain", "id": "spider_pit", "name": "spider pit", + "vision_levels": "blends_till_details", "sym": "S", "color": "white", "see_cost": 3, @@ -991,6 +1068,7 @@ { "type": "overmap_terrain", "id": "spider_pit_under", + "vision_levels": "underground_dirt", "name": "cavern", "looks_like": "cave_underground", "sym": "0", @@ -1000,6 +1078,7 @@ { "type": "overmap_terrain", "id": [ "chemical_lab_ocu", "chemical_lab_roof_ocu" ], + "vision_levels": "isolated_building", "name": "small cabin", "sym": "C", "color": "i_green", @@ -1008,6 +1087,7 @@ { "type": "overmap_terrain", "id": [ "smallscrapyard_ocu" ], + "vision_levels": "isolated_building", "name": "scrap yard", "sym": "s", "color": "red" @@ -1015,6 +1095,7 @@ { "type": "overmap_terrain", "id": [ "smallscrapyard_ocu_roof" ], + "vision_levels": "roof_or_air", "name": "scrap yard roof", "sym": "s", "color": "red" @@ -1022,6 +1103,7 @@ { "type": "overmap_terrain", "id": [ "lumbermill_0_0_ocu", "lumbermill_0_1_ocu", "lumbermill_1_0_ocu", "lumbermill_1_1_ocu" ], + "vision_levels": "isolated_building", "name": "lumbermill", "sym": "L", "color": "i_green", @@ -1049,6 +1131,7 @@ "hive_edge_12_roof", "hive_edge_22_roof" ], + "vision_levels": "unusual_structure", "name": "bee hive", "sym": "8", "color": "yellow", @@ -1059,6 +1142,7 @@ "type": "overmap_terrain", "id": "field_graboid", "looks_like": "field", + "vision_levels": "open_land", "name": "field", "sym": ".", "color": "brown", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_LIXA.json b/data/json/overmap/overmap_terrain/overmap_terrain_LIXA.json index 31c9b01f57eba..21982a1668ba2 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_LIXA.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_LIXA.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "id": [ "LIXA_surface_1a", "LIXA_surface_2a", "LIXA_surface_1b", "LIXA_surface_2b" ], "name": "research facility", + "vision_levels": "large_building", "sym": "l", "color": "light_gray", "see_cost": 5 @@ -10,6 +11,7 @@ { "type": "overmap_terrain", "id": [ "LIXA_roof_1a", "LIXA_roof_2a", "LIXA_roof_1b", "LIXA_roof_2b" ], + "vision_levels": "roof_or_air", "name": "research facility roof", "sym": "l", "color": "light_gray", @@ -19,6 +21,7 @@ "type": "overmap_terrain", "id": [ "LIXA_entry_1", "LIXA_entry_2" ], "name": "research facility gate", + "vision_levels": "large_building", "sym": "l", "color": "light_gray", "see_cost": 5 @@ -26,6 +29,7 @@ { "type": "overmap_terrain", "id": [ "LIXA_road" ], + "copy-from": "road_abstract", "name": "research facility access road", "sym": "l", "color": "light_gray", @@ -35,6 +39,7 @@ "type": "overmap_terrain", "id": [ "LIXA_road_guard", "LIXA_road_guard_roof" ], "name": "research facility checkpoint", + "vision_levels": "large_building", "sym": "l", "color": "light_gray", "see_cost": 5 @@ -52,6 +57,7 @@ "LIXA_stairshaft_2d" ], "name": "LIXA experiment floor access", + "vision_levels": "underground_stone", "sym": "l", "color": "light_gray", "see_cost": 5 @@ -59,6 +65,7 @@ { "type": "overmap_terrain", "id": [ "LIXA_workfloor_1a", "LIXA_workfloor_2a", "LIXA_workfloor_1b", "LIXA_workfloor_2b" ], + "vision_levels": "underground_stone", "name": "LIXA research floor", "sym": "L", "color": "light_blue", @@ -68,6 +75,7 @@ "type": "overmap_terrain", "id": [ "LIXA_device_1", "LIXA_device_2", "LIXA_device_3", "LIXA_device_2_roof", "LIXA_device_3_roof" ], "name": "LIXA device floor", + "vision_levels": "underground_stone", "sym": "L", "color": "light_blue", "see_cost": 5 @@ -75,6 +83,7 @@ { "type": "overmap_terrain", "id": [ "LIXA_device_unfolded_A", "LIXA_device_unfolded_B", "LIXA_device_unfolded_noaccess" ], + "vision_levels": "underground_stone", "name": "unfolded space", "sym": "!", "color": "white", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_abstract.json b/data/json/overmap/overmap_terrain/overmap_terrain_abstract.json index 3dc7ed33080e8..81226bde738a3 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_abstract.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_abstract.json @@ -2,12 +2,14 @@ { "type": "overmap_terrain", "abstract": "generic_cropland", + "vision_levels": "open_land", "name": "generic_cropland", "land_use_code": "cropland" }, { "type": "overmap_terrain", "abstract": "generic_pasture", + "vision_levels": "open_land", "name": "generic_pasture", "land_use_code": "pasture" }, @@ -15,12 +17,14 @@ "type": "overmap_terrain", "abstract": "generic_forest", "name": "generic_forest", + "vision_levels": "forested", "land_use_code": "forest", "connect_group": "forest" }, { "type": "overmap_terrain", "abstract": "generic_wetland", + "vision_levels": "forested_swampy", "name": "generic_wetland", "land_use_code": "wetland" }, @@ -33,6 +37,7 @@ { "type": "overmap_terrain", "abstract": "generic_open_land", + "vision_levels": "open_land", "name": "generic_open_land", "land_use_code": "open_land" }, @@ -99,12 +104,14 @@ { "type": "overmap_terrain", "abstract": "generic_transitional", + "vision_levels": "blends_till_details", "name": "generic_transitional", "land_use_code": "transitional" }, { "type": "overmap_terrain", "abstract": "generic_transportation", + "vision_levels": "blends_till_outlines", "name": "generic_transportation", "land_use_code": "transportation" }, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json b/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json index 6cd8b2c754532..ed1accf76fbb1 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_agricultural.json @@ -4,6 +4,7 @@ "abstract": "generic_rural_road", "name": "rural road", "color": "brown", + "vision_levels": "blends_till_details", "travel_cost_type": "dirt_road", "see_cost": 2, "mondensity": 2, @@ -28,6 +29,7 @@ "name": "rural building", "sym": "#", "color": "i_brown", + "vision_levels": "isolated_building", "delete": { "flags": [ "RISK_HIGH" ] }, "extend": { "flags": [ "SOURCE_FOOD", "SOURCE_SAFETY", "RISK_LOW", "SOURCE_FARMING" ] } }, @@ -91,6 +93,7 @@ "farm_9" ], "copy-from": "generic_rural_building", + "vision_levels": "farm_field", "name": "farm field" }, { @@ -138,6 +141,7 @@ ], "copy-from": "generic_rural_building", "name": "farm field", + "vision_levels": "farm_field", "see_cost": 2, "extras": "agricultural", "looks_like": "farm_5", @@ -149,6 +153,7 @@ "copy-from": "generic_rural_building", "name": "hay field", "color": "brown", + "vision_levels": "farm_field", "see_cost": 2, "extras": "agricultural", "looks_like": "ranch_camp_76", @@ -248,6 +253,7 @@ "id": "farm_stills_11", "copy-from": "generic_rural_building", "name": "orchard", + "vision_levels": "isolated_building", "spawns": { "group": "GROUP_WASP_FORAGER", "population": [ 1, 4 ], "chance": 10 }, "color": "brown" }, @@ -258,6 +264,7 @@ "name": "apple orchard", "sym": "T", "color": "light_green", + "vision_levels": "first_glance_forest", "looks_like": "forest", "spawns": { "group": "GROUP_WASP_FORAGER", "population": [ 1, 4 ], "chance": 5 }, "mondensity": 3 @@ -269,6 +276,7 @@ "name": "orchard processing", "sym": "T", "color": "i_light_green", + "vision_levels": "isolated_building", "mondensity": 3 }, { @@ -278,6 +286,7 @@ "name": "orchard stall", "sym": "T", "color": "i_light_green", + "vision_levels": "isolated_building", "mondensity": 3 }, { @@ -524,6 +533,7 @@ "id": [ "forest_trail_intersection" ], "copy-from": "generic_rural_building", "name": "forest trail", + "vision_levels": "forested", "sym": "O", "color": "green" }, @@ -531,6 +541,7 @@ "type": "overmap_terrain", "id": [ "moonshine_still", "moonshine_still_1", "moonshine_still_2" ], "copy-from": "generic_rural_building", + "vision_levels": "blends_till_details", "name": "moonshine still", "sym": "S" }, @@ -545,6 +556,7 @@ "type": "overmap_terrain", "id": "TreeFarm_1b", "copy-from": "generic_rural_building", + "vision_levels": "forested", "name": "tree farm", "sym": "T", "spawns": { "group": "GROUP_WASP_FORAGER", "population": [ 1, 2 ], "chance": 20 }, 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 a2b9f7a6156cd..79c78473cdc7d 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_aircraft_carrier.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_aircraft_carrier.json @@ -124,6 +124,7 @@ "aircraft_carrier_1a_4", "aircraft_carrier_2a_4" ], + "vision_levels": "large_ship", "name": "aircraft carrier", "sym": "A", "color": "red", @@ -174,6 +175,7 @@ "aircraft_carrier_13b_-1", "aircraft_carrier_13c_-1" ], + "vision_levels": "large_ship", "name": "aircraft carrier", "sym": "A", "color": "red", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_alien.json b/data/json/overmap/overmap_terrain/overmap_terrain_alien.json index ff1496005b000..09e2426387aef 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_alien.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_alien.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": "exo_safehouse_stone_0", + "vision_levels": "isolated_building", "name": "unusual stone barn", "sym": "^", "color": "brown", @@ -11,24 +12,21 @@ { "type": "overmap_terrain", "id": "exo_safehouse_stone_1", - "name": "unusual stone barn", - "sym": "^", - "color": "brown", - "see_cost": 2, + "copy-from": "exo_safehouse_stone_0", "flags": [ "KNOWN_UP", "KNOWN_DOWN" ] }, { "type": "overmap_terrain", "id": "exo_safehouse_stone_2", + "vision_levels": "roof_or_air", "name": "unusual stone barn roof", - "sym": "^", - "color": "brown", - "see_cost": 2, + "copy-from": "exo_safehouse_stone_0", "flags": [ "KNOWN_DOWN" ] }, { "type": "overmap_terrain", "id": "exo_warehouse_1", + "vision_levels": "isolated_building", "name": "strange warehouse", "sym": "#", "color": "light_gray", @@ -38,15 +36,13 @@ { "type": "overmap_terrain", "id": "exo_warehouse_2", - "name": "strange warehouse", - "sym": "#", - "color": "light_gray", - "see_cost": 2, + "copy-from": "exo_warehouse_1", "flags": [ "KNOWN_DOWN" ] }, { "type": "overmap_terrain", "id": [ "slimepit_bottom" ], + "vision_levels": "underground_dirt", "name": "slime pit", "sym": "~", "color": "light_green", @@ -57,11 +53,13 @@ "type": "overmap_terrain", "id": [ "slimepit_top" ], "copy-from": "slimepit_bottom", + "vision_levels": "natural_depression", "flags": [ "KNOWN_DOWN", "NO_ROTATE", "REQUIRES_PREDECESSOR" ] }, { "type": "overmap_terrain", "id": "exodii_base_x0y0z0", + "vision_levels": "large_outcropping", "name": "rocky butte", "sym": "%", "color": "light_gray", @@ -71,6 +69,7 @@ { "type": "overmap_terrain", "id": "exodii_base_x0y3z0", + "vision_levels": "large_outcropping", "name": "ground-level entrance", "sym": "?", "color": "white", @@ -100,6 +99,7 @@ { "type": "overmap_terrain", "id": "exodii_base_x0y0z1", + "vision_levels": "large_outcropping", "name": "scrap metal encampment", "sym": "%", "color": "light_gray", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_ants.json b/data/json/overmap/overmap_terrain/overmap_terrain_ants.json index 4dcc19cbd341c..277b75df3c22c 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_ants.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_ants.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "id": "anthill", "name": "anthill", + "vision_levels": "natural_outcropping", "sym": "%", "color": "brown", "see_cost": 2, @@ -11,6 +12,7 @@ { "type": "overmap_terrain", "id": "ants_food", + "vision_levels": "underground_dirt", "name": "ant food storage", "sym": "O", "color": "green", @@ -20,6 +22,7 @@ { "type": "overmap_terrain", "id": "acid_ants_food", + "vision_levels": "underground_dirt", "name": "ant food storage", "sym": "O", "color": "green", @@ -71,6 +74,7 @@ { "type": "overmap_terrain", "id": "ants", + "vision_levels": "underground_dirt", "name": "ant tunnel", "color": "brown", "see_cost": 5, @@ -80,6 +84,7 @@ { "type": "overmap_terrain", "id": "acid_ants", + "vision_levels": "underground_dirt", "name": "ant tunnel", "color": "brown", "see_cost": 5, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_campus.json b/data/json/overmap/overmap_terrain/overmap_terrain_campus.json index 251331a34d55a..69fc6cdfe501e 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_campus.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_campus.json @@ -15,6 +15,7 @@ "campus_admin_0_1_3", "campus_admin_0_2_3" ], + "vision_levels": "large_building", "name": "campus admin building", "sym": "A", "color": "red", @@ -49,6 +50,7 @@ "campus_commons_0_3_2", "campus_commons_1_3_2" ], + "vision_levels": "large_building", "name": "campus commons building", "sym": "C", "color": "light_blue", @@ -67,6 +69,7 @@ "campus_commons_0_3_3", "campus_commons_1_3_3" ], + "vision_levels": "roof_or_air", "name": "campus commons roof", "color": "blue", "copy-from": "campus_commons_0_0_0" @@ -91,6 +94,7 @@ "campus_media_1_0_3", "campus_media_1_1_3" ], + "vision_levels": "large_building", "name": "campus media building", "sym": "C", "color": "light_blue", @@ -101,6 +105,7 @@ "type": "overmap_terrain", "id": [ "campus_media_0_0_4", "campus_media_0_1_4", "campus_media_1_0_4", "campus_media_1_1_4" ], "name": "campus media building roof", + "vision_levels": "roof_or_air", "color": "blue", "copy-from": "campus_media_0_0_0" }, @@ -117,6 +122,7 @@ "campus_health_0_1_2", "campus_health_0_2_2" ], + "vision_levels": "large_building", "name": "campus health building", "sym": "C", "color": "red", @@ -126,6 +132,7 @@ { "type": "overmap_terrain", "id": [ "campus_health_0_0_3", "campus_health_0_1_3", "campus_health_0_2_3" ], + "vision_levels": "roof_or_air", "name": "campus health building roof", "copy-from": "campus_health_0_0_0" }, @@ -146,6 +153,7 @@ "campus_lecture_0_3_2" ], "name": "campus lecture hall", + "vision_levels": "large_building", "sym": "C", "color": "light_blue", "see_cost": 5, @@ -155,6 +163,7 @@ "type": "overmap_terrain", "id": [ "campus_lecture_0_0_3", "campus_lecture_0_1_3", "campus_lecture_0_2_3", "campus_lecture_0_3_3" ], "name": "campus lecture hall roof", + "vision_levels": "roof_or_air", "color": "blue", "copy-from": "campus_lecture_0_0_0" }, @@ -182,6 +191,7 @@ "pedestrian_12_9_0", "pedestrian_13_9_0" ], + "vision_levels": "blends_till_details", "name": "campus pedestrian area", "sym": ".", "color": "light_green", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json b/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json index aa0f7db72f9e6..55ae43a705cda 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_commercial.json @@ -92,6 +92,7 @@ "type": "overmap_terrain", "id": [ "office_tower_ne" ], "copy-from": "generic_city_building", + "vision_levels": "large_city_building", "name": "office building", "sym": "T", "color": "i_light_gray" @@ -111,6 +112,7 @@ "office_tower_underground_se" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "large_pavement", "name": "office building parking", "sym": "p", "color": "i_light_gray" @@ -126,6 +128,7 @@ "office_tower_roof_se_roof" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "roof_or_air", "name": "office building roof", "sym": "t", "color": "i_light_gray" @@ -159,6 +162,7 @@ "office_tower_2_a1_tower_lab" ], "name": "office tower", + "vision_levels": "large_city_building", "sym": "t", "color": "i_light_gray", "see_cost": 5, @@ -169,6 +173,7 @@ "type": "overmap_terrain", "id": "office_tower_2_a3", "name": "office courtyard", + "vision_levels": "large_pavement", "sym": "O", "color": "light_gray", "see_cost": 5, @@ -188,6 +193,7 @@ "office_tower_collapse_b_b2" ], "name": "collapsed tower", + "vision_levels": "wreckage", "sym": "t", "color": "i_light_gray", "see_cost": 5, @@ -197,6 +203,7 @@ { "type": "overmap_terrain", "id": "office_tower_collapse_a2", + "vision_levels": "wreckage", "name": "collapsed tower", "sym": "O", "color": "light_gray", @@ -208,6 +215,7 @@ "type": "overmap_terrain", "id": "office_tower_collapse_b_a2", "name": "collapsed tower", + "vision_levels": "wreckage", "sym": "t", "color": "light_gray", "see_cost": 5, @@ -217,6 +225,7 @@ { "type": "overmap_terrain", "id": "office_tower_open_air_corner", + "vision_levels": "roof_or_air", "name": "open air", "sym": ".", "color": "blue" @@ -606,6 +615,7 @@ { "type": "overmap_terrain", "id": [ "bank", "bank_1" ], + "vision_levels": "city_building", "looks_like": "bank", "name": "bank", "sym": "$", @@ -617,6 +627,7 @@ { "type": "overmap_terrain", "id": [ "bank_roof", "bank_roof_1" ], + "vision_levels": "roof_or_air", "name": "bank roof", "looks_like": "bank_roof", "sym": "$", @@ -722,6 +733,7 @@ "megastore_2_2_0" ], "name": "megastore", + "vision_levels": "large_city_building", "sym": "M", "color": "blue", "copy-from": "generic_city_building", @@ -731,6 +743,7 @@ "type": "overmap_terrain", "id": "megastore_1_2_0", "name": "megastore", + "vision_levels": "large_city_building", "sym": "+", "color": "light_blue", "copy-from": "generic_city_building", @@ -768,6 +781,7 @@ "megastore_2_2_1" ], "name": "megastore, second floor", + "vision_levels": "large_city_building", "sym": "M", "color": "blue", "extras": "build", @@ -786,6 +800,7 @@ "megastore_2_2_roof" ], "name": "megastore roof", + "vision_levels": "roof_or_air", "sym": "M", "color": "blue", "extras": "build", @@ -813,6 +828,7 @@ "hotel_tower_flr4_1_6" ], "copy-from": "generic_city_building", + "vision_levels": "large_pavement", "name": "hotel parking", "sym": "h", "color": "light_blue" @@ -848,6 +864,7 @@ "hotel_tower_6_1_9" ], "copy-from": "generic_city_building", + "vision_levels": "large_building", "name": "hotel", "sym": "h", "color": "light_blue" @@ -856,6 +873,7 @@ "type": "overmap_terrain", "id": [ "hotel_tower_1_5", "hotel_tower_roof_1_5", "hotel_tower_1_5B", "hotel_tower_1_5C" ], "copy-from": "generic_city_building", + "vision_levels": "isolated_building", "name": "hotel entrance", "sym": "H", "color": "light_blue" @@ -863,6 +881,7 @@ { "type": "overmap_terrain", "id": [ "hotel_tower_b_1", "hotel_tower_b_2", "hotel_tower_b_3" ], + "vision_levels": "underground_dirt", "copy-from": "generic_city_building_no_sidewalk", "name": "hotel basement", "sym": "B", @@ -872,6 +891,7 @@ "type": "overmap_terrain", "abstract": "generic_motel", "name": "motel", + "vision_levels": "isolated_building", "copy-from": "generic_city_building_no_sidewalk", "sym": "m", "color": "light_blue" @@ -935,6 +955,7 @@ "hdwr_large_1_1_0", "hdwr_large_1_2_0" ], + "vision_levels": "large_city_building", "name": "home improvement superstore", "sym": "H", "color": "light_green_yellow", @@ -952,6 +973,7 @@ "hdwr_large_1_2_1", "hdwr_large_1_1_2" ], + "vision_levels": "roof_or_air", "name": "home improvement superstore roof", "sym": "H", "color": "light_green_yellow", @@ -1299,6 +1321,7 @@ { "type": "overmap_terrain", "abstract": "generic_large_office_tower", + "vision_levels": "large_city_building", "name": "office tower", "copy-from": "generic_city_building", "sym": "T", @@ -1307,6 +1330,7 @@ { "type": "overmap_terrain", "abstract": "generic_office_skyscraper", + "vision_levels": "large_city_building", "name": "office skyscraper", "copy-from": "generic_city_building", "sym": "S", @@ -1316,6 +1340,7 @@ "type": "overmap_terrain", "id": "home_improvement", "name": "home improvement store", + "vision_levels": "large_city_building", "copy-from": "generic_city_building", "color": "yellow_green", "extend": { "flags": [ "SOURCE_FABRICATION", "SOURCE_CONSTRUCTION" ] } @@ -1324,6 +1349,7 @@ "type": "overmap_terrain", "id": "home_improvement_roof", "name": "home improvement store roof", + "vision_levels": "roof_or_air", "copy-from": "generic_city_building", "color": "yellow_green" }, @@ -1354,6 +1380,7 @@ { "type": "overmap_terrain", "id": [ "loffice_tower_17", "loffice_tower_18", "loffice_tower_19", "loffice_tower_20" ], + "vision_levels": "roof_or_air", "name": "open air", "sym": ".", "color": "blue" @@ -1393,6 +1420,7 @@ { "type": "overmap_terrain", "id": [ "office_skyscraper_17", "office_skyscraper_18", "office_skyscraper_19", "office_skyscraper_20" ], + "vision_levels": "roof_or_air", "name": "open air", "sym": ".", "color": "blue" @@ -1674,6 +1702,7 @@ "station_radio_1_tower_odd", "station_radio_1_tower_top" ], + "vision_levels": "isolated_tower", "name": "radio tower", "sym": "X", "color": "light_gray", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_deserter_city.json b/data/json/overmap/overmap_terrain/overmap_terrain_deserter_city.json index 57e889e4c1a17..5d951755df19c 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_deserter_city.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_deserter_city.json @@ -13,6 +13,7 @@ "deserter_city_office_3fb", "deserter_city_office_roofb" ], + "vision_levels": "large_city_building", "name": "deserter outpost", "sym": "D", "color": "brown", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_evac_center.json b/data/json/overmap/overmap_terrain/overmap_terrain_evac_center.json index 0db57912b642a..77e910ca7b644 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_evac_center.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_evac_center.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "abstract": "generic_evac_center", + "vision_levels": "large_building", "name": "refugee center", "see_cost": 5, "flags": [ "SOURCE_PEOPLE" ] @@ -9,6 +10,7 @@ { "type": "overmap_terrain", "abstract": "generic_fence", + "vision_levels": "open_land", "name": "fence", "color": "light_gray" }, @@ -46,6 +48,7 @@ "evac_center_14_z2" ], "name": "refugee center roof", + "vision_levels": "roof_or_air", "sym": "┼", "color": "white", "see_cost": 2 @@ -56,6 +59,7 @@ "see_cost": 2, "name": "field", "looks_like": "field", + "vision_levels": "open_land", "sym": ",", "color": "brown", "flags": [ "NO_ROTATE" ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json b/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json index fc99fd92e9115..9a1ec7001ab70 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_faction_base.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": "faction_base_camp_0", + "vision_levels": "always_full", "name": "camp survey", "sym": "+", "color": "white", @@ -256,6 +257,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_e1", + "vision_levels": "always_full", "name": "mansion base entrance", "sym": "M", "color": "white", @@ -264,6 +266,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_e2", + "vision_levels": "always_full", "name": "mansion base entrance", "sym": "M", "color": "white", @@ -272,6 +275,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_t1", + "vision_levels": "always_full", "name": "mansion base swimming pool", "sym": "M", "color": "blue", @@ -280,6 +284,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_t2", + "vision_levels": "always_full", "name": "mansion base bedrooms", "sym": "M", "color": "light_green", @@ -288,6 +293,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_t3", + "vision_levels": "always_full", "name": "mansion base???", "sym": "M", "color": "white", @@ -296,6 +302,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_t4", + "vision_levels": "always_full", "name": "mansion base kitchen", "sym": "M", "color": "pink", @@ -304,6 +311,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_t5", + "vision_levels": "always_full", "name": "mansion base library", "sym": "M", "color": "brown", @@ -312,6 +320,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_t6", + "vision_levels": "always_full", "name": "mansion base bedroom", "sym": "M", "color": "light_green", @@ -320,6 +329,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_t7", + "vision_levels": "always_full", "name": "mansion base living rooms", "sym": "M", "color": "green", @@ -328,6 +338,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_c1", + "vision_levels": "always_full", "name": "mansion base swimming pool", "sym": "M", "color": "blue", @@ -336,6 +347,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_c2", + "vision_levels": "always_full", "name": "mansion base bar", "sym": "M", "color": "magenta", @@ -344,6 +356,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_c3", + "vision_levels": "always_full", "name": "mansion base living rooms", "sym": "M", "color": "green", @@ -352,6 +365,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_c4", + "vision_levels": "always_full", "name": "mansion base bedroom", "sym": "M", "color": "light_green", @@ -360,6 +374,7 @@ { "type": "overmap_terrain", "id": "faction_base_mansion_c5", + "vision_levels": "always_full", "name": "mansion base kitchen", "sym": "M", "color": "pink", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json b/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json index 03f4f3d00a5da..126b8d5b86d08 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_fungal.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": "fungal_tower", + "vision_levels": "blends_till_details", "name": "fungal tower", "sym": "T", "color": "yellow", @@ -12,6 +13,7 @@ { "type": "overmap_terrain", "id": "fungal_bloom", + "vision_levels": "blends_till_details", "name": "fungal bloom", "sym": "T", "color": "light_gray", @@ -22,6 +24,7 @@ { "type": "overmap_terrain", "id": "fungal_flowers", + "vision_levels": "blends_till_details", "name": "fungal flowers", "sym": "T", "color": "cyan", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_hardcoded.json b/data/json/overmap/overmap_terrain/overmap_terrain_hardcoded.json index 821ad44952fc7..bf6b07ca0ade9 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_hardcoded.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_hardcoded.json @@ -5,6 +5,7 @@ "name": "open air", "sym": ".", "color": "blue", + "vision_levels": "roof_or_air", "travel_cost_type": "air", "flags": [ "NO_ROTATE" ] }, @@ -15,6 +16,7 @@ "name": "field", "sym": ".", "color": "brown", + "vision_levels": "always_full", "see_cost": 2, "extras": "field", "spawns": { "group": "GROUP_FOREST", "population": [ 0, 1 ], "chance": 13 }, @@ -54,6 +56,7 @@ "name": "swamp", "sym": "F", "color": "cyan", + "vision_levels": "forested_swampy", "see_cost": 4, "extras": "forest_water", "spawns": { "group": "GROUP_SWAMP", "population": [ 2, 6 ], "chance": 50 }, @@ -67,6 +70,7 @@ "name": "standing stones", "sym": "O", "color": "dark_gray", + "vision_levels": "open_land", "see_cost": 3, "spawns": { "group": "GROUP_STANDING_STONES", "population": [ 1, 4 ], "chance": 100 }, "flags": [ "NO_ROTATE" ] @@ -75,6 +79,8 @@ "type": "overmap_terrain", "id": [ "temple_stairs", "temple_underground_1", "temple_underground_2", "temple_underground_3", "temple_underground_4" ], "name": "strange temple", + "//": "Wrong, but doesn't really matter, for underground omts", + "vision_levels": "open_land", "sym": "T", "color": "pink", "see_cost": 5, @@ -83,6 +89,7 @@ { "type": "overmap_terrain", "id": "temple_finale", + "vision_levels": "underground_stone", "name": "strange temple", "sym": "T", "color": "yellow", @@ -92,6 +99,7 @@ { "type": "overmap_terrain", "id": "cave", + "vision_levels": "natural_outcropping", "name": "cave", "sym": "C", "color": "brown", @@ -101,6 +109,7 @@ { "type": "overmap_terrain", "id": "cave_underground", + "vision_levels": "underground_dirt", "name": "cave", "sym": "C", "color": "brown", @@ -112,6 +121,7 @@ "id": "cave_rat_underground", "name": "rat cave", "looks_like": "cave_underground", + "vision_levels": "underground_dirt", "sym": "C", "color": "brown", "see_cost": 2, @@ -121,6 +131,7 @@ "type": "overmap_terrain", "id": "cave_rat", "name": "rat cave", + "vision_levels": "natural_outcropping", "looks_like": "cave", "sym": "C", "color": "dark_gray", @@ -130,6 +141,7 @@ { "type": "overmap_terrain", "id": "slimepit", + "vision_levels": "underground_stone", "name": "slime pit", "sym": "~", "color": "light_green", @@ -139,6 +151,7 @@ { "type": "overmap_terrain", "id": "slimepit_down", + "vision_levels": "underground_stone", "name": "slime pit", "sym": "~", "color": "light_green", @@ -149,6 +162,7 @@ "type": "overmap_terrain", "id": "rock", "//": "This is old rock type replaced by empty_rock/deep_rock, now only used for edges of slimepits", + "vision_levels": "always_full", "name": "solid rock", "looks_like": "empty_rock", "sym": "%", @@ -160,6 +174,7 @@ "type": "overmap_terrain", "id": "empty_rock", "name": "solid rock", + "vision_levels": "always_full", "sym": "%", "color": "dark_gray", "see_cost": 5, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_industrial.json b/data/json/overmap/overmap_terrain/overmap_terrain_industrial.json index a2c4e7ef9a824..baf080f6d3840 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_industrial.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_industrial.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "id": [ "public_works_NE", "public_works_NW", "public_works_SE" ], "name": "public works", + "vision_levels": "city_building", "sym": "w", "color": "light_gray", "see_cost": 5, @@ -12,16 +13,13 @@ { "type": "overmap_terrain", "id": "public_works_SW", - "name": "public works", "sym": "W", - "color": "light_gray", - "see_cost": 5, - "mondensity": 2, - "flags": [ "SIDEWALK", "SOURCE_VEHICLES", "SOURCE_FABRICATION", "SOURCE_CONSTRUCTION" ] + "copy-from": "public_works_NE" }, { "type": "overmap_terrain", "id": [ "public_works_NE_roof", "public_works_NW_roof", "public_works_SE_roof" ], + "vision_levels": "roof_or_air", "name": "public works roof", "sym": "w", "color": "light_gray", @@ -31,11 +29,8 @@ { "type": "overmap_terrain", "id": "public_works_SW_roof", - "name": "public works roof", "sym": "W", - "color": "light_gray", - "see_cost": 5, - "mondensity": 2 + "copy-from": "public_works_NE_roof" }, { "type": "overmap_terrain", @@ -43,11 +38,13 @@ "name": "serving area interface", "sym": "0", "color": "i_magenta", + "vision_levels": "isolated_building", "see_cost": 5 }, { "type": "overmap_terrain", "id": "solar_farm", + "vision_levels": "blends_till_outlines", "name": "solar farm", "sym": "#", "color": "i_yellow", @@ -59,6 +56,7 @@ "name": "small power substation", "sym": "H", "color": "light_cyan", + "vision_levels": "isolated_building", "see_cost": 5 }, { @@ -67,12 +65,14 @@ "name": "small power substation roof", "sym": "H", "color": "light_cyan", + "vision_levels": "isolated_building", "see_cost": 5 }, { "type": "overmap_terrain", "id": [ "pwr_large_entrance", "pwr_large_2", "pwr_large_3", "pwr_large_4" ], "name": "large power substation", + "vision_levels": "isolated_building", "sym": "H", "color": "cyan", "see_cost": 5 @@ -81,6 +81,7 @@ "type": "overmap_terrain", "id": [ "pwr_large_entrance_roof", "pwr_large_2_roof" ], "name": "large power substation roof", + "vision_levels": "roof_or_air", "sym": "H", "color": "cyan", "see_cost": 5 @@ -139,6 +140,7 @@ "type": "overmap_terrain", "id": [ "lumbermill_0_0", "lumbermill_0_1", "lumbermill_1_0", "lumbermill_1_1" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "isolated_building", "name": "lumbermill", "sym": "L", "color": "i_green", @@ -148,6 +150,7 @@ { "type": "overmap_terrain", "id": [ "lumbermill_0_0_roof", "lumbermill_0_1_roof", "lumbermill_1_0_roof", "lumbermill_1_1_roof" ], + "vision_levels": "roof_or_air", "copy-from": "generic_city_building", "name": "lumbermill roof", "sym": "L", @@ -156,6 +159,7 @@ { "type": "overmap_terrain", "id": "lumbermill_dforest", + "vision_levels": "forested", "name": "forest", "copy-from": "generic_city_building_no_sidewalk", "sym": "L", @@ -280,6 +284,7 @@ "steel_mill_4_3_3" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "large_building", "name": "steel mill", "sym": "S", "color": "dark_gray" @@ -295,6 +300,8 @@ "steel_mill_rail_2_3" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "blends_till_outlines", + "looks_like": "road", "name": "steel mill depot", "sym": "│", "color": "dark_gray" @@ -303,11 +310,9 @@ "type": "overmap_terrain", "id": [ "s_lightindustry_road_0", "s_lightindustry_road_1" ], "name": "light industry", + "copy-from": "road_abstract", "sym": "─", - "color": "dark_gray", - "see_cost": 5, "extras": "build", - "travel_cost_type": "road", "mondensity": 2 }, { @@ -325,6 +330,7 @@ "name": "light industry", "sym": "I", "color": "light_blue", + "vision_levels": "isolated_building", "see_cost": 5, "extras": "build", "mondensity": 2 @@ -332,6 +338,7 @@ { "type": "overmap_terrain", "id": [ "mine_entrance", "mine_entrance_loading_zone" ], + "vision_levels": "isolated_building", "name": "mine entrance", "sym": "M", "color": "magenta", @@ -341,6 +348,7 @@ { "type": "overmap_terrain", "id": [ "mine_entrance_roof", "mine_entrance_loading_zone_roof" ], + "vision_levels": "roof_or_air", "name": "mine entrance roof", "sym": "M", "color": "magenta", @@ -349,6 +357,7 @@ { "type": "overmap_terrain", "id": [ "mine_shaft_middle", "mine_shaft_middle_east" ], + "vision_levels": "underground_stone", "name": "mine shaft", "sym": "O", "color": "dark_gray", @@ -358,6 +367,7 @@ { "type": "overmap_terrain", "id": [ "mine_shaft_lower", "mine_shaft_lower_east" ], + "vision_levels": "underground_stone", "name": "mine shaft", "sym": "O", "color": "dark_gray", @@ -396,6 +406,7 @@ "mine_wyrms_east", "mine_wyrms_finale" ], + "vision_levels": "underground_stone", "name": "mine tunnels", "sym": "O", "color": "dark_gray", @@ -405,6 +416,7 @@ { "type": "overmap_terrain", "id": "mine_tunnel", + "vision_levels": "underground_stone", "name": "mine tunnels", "color": "dark_gray", "see_cost": 5, @@ -414,6 +426,7 @@ { "type": "overmap_terrain", "id": "mine_finale", + "vision_levels": "underground_stone", "name": "mine", "sym": "M", "color": "brown", @@ -423,11 +436,10 @@ "type": "overmap_terrain", "id": [ "s_lightindustry_scen_road_0", "s_lightindustry_scen_road_1" ], "name": "light industry", + "copy-from": "road_abstract", "sym": "─", - "color": "dark_gray", "see_cost": 5, "extras": "build", - "travel_cost_type": "road", "mondensity": 2 }, { @@ -445,6 +457,7 @@ "name": "light industry", "sym": "I", "color": "light_blue", + "vision_levels": "isolated_building", "see_cost": 5, "extras": "build", "mondensity": 2 diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_isolated_road.json b/data/json/overmap/overmap_terrain/overmap_terrain_isolated_road.json index 01828cafda0cf..328427e4e450b 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_isolated_road.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_isolated_road.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": [ "isolated_road_field_0", "isolated_road_field_1", "isolated_road_field_1_roof" ], + "vision_levels": "open_land", "name": "yard", "sym": ".", "color": "green", @@ -10,6 +11,7 @@ { "type": "overmap_terrain", "id": [ "isolated_house_farm_gunsmith", "isolated_house_farm_roof_gunsmith" ], + "vision_levels": "isolated_building", "name": "gunsmith's home", "sym": "v", "color": "red", @@ -19,6 +21,7 @@ { "type": "overmap_terrain", "id": [ "isolated_house_farm_blacksmith", "isolated_house_farm_roof_blacksmith" ], + "vision_levels": "isolated_building", "name": "blacksmith's home", "sym": "^", "color": "cyan", @@ -28,6 +31,7 @@ { "type": "overmap_terrain", "id": [ "gunshow_0", "gunshow_1", "gunshow_0_roof", "gunshow_1_roof" ], + "vision_levels": "blends_till_details", "name": "gun show", "sym": "G", "color": "red", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_lab.json b/data/json/overmap/overmap_terrain/overmap_terrain_lab.json index 4ae8cea2547ba..71a688739d59c 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_lab.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_lab.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": "lab", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -12,6 +13,7 @@ { "type": "overmap_terrain", "id": "lab_stairs", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "blue", @@ -22,6 +24,7 @@ { "type": "overmap_terrain", "id": "lab_core", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -32,6 +35,7 @@ { "type": "overmap_terrain", "id": "lab_escape_cells", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -41,6 +45,7 @@ { "type": "overmap_terrain", "id": "lab_escape_entrance", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -51,6 +56,7 @@ { "type": "overmap_terrain", "id": "ants_lab", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -61,6 +67,7 @@ { "type": "overmap_terrain", "id": "ants_lab_stairs", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "blue", @@ -71,6 +78,7 @@ { "type": "overmap_terrain", "id": "lab_finale", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "cyan", @@ -81,6 +89,7 @@ { "type": "overmap_terrain", "id": "ice_lab", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -91,6 +100,7 @@ { "type": "overmap_terrain", "id": "ice_lab_stairs", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "blue", @@ -101,6 +111,7 @@ { "type": "overmap_terrain", "id": "ice_lab_core", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -111,6 +122,7 @@ { "type": "overmap_terrain", "id": "ice_lab_finale", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "cyan", @@ -121,6 +133,7 @@ { "type": "overmap_terrain", "id": "tower_lab", + "vision_levels": "large_city_building", "name": "science lab tower", "sym": "L", "color": "light_blue", @@ -131,6 +144,7 @@ { "type": "overmap_terrain", "id": "tower_lab_stairs", + "vision_levels": "large_city_building", "name": "science lab tower", "sym": "L", "color": "blue", @@ -141,6 +155,7 @@ { "type": "overmap_terrain", "id": "tower_lab_finale", + "vision_levels": "large_city_building", "name": "science lab tower", "sym": "L", "color": "cyan", @@ -157,6 +172,7 @@ "office_tower_lab_b2_roof", "office_tower_lab_b3_roof" ], + "vision_levels": "roof_or_air", "name": "science lab tower roof", "sym": "L", "color": "cyan", @@ -166,6 +182,7 @@ { "type": "overmap_terrain", "id": "lab_train_depot", + "vision_levels": "underground_stone", "name": "science train depot", "sym": "L", "color": "light_blue", @@ -177,6 +194,7 @@ { "type": "overmap_terrain", "id": "central_lab_train_depot", + "vision_levels": "underground_stone", "name": "central train depot", "copy-from": "lab_train_depot", "spawns": { "group": "GROUP_CENTRAL_LAB", "population": [ 0, 5 ], "chance": 20 } @@ -184,6 +202,7 @@ { "type": "overmap_terrain", "id": "central_lab_entrance", + "vision_levels": "forested", "name": "forest", "looks_like": "forest", "land_use_code": "forest", @@ -195,6 +214,7 @@ { "type": "overmap_terrain", "id": "central_lab_shaft", + "vision_levels": "underground_stone", "name": "access shaft", "sym": "0", "color": "light_gray", @@ -204,6 +224,7 @@ { "type": "overmap_terrain", "abstract": "generic_central_lab", + "vision_levels": "underground_stone", "name": "central lab", "sym": "L", "color": "cyan", @@ -229,6 +250,7 @@ { "type": "overmap_terrain", "id": "central_lab", + "vision_levels": "underground_stone", "name": "central lab", "sym": "L", "color": "light_blue", @@ -239,6 +261,7 @@ { "type": "overmap_terrain", "id": "central_lab_stairs", + "vision_levels": "underground_stone", "name": "central lab", "sym": "L", "color": "blue", @@ -249,6 +272,7 @@ { "type": "overmap_terrain", "id": "central_lab_core", + "vision_levels": "underground_stone", "name": "central lab", "sym": "L", "color": "light_blue", @@ -259,6 +283,7 @@ { "type": "overmap_terrain", "id": "central_lab_finale", + "vision_levels": "underground_stone", "name": "central lab", "sym": "L", "color": "cyan", @@ -269,6 +294,7 @@ { "type": "overmap_terrain", "id": [ "lab_surface_brick_basementD1_hidden_lab_stairs", "lab_surface_brick_basementE1" ], + "vision_levels": "underground_dirt", "name": "lab basement", "sym": "L", "color": "white", @@ -293,6 +319,7 @@ ], "name": "parking lot", "//": "parking lot attached to Research facility.", + "vision_levels": "large_pavement", "sym": "_", "color": "dark_gray", "spawns": { "group": "GROUP_LAB_SURFACE", "population": [ 5, 20 ], "chance": 50 }, @@ -319,6 +346,7 @@ "lab_surface_parking_blockD1", "lab_surface_parking_blockE1" ], + "vision_levels": "large_pavement", "name": "parking lot", "//": "parking lot attached to modular mutagen lab.", "sym": "_", @@ -345,6 +373,7 @@ "lab_surface_brick_blockE4" ], "name": "research facility", + "vision_levels": "large_building", "sym": "l", "color": "light_gray", "spawns": { "group": "GROUP_LAB_SURFACE", "population": [ 10, 25 ], "chance": 60 }, @@ -356,6 +385,7 @@ "type": "overmap_terrain", "id": "lab_surface_brick_blockC3", "name": "research facility entrance", + "vision_levels": "large_building", "sym": "L", "color": "white", "spawns": { "group": "GROUP_LAB_SURFACE", "population": [ 8, 25 ], "chance": 50 }, @@ -412,6 +442,7 @@ "lab_surface_brick_block5E0", "lab_surface_brick_block5E1" ], + "vision_levels": "roof_or_air", "name": "open air", "sym": ".", "color": "blue", @@ -499,6 +530,7 @@ "lab_surface_brick_block5E4" ], "name": "research facility, roof", + "vision_levels": "roof_or_air", "sym": "l", "color": "dark_gray", "see_cost": 2 @@ -515,6 +547,7 @@ "lab_2x2_MUT_tier_2_SW", "lab_2x2_MUT_tier_2_SE" ], + "vision_levels": "underground_stone", "name": "Lab Research Zone", "sym": "L", "color": "light_blue", @@ -525,6 +558,7 @@ "type": "overmap_terrain", "id": [ "lab_CORE_2x1_1UP", "lab_CORE_2x1_2UP", "lab_CORE_2x1_1DN", "lab_CORE_2x1_2DN" ], "name": "Lab Recreation Zone", + "vision_levels": "underground_stone", "sym": "X", "color": "white", "see_cost": 5, @@ -541,6 +575,7 @@ "lab_security_z-6_final_flr" ], "name": "Lab Security Zone", + "vision_levels": "underground_stone", "sym": "S", "//": "6 underground levels for a modular security tower.", "color": "yellow", @@ -567,6 +602,7 @@ "lab_2x2_cargo_SE" ], "name": "Lab Cargo Zone", + "vision_levels": "underground_stone", "sym": "C", "color": "white", "see_cost": 5, @@ -592,6 +628,7 @@ "lab_1x1x2_RES_8_apartments_lower" ], "name": "Lab Residential Zone", + "vision_levels": "underground_stone", "sym": "R", "color": "green", "see_cost": 5, @@ -615,6 +652,7 @@ "lab_security_z0S" ], "name": "Trans-Coast Logistics", + "vision_levels": "large_building", "sym": "F", "//": "Front/Fake company entrance for a lab. Includes main and auxiliary entrances including the start of the security tower.", "color": "light_gray", @@ -626,6 +664,7 @@ "type": "overmap_terrain", "id": [ "full_basic_lab_roof", "lab_security_z0S_roof", "lab_security_z0N_roof" ], "name": "Trans-Coast Logistics Roof", + "vision_levels": "roof_or_air", "sym": "F", "color": "light_gray", "see_cost": 5, @@ -635,6 +674,7 @@ "type": "overmap_terrain", "id": [ "lab_health_z-2_A", "lab_health_z-2_B", "lab_health_z-3_A" ], "name": "Lab Health Clinic", + "vision_levels": "underground_stone", "sym": "M", "color": "red", "see_cost": 5, @@ -645,6 +685,7 @@ "type": "overmap_terrain", "id": [ "lab_health_z-3_B" ], "name": "Lab Health Clinic", + "vision_levels": "underground_stone", "sym": "M", "color": "red", "see_cost": 5, @@ -654,6 +695,7 @@ "type": "overmap_terrain", "id": [ "lab_maintenance_z-2&3_B", "lab_maintenance_z-2&3_A" ], "name": "Lab Maintenance Zone", + "vision_levels": "underground_stone", "sym": "M", "color": "cyan", "see_cost": 5, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_mall.json b/data/json/overmap/overmap_terrain/overmap_terrain_mall.json index 8fb68b8d3e9d8..62c8d47411af7 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_mall.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_mall.json @@ -4,6 +4,7 @@ "abstract": "generic_mall", "name": "mall", "color": "i_red", + "vision_levels": "large_city_building", "sym": "M", "see_cost": 5, "mondensity": 2, @@ -12,7 +13,9 @@ { "type": "overmap_terrain", "abstract": "generic_mall_road", + "vision_levels": "blends_till_outlines", "copy-from": "generic_mall", + "looks_like": "road", "name": "road", "color": "dark_gray" }, @@ -306,6 +309,7 @@ "mall_a_70_basement", "mall_a_71_basement" ], + "vision_levels": "underground_dirt", "name": "solid earth", "color": "brown", "sym": "#" @@ -323,6 +327,7 @@ "mall_a_68_sub_basement", "mall_a_69_sub_basement" ], + "vision_levels": "underground_stone", "copy-from": "generic_mall", "name": "mall - subway station", "color": "i_light_red" diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_mansion.json b/data/json/overmap/overmap_terrain/overmap_terrain_mansion.json index d2fe99766eaa9..794012cbda566 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_mansion.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_mansion.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "abstract": "generic_mansion_entrance", + "vision_levels": "large_building", "name": "mansion", "sym": "M", "color": "light_green", 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 7f8d5e90b0996..9ae5f0ca8d060 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_mi-go.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_mi-go.json @@ -1,16 +1,8 @@ [ { "type": "overmap_terrain", - "id": "mi-go_camp1", - "name": "mi-go encampment", - "sym": "<", - "color": "dark_gray", - "mondensity": 2, - "flags": [ "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "mi-go_camp1-1", + "id": [ "mi-go_camp1", "mi-go_camp1-1" ], + "vision_levels": "isolated_tower", "name": "mi-go encampment", "sym": "<", "color": "dark_gray", @@ -20,11 +12,9 @@ { "type": "overmap_terrain", "id": "mi-go_camp2", - "name": "mi-go encampment", "sym": ">", "color": "light_gray", - "mondensity": 2, - "flags": [ "RISK_EXTREME" ] + "copy-from": "mi-go_camp1" }, { "type": "overmap_terrain", @@ -32,8 +22,7 @@ "name": "mi-go spire", "sym": ">", "color": "light_gray", - "mondensity": 2, - "flags": [ "RISK_EXTREME" ] + "copy-from": "mi-go_camp1" }, { "type": "overmap_terrain", @@ -41,8 +30,7 @@ "name": "mi-go landing platform", "sym": "_", "color": "light_gray", - "mondensity": 2, - "flags": [ "RISK_EXTREME" ] + "copy-from": "mi-go_camp1" }, { "type": "overmap_terrain", @@ -50,8 +38,7 @@ "name": "mi-go landing roof", "sym": "_", "color": "light_gray", - "mondensity": 2, - "flags": [ "RISK_EXTREME" ] + "copy-from": "mi-go_camp1" }, { "type": "overmap_terrain", @@ -66,16 +53,14 @@ "mi-go_scout_tower_4" ], "name": "mi-go scout tower", - "sym": ">", - "color": "light_gray", - "mondensity": 2, - "flags": [ "RISK_EXTREME" ] + "copy-from": "mi-go_camp1" }, { "type": "overmap_terrain", "id": "mi-go_portal", "name": "mi-go structure", "sym": "=", + "vision_levels": "blends_till_details", "color": "dark_gray", "mondensity": 2, "flags": [ "RISK_EXTREME" ] @@ -84,6 +69,7 @@ "type": "overmap_terrain", "id": "mi-go_portal_roof", "name": "mi-go structure roof", + "vision_levels": "roof_or_air", "sym": "=", "color": "dark_gray", "mondensity": 2, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json b/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json index 08080069873e7..7a1b91cb52527 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_microlab.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": "microlab_generic", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "light_blue", @@ -26,6 +27,7 @@ { "type": "overmap_terrain", "id": "microlab_sub_station", + "vision_levels": "underground_stone", "name": "subway station?", "sym": "S", "color": "light_blue", @@ -56,6 +58,7 @@ "microlab_generic_isolated_stairs_up", "microlab_generic_isolated_elevator_pit" ], + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "cyan", @@ -76,6 +79,7 @@ "microlab_portal_security_hallway1", "microlab_portal_security_hallway2" ], + "vision_levels": "underground_stone", "name": "physics lab", "sym": "L", "color": "red", @@ -85,6 +89,7 @@ { "type": "overmap_terrain", "id": [ "microlab_generic_hallway" ], + "vision_levels": "underground_stone", "name": "lab hallway", "color": "light_red", "see_cost": 5, @@ -93,6 +98,7 @@ { "type": "overmap_terrain", "id": [ "microlab_reactor", "microlab_reactor_b" ], + "vision_levels": "underground_stone", "name": "science lab reactor", "sym": "L", "color": "light_red", @@ -109,6 +115,7 @@ { "type": "overmap_terrain", "id": "microlab_distorted_hallway", + "vision_levels": "underground_stone", "name": "distorted hallway", "color": "light_red", "see_cost": 5, @@ -117,6 +124,7 @@ { "type": "overmap_terrain", "id": [ "microlab_portal_elevator", "microlab_portal_elevator_physics_glass" ], + "vision_levels": "underground_stone", "name": "physics department elevator", "color": "light_red", "sym": "L", @@ -125,6 +133,7 @@ { "type": "overmap_terrain", "id": [ "microlab_portal_MSU14_elevator" ], + "vision_levels": "underground_stone", "name": "Hub 14 elevator", "color": "cyan", "sym": "L", @@ -133,6 +142,7 @@ { "type": "overmap_terrain", "id": [ "microlab_portal_MSU14" ], + "vision_levels": "underground_stone", "name": "Hub 14", "sym": "L", "color": "cyan", @@ -142,6 +152,7 @@ { "type": "overmap_terrain", "id": "microlab_portal_elevator_nether_glass", + "vision_levels": "underground_stone", "name": "lost level", "color": "black", "sym": " ", @@ -150,6 +161,7 @@ { "type": "overmap_terrain", "id": "microlab_generic_surface", + "vision_levels": "underground_stone", "name": "lab", "sym": "L", "color": "blue", @@ -163,6 +175,7 @@ { "type": "overmap_terrain", "id": "microlab_ratkin", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "green", @@ -190,6 +203,7 @@ { "type": "overmap_terrain", "id": "microlab_sub_station_ratkin", + "vision_levels": "underground_stone", "name": "pump station?", "sym": "P", "color": "green", @@ -200,6 +214,7 @@ { "type": "overmap_terrain", "id": "microlab_ratkin_sub_entry", + "vision_levels": "underground_stone", "name": "science lab", "sym": "L", "color": "green", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_military.json b/data/json/overmap/overmap_terrain/overmap_terrain_military.json index fe0d70c9d9adf..25deed3aeb081 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_military.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_military.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": [ "fema_entrance", "fema_entrance_roof" ], + "vision_levels": "isolated_building", "name": "FEMA camp", "sym": "+", "color": "blue", @@ -23,6 +24,7 @@ "fema_roof", "fema_1_3_roof" ], + "vision_levels": "isolated_building", "name": "FEMA camp", "sym": "F", "color": "i_blue", @@ -34,6 +36,7 @@ "type": "overmap_terrain", "id": [ "FEMA_tlc", "FEMA_te", "FEMA_trc", "FEMA_le", "FEMA_mid", "FEMA_re", "FEMA_blc", "FEMA_brc" ], "name": "FEMA refugee camp", + "vision_levels": "isolated_building", "sym": "F", "color": "i_blue", "extras": "build", @@ -43,6 +46,7 @@ { "type": "overmap_terrain", "id": "FEMA_entrance", + "vision_levels": "isolated_building", "name": "FEMA refugee camp", "sym": "+", "color": "blue", @@ -52,142 +56,114 @@ }, { "type": "overmap_terrain", - "id": [ "shelter", "shelter_vandal", "shelter_unfinished", "shelter_survivor" ], - "name": "evac shelter A-23", + "abstract": "shelter_abstract", "sym": "+", "color": "white", - "see_cost": 2, + "vision_levels": "isolated_building", + "see_cost": 2 + }, + { + "type": "overmap_terrain", + "id": [ "shelter", "shelter_vandal", "shelter_unfinished", "shelter_survivor" ], + "name": "evac shelter A-23", + "copy-from": "shelter_abstract", "flags": [ "KNOWN_DOWN", "SOURCE_PEOPLE", "SOURCE_SAFETY" ] }, { "type": "overmap_terrain", "id": [ "shelter_infested" ], - "name": "evac shelter A-23", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter", "flags": [ "KNOWN_DOWN", "RISK_HIGH" ] }, { "type": "overmap_terrain", "id": [ "shelter_1", "shelter_1_vandal", "shelter_1_unfinished", "shelter_1_survivor" ], "name": "evac shelter B-05", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_abstract", "flags": [ "KNOWN_DOWN", "SOURCE_PEOPLE", "SOURCE_SAFETY" ] }, { "type": "overmap_terrain", "id": [ "shelter_1_infested" ], - "name": "evac shelter B-05", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_1", "flags": [ "KNOWN_DOWN", "RISK_HIGH" ] }, { "type": "overmap_terrain", "id": [ "shelter_1b", "shelter_1b_vandal", "shelter_1b_unfinished", "shelter_1b_survivor" ], + "copy-from": "shelter_abstract", "name": "evac shelter B-19", - "sym": "+", - "color": "white", - "see_cost": 2, "flags": [ "KNOWN_DOWN", "SOURCE_PEOPLE", "SOURCE_SAFETY" ] }, { "type": "overmap_terrain", "id": [ "shelter_1b_infested" ], - "name": "evac shelter B-19", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_1b", "flags": [ "KNOWN_DOWN", "RISK_HIGH" ] }, { "type": "overmap_terrain", "id": [ "shelter_2", "shelter_2_vandal", "shelter_2_unfinished", "shelter_2_survivor" ], "name": "evac shelter C-41", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_abstract", "flags": [ "KNOWN_DOWN", "SOURCE_PEOPLE", "SOURCE_SAFETY" ] }, { "type": "overmap_terrain", "id": [ "shelter_2_infested" ], - "name": "evac shelter C-41", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_2", "flags": [ "KNOWN_DOWN", "RISK_HIGH" ] }, { "type": "overmap_terrain", "id": [ "shelter_roof" ], "name": "evac shelter roof A-23", - "sym": "+", - "color": "white", - "see_cost": 2 + "copy-from": "shelter_abstract" }, { "type": "overmap_terrain", "id": [ "shelter_roof_1" ], "name": "evac shelter roof B-05", - "sym": "+", - "color": "white", - "see_cost": 2 + "copy-from": "shelter_abstract" }, { "type": "overmap_terrain", "id": [ "shelter_roof_1b" ], "name": "evac shelter roof B-19", - "sym": "+", - "color": "white", - "see_cost": 2 + "copy-from": "shelter_abstract" }, { "type": "overmap_terrain", "id": [ "shelter_roof_2" ], "name": "evac shelter roof C-41", - "sym": "+", - "color": "white", - "see_cost": 2 + "copy-from": "shelter_abstract" }, { "type": "overmap_terrain", "id": [ "shelter_under", "shelter_under_vandal", "shelter_under_unfinished", "shelter_under_infested" ], "name": "evac shelter basement A-23", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_abstract", "flags": [ "KNOWN_UP" ] }, { "type": "overmap_terrain", "id": [ "shelter_under_1b", "shelter_under_1b_vandal", "shelter_under_1b_unfinished", "shelter_under_1b_infested" ], "name": "evac shelter basement B-19", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_abstract", "flags": [ "KNOWN_UP" ] }, { "type": "overmap_terrain", "id": [ "shelter_under_2", "shelter_under_2_vandal", "shelter_under_2_unfinished", "shelter_under_2_infested" ], "name": "evac shelter basement C-41", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_abstract", "flags": [ "KNOWN_UP" ] }, { "type": "overmap_terrain", "id": [ "shelter_under_1", "shelter_under_1_vandal", "shelter_under_1_unfinished", "shelter_under_1_infested" ], "name": "evac shelter basement B-05", - "sym": "+", - "color": "white", - "see_cost": 2, + "copy-from": "shelter_abstract", "flags": [ "KNOWN_UP" ] }, { @@ -196,6 +172,7 @@ "name": "LMOE shelter", "sym": "+", "color": "red", + "vision_levels": "natural_outcropping", "see_cost": 2, "flags": [ "KNOWN_DOWN", "SOURCE_PEOPLE", "SOURCE_SAFETY", "SOURCE_GUN", "SOURCE_AMMO", "SOURCE_FOOD" ] }, @@ -205,6 +182,7 @@ "name": "LMOE shelter", "sym": "+", "color": "red", + "vision_levels": "natural_outcropping", "see_cost": 2, "flags": [ "KNOWN_DOWN", "SOURCE_PEOPLE", "SOURCE_SAFETY", "SOURCE_GUN", "SOURCE_AMMO", "SOURCE_FOOD" ] }, @@ -212,6 +190,7 @@ "type": "overmap_terrain", "id": "lmoe_roof", "name": "LMOE shelter", + "vision_levels": "roof_or_air", "sym": ".", "color": "brown", "see_cost": 2, @@ -221,6 +200,7 @@ "type": "overmap_terrain", "id": "lmoe_under", "name": "LMOE shelter", + "vision_levels": "underground_dirt", "sym": "+", "color": "red", "see_cost": 2, @@ -230,6 +210,7 @@ "type": "overmap_terrain", "id": "lmoe_under_empty", "name": "LMOE shelter", + "vision_levels": "underground_dirt", "sym": "+", "color": "red", "see_cost": 2, @@ -239,6 +220,7 @@ "type": "overmap_terrain", "id": "lmoe_under_empty_prepperquest", "name": "LMOE shelter", + "vision_levels": "underground_dirt", "sym": "+", "color": "red", "see_cost": 2, @@ -248,6 +230,7 @@ "type": "overmap_terrain", "id": "lmoe_zombie", "name": "LMOE shelter", + "vision_levels": "natural_outcropping", "sym": "+", "color": "red", "see_cost": 2, @@ -257,6 +240,7 @@ "type": "overmap_terrain", "id": "lmoe_zombie_under_empty", "name": "LMOE shelter", + "vision_levels": "underground_dirt", "sym": "+", "color": "red", "see_cost": 2, @@ -266,6 +250,7 @@ "type": "overmap_terrain", "id": "cabin_prepper_shelter", "name": "LMOE shelter", + "vision_levels": "underground_dirt", "sym": "+", "color": "red", "see_cost": 2, @@ -277,6 +262,7 @@ "name": "military bunker", "sym": "B", "color": "red", + "vision_levels": "isolated_building", "see_cost": 2, "flags": [ "KNOWN_DOWN", "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, @@ -286,6 +272,7 @@ "name": "military bunker", "sym": "B", "color": "red", + "vision_levels": "isolated_building", "see_cost": 2, "flags": [ "KNOWN_UP", "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, @@ -295,6 +282,7 @@ "name": "military bunker", "sym": "B", "color": "red", + "vision_levels": "isolated_building", "see_cost": 2, "flags": [ "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] }, @@ -304,6 +292,7 @@ "name": "military outpost", "sym": "M", "color": "red", + "vision_levels": "isolated_building", "see_cost": 2, "extras": "build", "flags": [ "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] @@ -314,6 +303,7 @@ "name": "military outpost", "sym": "M", "color": "red", + "vision_levels": "isolated_building", "see_cost": 2, "extras": "build", "flags": [ "RISK_EXTREME", "SOURCE_WEAPON", "SOURCE_AMMO" ] @@ -324,6 +314,7 @@ "name": "military outpost roof", "sym": "M", "color": "red", + "vision_levels": "isolated_building", "see_cost": 2, "extras": "build" }, @@ -333,6 +324,7 @@ "name": "missile silo", "sym": "0", "color": "red", + "vision_levels": "open_land", "see_cost": 2, "flags": [ "NO_ROTATE", "RISK_EXTREME" ] }, @@ -349,6 +341,7 @@ "copy-from": "generic_city_building_no_sidewalk", "name": "fire lookout tower", "sym": "T", + "vision_levels": "isolated_tower", "color": "red", "flags": [ "SOURCE_SAFETY" ] }, @@ -356,6 +349,7 @@ "type": "overmap_terrain", "id": [ "ws_survivor_bunker_f0", "ws_survivor_bunker_f-1" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "blends_till_details", "name": "survivor's bunker", "sym": "b", "color": "green", @@ -388,6 +382,7 @@ "mil_base_7i" ], "name": "military helipad", + "vision_levels": "large_building", "sym": "H", "color": "red", "see_cost": 5, @@ -422,6 +417,7 @@ "mil_base_8e" ], "name": "military base", + "vision_levels": "large_building", "sym": "M", "color": "red", "see_cost": 5 @@ -460,6 +456,7 @@ "mil_base_8j" ], "name": "military base", + "vision_levels": "open_land", "sym": ",", "color": "brown", "see_cost": 2 @@ -511,6 +508,7 @@ ], "name": "military base roof", "sym": "M", + "vision_levels": "roof_or_air", "color": "red", "see_cost": 5 }, @@ -528,6 +526,7 @@ "mil_base_tunnels_i" ], "name": "military base tunnels", + "vision_levels": "underground_dirt", "sym": "M", "color": "red", "see_cost": 5 @@ -555,6 +554,7 @@ "mil_base_8k1" ], "name": "military base watchtower", + "vision_levels": "isolated_tower", "sym": "W", "color": "dark_gray", "see_cost": 2 @@ -563,6 +563,7 @@ "type": "overmap_terrain", "id": [ "mil_base_3i", "mil_base_3i1", "mil_base_3i2", "mil_base_3i3", "mil_base_3i4" ], "name": "military base radio tower", + "vision_levels": "isolated_tower", "sym": "X", "color": "light_gray", "see_cost": 2 @@ -582,6 +583,7 @@ ], "name": "military base", "sym": "_", + "vision_levels": "large_pavement", "color": "dark_gray", "see_cost": 1 }, @@ -589,6 +591,7 @@ "type": "overmap_terrain", "abstract": "generic_mil_base_minefield", "name": "military base minefield", + "vision_levels": "open_land", "color": "light_gray", "see_cost": 2 }, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_militia.json b/data/json/overmap/overmap_terrain/overmap_terrain_militia.json index 66de9db0802cf..f3b6cd099704d 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_militia.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_militia.json @@ -28,6 +28,7 @@ "GMLODGE3_roof_3" ], "name": "Militia Lodge", + "vision_levels": "isolated_building", "sym": "L", "color": "brown", "see_cost": 5 diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_nether.json b/data/json/overmap/overmap_terrain/overmap_terrain_nether.json index b9f7fcaf093a6..bf5ad2009341b 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_nether.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_nether.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": [ "nether_glass", "nether_glass_deep", "nether_glass_impassable" ], + "vision_levels": "always_full", "name": "abyss", "sym": " ", "color": "black", @@ -11,6 +12,7 @@ { "type": "overmap_terrain", "id": [ "void_spider_lair_entrance", "void_spider_lair_a1", "void_spider_lair_a2" ], + "vision_levels": "always_full", "name": "abyss", "sym": " ", "color": "black", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_nether_monster_corpse.json b/data/json/overmap/overmap_terrain/overmap_terrain_nether_monster_corpse.json index 5d0f441b6f886..ffd0d567abc03 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_nether_monster_corpse.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_nether_monster_corpse.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "id": "corpse_surface", "name": "monster corpse", + "vision_levels": "natural_outcropping", "copy-from": "corpse_bowels_empty_edge", "flags": [ "RISK_HIGH", "REQUIRES_PREDECESSOR" ], "sym": "T" @@ -17,6 +18,7 @@ "corpse_bowels_lcorner", "corpse_bowels_empty_edge" ], + "vision_levels": "underground_dirt", "name": "monster corpse bowels", "sym": "O", "color": "light_red", @@ -26,6 +28,7 @@ { "type": "overmap_terrain", "id": [ "corpse_bowels_mid" ], + "vision_levels": "underground_dirt", "name": "monster corpse bowels", "sym": "O", "color": "light_red", @@ -54,6 +57,7 @@ "type": "overmap_terrain", "id": "corpse_tentacle_surface_entry", "copy-from": "corpse_bowels_empty_edge", + "vision_levels": "natural_outcropping", "name": "monster corpse", "sym": "M", "color": "blue", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_nuclear_plant.json b/data/json/overmap/overmap_terrain/overmap_terrain_nuclear_plant.json index be11805f23c4b..334558a274384 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_nuclear_plant.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_nuclear_plant.json @@ -512,6 +512,7 @@ "nuclear_plant_7_3_7", "nuclear_plant_8_3_7" ], + "vision_levels": "large_building", "name": "nuclear plant", "sym": "N", "color": "red", 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 2bb1c28dcecf9..b1882dddb50f3 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_oil_platform.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_oil_platform.json @@ -36,6 +36,7 @@ "oil_platform_4b_5", "oil_platform_4c_5" ], + "vision_levels": "large_structure", "name": "oil platform", "sym": "O", "color": "red", @@ -54,6 +55,7 @@ "oil_platform_3b_4", "oil_platform_3c_4" ], + "vision_levels": "large_structure", "name": "oil platform", "sym": "O", "color": "red", @@ -159,6 +161,7 @@ "oil_platform_4b_z-9", "oil_platform_4c_z-9" ], + "vision_levels": "large_structure", "name": "oil platform", "sym": "O", "color": "red", 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 3775945130b35..a994b6a956792 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_private_resort.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_private_resort.json @@ -5,6 +5,7 @@ "name": "private resort", "sym": "p", "color": "yellow", + "vision_levels": "large_building", "see_cost": 5, "mondensity": 1, "flags": [ "RISK_EXTREME", "SOURCE_DRINK", "SOURCE_LUXURY" ] 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 2f7fa9147db6b..4717653c73dca 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_public_institutional.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_public_institutional.json @@ -10,6 +10,7 @@ { "type": "overmap_terrain", "id": [ "church_roof", "church_2ndfloor_1", "church_3rdfloor_1", "church_roof_1" ], + "vision_levels": "roof_or_air", "copy-from": "generic_city_building", "name": "church roof", "sym": "C", @@ -27,6 +28,7 @@ { "type": "overmap_terrain", "id": [ "rural_church", "rural_church_parking" ], + "vision_levels": "isolated_building", "name": "rural church", "sym": "C", "color": "light_red", @@ -35,6 +37,7 @@ { "type": "overmap_terrain", "id": [ "rural_church_steeple" ], + "vision_levels": "isolated_building", "name": "rural church steeple", "sym": "C", "color": "light_red", @@ -43,6 +46,7 @@ { "type": "overmap_terrain", "id": [ "rural_church_steeple_roof" ], + "vision_levels": "roof_or_air", "name": "rural church steeple roof", "sym": "C", "color": "light_red", @@ -51,6 +55,7 @@ { "type": "overmap_terrain", "id": [ "rural_church_basement" ], + "vision_levels": "underground_dirt", "name": "church basement", "sym": "B", "color": "light_red" @@ -88,6 +93,7 @@ "cathedral_3_SE" ], "name": "cathedral", + "vision_levels": "large_city_building", "sym": "C", "color": "i_light_red", "see_cost": 5, @@ -213,6 +219,7 @@ { "type": "overmap_terrain", "abstract": "generic_hospital", + "vision_levels": "large_city_building", "copy-from": "generic_city_building", "name": "hospital", "sym": "H", @@ -281,6 +288,7 @@ { "type": "overmap_terrain", "id": [ "school_1_1", "school_1_3", "school_1_4", "school_1_5", "school_1_6", "school_1_7", "school_1_8", "school_1_9" ], + "vision_levels": "large_city_building", "name": "regional school", "sym": "s", "color": "light_blue", @@ -291,6 +299,7 @@ { "type": "overmap_terrain", "id": "school_1_2", + "vision_levels": "large_city_building", "name": "regional school", "sym": "S", "color": "light_blue", @@ -328,6 +337,7 @@ "school_5_6" ], "name": "regional school", + "vision_levels": "large_city_building", "sym": "s", "color": "light_blue", "see_cost": 5, @@ -347,6 +357,7 @@ "prison_1_8", "prison_1_9" ], + "vision_levels": "large_building", "name": "prison", "sym": "p", "color": "i_light_blue", @@ -473,6 +484,7 @@ "prison_island_1_ug_14", "prison_island_1_ug_15" ], + "vision_levels": "large_structure", "name": "prison", "sym": "p", "color": "i_light_blue", @@ -530,6 +542,7 @@ "type": "overmap_terrain", "id": [ "homeless_0_0_0", "homeless_1_0_0" ], "name": "homeless shelter", + "vision_levels": "city_building", "sym": "H", "color": "green", "see_cost": 2, @@ -548,6 +561,7 @@ "homeless_0_0_4" ], "name": "homeless shelter", + "vision_levels": "city_building", "sym": "H", "color": "green", "see_cost": 2, @@ -557,6 +571,7 @@ "type": "overmap_terrain", "id": [ "town_hall_0_0_0", "town_hall_1_0_0", "town_hall_0_1_0", "town_hall_1_1_0" ], "name": "town hall", + "vision_levels": "city_building", "sym": "^", "color": "i_black", "see_cost": 2, @@ -566,6 +581,7 @@ "type": "overmap_terrain", "id": [ "town_hall_0_0_1", "town_hall_1_0_1", "town_hall_0_1_1", "town_hall_1_1_1" ], "name": "town hall", + "vision_levels": "city_building", "sym": "^", "color": "i_black", "see_cost": 2, @@ -575,6 +591,7 @@ "type": "overmap_terrain", "id": [ "town_hall_0_0_roof", "town_hall_1_0_roof", "town_hall_0_1_roof", "town_hall_1_1_roof", "town_hall_1_1_upper_roof" ], "name": "town hall", + "vision_levels": "roof_or_air", "sym": "^", "color": "i_black", "see_cost": 2, @@ -591,6 +608,7 @@ "sealab_small_-4", "sealab_small_-5" ], + "vision_levels": "large_structure", "name": "freshwater research station", "sym": "~", "color": "yellow", @@ -606,6 +624,7 @@ "nursing_home_sh6", "nursing_home_sh7" ], + "vision_levels": "large_building", "name": "nursing home", "sym": "N", "color": "white" @@ -613,6 +632,7 @@ { "type": "overmap_terrain", "id": [ "nursing_home_sh9", "nursing_home_sh10", "nursing_home_sh11" ], + "vision_levels": "large_pavement", "name": "parking lot", "sym": "O", "color": "dark_gray" @@ -620,27 +640,25 @@ { "type": "overmap_terrain", "id": [ "nursing_home_sh4" ], - "name": "road", - "sym": "┐", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "┐" }, { "type": "overmap_terrain", "id": [ "nursing_home_sh8" ], - "name": "road", - "sym": "│", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "│" }, { "type": "overmap_terrain", "id": [ "nursing_home_sh12" ], - "name": "road", - "sym": "┤", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "┤" }, { "type": "overmap_terrain", "id": [ "nursing_home_1", "nursing_home_2", "nursing_home_3", "nursing_home_5", "nursing_home_6", "nursing_home_7" ], + "vision_levels": "large_building", "name": "nursing home", "sym": "N", "color": "white" @@ -648,6 +666,7 @@ { "type": "overmap_terrain", "id": [ "nursing_home_9", "nursing_home_10", "nursing_home_11" ], + "vision_levels": "large_building", "name": "parking lot", "sym": "O", "color": "dark_gray" @@ -655,23 +674,20 @@ { "type": "overmap_terrain", "id": [ "nursing_home_4" ], - "name": "road", - "sym": "┐", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "┐" }, { "type": "overmap_terrain", "id": [ "nursing_home_8" ], "name": "road", - "sym": "│", - "color": "dark_gray" + "sym": "│" }, { "type": "overmap_terrain", "id": [ "nursing_home_12" ], - "name": "road", - "sym": "┤", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "┤" }, { "type": "overmap_terrain", @@ -683,6 +699,7 @@ "nursing_home_5_roof", "nursing_home_6_roof" ], + "vision_levels": "roof_or_air", "name": "nursing home roof", "sym": "N", "color": "white" @@ -703,6 +720,7 @@ "nursing_home_b11", "nursing_home_b12" ], + "vision_levels": "underground_dirt", "name": "nursing home basement", "sym": "N", "color": "light_gray" @@ -723,6 +741,7 @@ "nursing_home_bb11", "nursing_home_bb12" ], + "vision_levels": "underground_dirt", "name": "nursing home basement", "sym": "N", "color": "light_gray" @@ -743,6 +762,7 @@ "nursing_home_lab11", "nursing_home_lab12" ], + "vision_levels": "underground_stone", "name": "nursing home lab", "sym": "N", "color": "dark_gray" diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_ranch_camp.json b/data/json/overmap/overmap_terrain/overmap_terrain_ranch_camp.json index 2e5192a46cdeb..1a3785e4ca254 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_ranch_camp.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_ranch_camp.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_1", + "vision_levels": "open_land", "name": "ranch field", "sym": "┌", "color": "brown", @@ -24,6 +25,7 @@ ], "name": "ranch field", "sym": "─", + "vision_levels": "open_land", "color": "brown", "see_cost": 2 }, @@ -31,6 +33,7 @@ "type": "overmap_terrain", "id": [ "ranch_camp_9", "ranch_camp_69" ], "name": "ranch field", + "vision_levels": "open_land", "sym": "┐", "color": "brown", "see_cost": 2 @@ -55,6 +58,7 @@ "ranch_camp_72" ], "name": "ranch field", + "vision_levels": "open_land", "sym": "│", "color": "brown", "see_cost": 2 @@ -107,6 +111,7 @@ "ranch_camp_71" ], "name": "ranch field", + "vision_levels": "open_land", "sym": "#", "color": "brown", "see_cost": 2 @@ -114,6 +119,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_17", + "vision_levels": "single_water", "name": "pond", "sym": "P", "color": "blue", @@ -122,6 +128,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_57", + "vision_levels": "isolated_tower", "name": "silo", "sym": "#", "color": "i_brown", @@ -130,6 +137,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_57_silo", + "vision_levels": "isolated_tower", "name": "silo", "sym": "│", "color": "brown", @@ -138,6 +146,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_57_silocap", + "vision_levels": "isolated_tower", "name": "silo cap", "sym": "│", "color": "brown", @@ -146,6 +155,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_65_roof", + "vision_levels": "roof_or_air", "name": "barn roof", "sym": "#", "color": "brown", @@ -154,6 +164,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_66", + "vision_levels": "isolated_building", "name": "barn", "sym": "#", "color": "i_brown", @@ -162,6 +173,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_66_roof", + "vision_levels": "roof_or_air", "name": "barn roof", "sym": "#", "color": "i_brown", @@ -170,6 +182,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_67", + "vision_levels": "isolated_building", "name": "garage", "sym": "O", "color": "white", @@ -178,6 +191,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_67_roof", + "vision_levels": "roof_or_air", "name": "garage roof", "sym": "O", "color": "white", @@ -186,6 +200,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_68", + "vision_levels": "isolated_building", "name": "ranch", "sym": "v", "color": "light_green", @@ -194,6 +209,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_68_roof", + "vision_levels": "roof_or_air", "name": "ranch roof", "sym": "v", "color": "light_green", @@ -202,6 +218,7 @@ { "type": "overmap_terrain", "id": [ "ranch_camp_75", "ranch_camp_75_roof", "ranch_camp_81" ], + "vision_levels": "open_land", "name": "ranch field", "sym": "┘", "color": "brown", @@ -210,6 +227,7 @@ { "type": "overmap_terrain", "id": "ranch_camp_76", + "vision_levels": "large_pavement", "name": "lot", "sym": "O", "color": "dark_gray", @@ -218,16 +236,14 @@ { "type": "overmap_terrain", "id": "ranch_camp_77", - "name": "road", + "copy-from": "road_abstract", "sym": "│", - "color": "dark_gray", - "see_cost": 2, - "travel_cost_type": "road", "extras": "road" }, { "type": "overmap_terrain", "id": [ "ranch_camp_73", "ranch_camp_78" ], + "vision_levels": "open_land", "name": "ranch field", "sym": "└", "color": "brown", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_ravines.json b/data/json/overmap/overmap_terrain/overmap_terrain_ravines.json index 72c93ab9d27f3..aa58fa6a9706d 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_ravines.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_ravines.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "abstract": "generic_ravine", + "vision_levels": "always_full", "name": "ravine", "sym": ".", "color": "blue", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_recreational.json b/data/json/overmap/overmap_terrain/overmap_terrain_recreational.json index 59ccb1d935205..2e0cf65c2e3a1 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_recreational.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_recreational.json @@ -70,6 +70,7 @@ "name": "pool", "sym": "O", "color": "blue", + "vision_levels": "single_water", "see_cost": 2, "mondensity": 2, "flags": [ "SIDEWALK", "SOURCE_DRINK" ] @@ -154,6 +155,7 @@ "name": "hunting blind", "sym": "H", "color": "i_green", + "vision_levels": "blends_till_details", "see_cost": 5, "mondensity": 2 }, @@ -181,6 +183,7 @@ "name": "community garden", "sym": "g", "color": "yellow", + "vision_levels": "blends_till_details", "see_cost": 5, "mondensity": 2, "flags": [ "SIDEWALK", "SOURCE_FARMING" ], @@ -202,6 +205,7 @@ "name": "botanical garden", "sym": "g", "color": "i_green", + "vision_levels": "city_building", "see_cost": 5, "mondensity": 2, "flags": [ "SIDEWALK", "SOURCE_FARMING" ] @@ -209,6 +213,7 @@ { "type": "overmap_terrain", "id": [ "BotanicalGarden_1a_roof", "BotanicalGarden_1b_roof" ], + "vision_levels": "roof_or_air", "name": "botanical garden", "sym": "g", "color": "i_green", @@ -218,6 +223,7 @@ { "type": "overmap_terrain", "id": "TreeFarm_1a", + "vision_levels": "forested", "name": "tree farm", "sym": "T", "color": "i_green", @@ -227,6 +233,7 @@ { "type": "overmap_terrain", "id": "TreeFarm_1a_roof", + "vision_levels": "forested", "name": "tree farm", "sym": "T", "color": "i_green", @@ -238,6 +245,7 @@ "name": "shooting range", "sym": "S", "color": "red", + "vision_levels": "open_land", "see_cost": 5, "mondensity": 2, "flags": [ "SOURCE_GUN", "SOURCE_AMMO" ] @@ -246,6 +254,7 @@ "type": "overmap_terrain", "id": "shootingrange_1a_roof", "name": "shooting range roof", + "vision_levels": "roof_or_air", "sym": "S", "color": "red", "see_cost": 5, @@ -263,6 +272,7 @@ "miniaturerailway_1_0_1", "miniaturerailway_1_1_1" ], + "vision_levels": "isolated_building", "copy-from": "generic_city_building_no_sidewalk", "name": "miniature railway", "sym": "R", @@ -285,6 +295,7 @@ "luna_park_2_1_1" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "isolated_building", "name": "miniature railway park", "sym": "P", "color": "light_green" @@ -304,6 +315,7 @@ "golfcourse_32" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "open_land", "name": "golf course", "sym": "G", "color": "green" @@ -313,12 +325,14 @@ "id": "golfcourse_30", "copy-from": "generic_city_building_no_sidewalk", "name": "golf course parking lot", + "vision_levels": "large_pavement", "sym": "G", "color": "light_gray" }, { "type": "overmap_terrain", "id": "golfcourse_31", + "vision_levels": "isolated_building", "copy-from": "generic_city_building_no_sidewalk", "name": "golf course service building", "sym": "G", @@ -424,6 +438,7 @@ "stadium_2_3" ], "copy-from": "generic_city_building", + "vision_levels": "blends_till_details", "name": "baseball field", "sym": "#", "color": "white" @@ -466,6 +481,7 @@ "stadium_football_6_4" ], "copy-from": "generic_city_building", + "vision_levels": "blends_till_details", "name": "football field", "sym": "O", "color": "light_green", @@ -608,6 +624,7 @@ "stadium_football_6_5_5" ], "copy-from": "generic_city_building", + "vision_levels": "large_city_building", "name": "stadium", "sym": "0", "color": "white" @@ -624,6 +641,7 @@ "stadium_2_1" ], "copy-from": "generic_city_building", + "vision_levels": "large_city_building", "name": "stadium entrance", "sym": "0", "color": "white" @@ -643,6 +661,7 @@ "stadium_football_6_3_1" ], "name": "open air", + "vision_levels": "roof_or_air", "sym": ".", "color": "blue", "see_cost": 1 @@ -650,6 +669,7 @@ { "type": "overmap_terrain", "abstract": "generic_stadium_park", + "vision_levels": "large_pavement", "name": "stadium parking", "color": "dark_gray", "see_cost": 5, @@ -818,6 +838,7 @@ "movietheater_roof_2_2" ], "copy-from": "generic_city_building", + "vision_levels": "large_building", "name": "movie theater roof", "sym": "M", "color": "i_yellow" @@ -844,6 +865,7 @@ "car_theater_2_0_2" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "large_pavement", "name": "drive-in theater", "sym": "M", "color": "i_yellow" @@ -852,6 +874,7 @@ "type": "overmap_terrain", "id": [ "car_theater_3_1", "car_theater_3_2", "car_theater_3_1_1", "car_theater_3_2_1", "car_theater_4_1", "car_theater_4_2" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "isolated_building", "name": "drive-in theater entrance", "sym": "+", "color": "yellow" @@ -859,11 +882,8 @@ { "type": "overmap_terrain", "id": "car_theater_3_0", - "copy-from": "generic_transportation", - "name": "road", - "sym": "│", - "color": "dark_gray", - "see_cost": 2 + "copy-from": "road_abstract", + "sym": "│" }, { "type": "overmap_terrain", @@ -1049,6 +1069,7 @@ "type": "overmap_terrain", "id": "lake_dock_small", "copy-from": "generic_recreation_water", + "vision_levels": "blends_till_details", "name": "dock", "sym": "d", "color": "white", @@ -1059,6 +1080,7 @@ "type": "overmap_terrain", "id": "lake_shore_dock_small", "copy-from": "generic_recreation_water", + "vision_levels": "blends_till_details", "name": "dock", "sym": "d", "color": "white", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_residential.json b/data/json/overmap/overmap_terrain/overmap_terrain_residential.json index 8b28306e0bcf3..b0f8c11a1d968 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_residential.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_residential.json @@ -600,6 +600,7 @@ "name": "apartment tower", "sym": "A", "color": "light_green", + "vision_levels": "large_city_building", "see_cost": 5, "mondensity": 2, "extras": "build", @@ -609,6 +610,7 @@ { "type": "overmap_terrain", "abstract": "apartments_tower_roof_any", + "vision_levels": "roof_or_air", "name": "apartment tower roof", "sym": "A", "color": "light_green", @@ -747,6 +749,7 @@ "type": "overmap_terrain", "id": [ "homelesscamp", "homelesscamp_npc" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "blends_till_outlines", "name": "homeless camp", "sym": "H", "color": "green" @@ -773,6 +776,7 @@ "id": "derelict_property_roof", "type": "overmap_terrain", "name": "derelict property roof", + "vision_levels": "roof_or_air", "sym": ".", "color": "i_brown", "see_cost": 5, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_retirement_community.json b/data/json/overmap/overmap_terrain/overmap_terrain_retirement_community.json index f0f80dadccb30..c3117369eac8d 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_retirement_community.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_retirement_community.json @@ -17,6 +17,7 @@ "retirement_community_2f_6", "retirement_community_2f_7" ], + "vision_levels": "city_building", "name": "retirement home", "sym": "v", "color": "light_green" @@ -32,6 +33,7 @@ "retirement_community_3f_6", "retirement_community_3f_7" ], + "vision_levels": "roof_or_air", "name": "retirement home roof", "sym": "v", "color": "light_green" @@ -55,6 +57,7 @@ "retirement_community_2f_33", "retirement_community_2f_37" ], + "vision_levels": "always_full", "name": "open air", "sym": ".", "color": "blue" @@ -76,6 +79,7 @@ "retirement_community_b_23", "retirement_community_b_26" ], + "vision_levels": "always_full", "name": "basement", "sym": "O", "color": "dark_gray" @@ -90,6 +94,7 @@ "retirement_community_2f_19", "retirement_community_2f_23" ], + "vision_levels": "city_building", "name": "retirement home", "sym": ">", "color": "light_green" @@ -97,6 +102,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_3f_15", "retirement_community_3f_19", "retirement_community_3f_23" ], + "vision_levels": "city_building", "name": "retirement home roof", "sym": ">", "color": "light_green" @@ -111,16 +117,16 @@ "retirement_community_20", "retirement_community_24" ], - "name": "road", - "sym": "│", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "│" }, { "type": "overmap_terrain", "id": [ "retirement_community_37", "retirement_community_road" ], + "copy-from": "road_abstract", + "vision_levels": "blends_till_details", "name": "retirement community entrance", - "sym": "│", - "color": "dark_gray" + "sym": "│" }, { "type": "overmap_terrain", @@ -132,6 +138,7 @@ "retirement_community_2f_22", "retirement_community_2f_26" ], + "vision_levels": "city_building", "name": "retirement home", "sym": "<", "color": "light_green" @@ -139,6 +146,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_3f_18", "retirement_community_3f_22", "retirement_community_3f_26" ], + "vision_levels": "roof_or_air", "name": "retirement home roof", "sym": "<", "color": "light_green" @@ -146,6 +154,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_8", "retirement_community_14", "retirement_community_27", "retirement_community_33" ], + "vision_levels": "large_pavement", "name": "parking lot", "sym": "O", "color": "dark_gray" @@ -159,27 +168,25 @@ "retirement_community_29", "retirement_community_31" ], - "name": "road", - "sym": "─", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "─" }, { "type": "overmap_terrain", "id": [ "retirement_community_9", "retirement_community_13", "retirement_community_30" ], - "name": "road", - "sym": "┬", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "┬" }, { "type": "overmap_terrain", "id": [ "retirement_community_28", "retirement_community_32" ], - "name": "road", - "sym": "┴", - "color": "dark_gray" + "copy-from": "road_abstract", + "sym": "┴" }, { "type": "overmap_terrain", "id": [ "retirement_community_34", "retirement_community_35", "retirement_community_36" ], + "vision_levels": "city_building", "name": "community building", "sym": "C", "color": "pink" @@ -187,6 +194,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_38", "retirement_community_39", "retirement_community_40" ], + "vision_levels": "city_building", "name": "administration building", "sym": "A", "color": "light_gray" @@ -194,6 +202,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_b_37", "retirement_community_b_38" ], + "vision_levels": "city_building", "name": "administration building basement", "sym": "A", "color": "light_gray" @@ -201,6 +210,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_2f_34", "retirement_community_2f_35", "retirement_community_2f_36" ], + "vision_levels": "city_building", "name": "community building roof", "sym": "C", "color": "pink" @@ -208,6 +218,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_2f_38", "retirement_community_2f_39", "retirement_community_2f_40" ], + "vision_levels": "city_building", "name": "administration building roof", "sym": "A", "color": "light_gray" @@ -225,6 +236,7 @@ "retirement_community_park_8", "retirement_community_park_9" ], + "vision_levels": "forested", "name": "retirement community park", "sym": "┼", "color": "green" @@ -232,6 +244,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_park_2f_2", "retirement_community_park_2f_5" ], + "vision_levels": "always_full", "name": "open air", "sym": ".", "color": "blue" @@ -249,6 +262,7 @@ "retirement_community_park_b_8", "retirement_community_park_b_9" ], + "vision_levels": "city_building", "name": "retirement community park underground", "sym": "┼", "color": "brown" @@ -256,6 +270,7 @@ { "type": "overmap_terrain", "id": [ "retirement_community_sewer" ], + "vision_levels": "city_building", "name": "sewer", "sym": "┐", "color": "green" diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_river.json b/data/json/overmap/overmap_terrain/overmap_terrain_river.json index b46f4e09d1149..3ac3ee8a2c734 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_river.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_river.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "abstract": "generic_river", "copy-from": "generic_water", + "vision_levels": "water_body", "name": "river", "sym": "R", "color": "blue", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_robofachq.json b/data/json/overmap/overmap_terrain/overmap_terrain_robofachq.json index e6061982f02d9..c0d32e24898d6 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_robofachq.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_robofachq.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "id": [ "robofachq_roof_a0", "robofachq_roof_a3" ], + "vision_levels": "roof_or_air", "name": "open air", "sym": ".", "color": "blue" @@ -18,6 +19,7 @@ "robofachq_meteorology_roof2", "robofachq_meteorology_roof3" ], + "vision_levels": "large_building", "name": "meteorology station", "sym": "m", "color": "yellow", @@ -26,16 +28,16 @@ { "type": "overmap_terrain", "id": [ "robofachq_surface_road0", "robofachq_surface_road1", "robofachq_surface_road2", "robofachq_surface_road3" ], + "copy-from": "road_abstract", "name": "meteorology station", "sym": "─", - "color": "dark_gray", - "see_cost": 1, - "travel_cost_type": "road" + "see_cost": 1 }, { "type": "overmap_terrain", "id": [ "robofachq_rock", "robofachq_roof_e" ], "name": "A buggy non-place", + "vision_levels": "underground_stone", "looks_like": "empty_rock", "sym": "%", "color": "dark_gray", @@ -102,6 +104,7 @@ "robofachq_aiutl_b2", "robofachq_aiutl_b3" ], + "vision_levels": "large_building", "name": "hub 01", "sym": "0", "color": "light_blue", @@ -110,6 +113,7 @@ { "type": "overmap_terrain", "id": "robofachq_surface_parking", + "vision_levels": "large_pavement", "name": "hub 01 parking space", "sym": "0", "color": "light_blue", @@ -118,6 +122,7 @@ { "type": "overmap_terrain", "id": [ "robofachq_subcc_a0", "robofachq_subcc_a1", "robofachq_subcc_a2", "robofachq_subcc_a3" ], + "vision_levels": "underground_stone", "name": "subway C&C", "sym": "S", "color": "yellow", @@ -126,6 +131,7 @@ { "type": "overmap_terrain", "id": [ "robofachq_subline_a0", "robofachq_subline_a1", "robofachq_subline_a2", "robofachq_subline_a3" ], + "vision_levels": "underground_stone", "name": "hidden terminal", "sym": "s", "color": "light_blue", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_special.json b/data/json/overmap/overmap_terrain/overmap_terrain_special.json index 9621eacbd66b4..65c3b2a20a330 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_special.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_special.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "id": "special_deep_rock", "//": "For placing terrain lookalikes that unlike placing said terrain don't allow mapgen intended for the naturally found version", + "vision_levels": "always_full", "name": "solid rock", "looks_like": "deep_rock", "sym": "%", @@ -13,6 +14,7 @@ { "type": "overmap_terrain", "id": "special_rock", + "vision_levels": "always_full", "name": "solid rock", "sym": "%", "color": "dark_gray", @@ -24,6 +26,7 @@ "type": "overmap_terrain", "id": "special_earth", "name": "solid earth", + "vision_levels": "always_full", "sym": "#", "color": "brown", "looks_like": "solid_earth", @@ -34,6 +37,7 @@ "type": "overmap_terrain", "id": [ "special_field" ], "copy-from": "generic_open_land", + "vision_levels": "open_land", "name": "field", "sym": ".", "color": "brown", @@ -70,6 +74,7 @@ { "type": "overmap_terrain", "abstract": "generic_air", + "vision_levels": "roof_or_air", "name": "open air", "sym": ".", "color": "blue", @@ -134,6 +139,7 @@ "mil_base_8j1", "s_gas_g0_roof" ], + "vision_levels": "roof_or_air", "copy-from": "generic_air" }, { @@ -142,19 +148,10 @@ "id": [ "lab_subway_vent_shaft_roof", "special_air" ], "flags": [ "NO_ROTATE" ] }, - { - "type": "overmap_terrain", - "abstract": "generic_road", - "name": "road", - "looks_like": "road", - "color": "dark_gray", - "see_cost": 1, - "travel_cost_type": "road" - }, { "type": "overmap_terrain", "id": "evac_center_1", - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "┌" }, { @@ -170,13 +167,13 @@ "mil_base_6j", "mil_base_7j" ], - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "─" }, { "type": "overmap_terrain", "id": "evac_center_5", - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "┐" }, { @@ -199,31 +196,31 @@ "mil_base_4h", "mil_base_4i" ], - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "│" }, { "type": "overmap_terrain", "id": [ "evac_center_23", "mil_base_6f" ], - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "┬" }, { "type": "overmap_terrain", "id": [ "evac_center_21", "mil_base_4j" ], - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "└" }, { "type": "overmap_terrain", "id": [ "mil_base_4a", "mil_base_4f" ], - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "├" }, { "type": "overmap_terrain", "id": "evac_center_25", - "copy-from": "generic_road", + "copy-from": "road_abstract", "sym": "┘" } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_speedway.json b/data/json/overmap/overmap_terrain/overmap_terrain_speedway.json index ec98e9fa35181..1da4a88b64865 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_speedway.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_speedway.json @@ -40,99 +40,94 @@ }, { "type": "overmap_terrain", - "id": [ "speedway_1_0", "speedway_0_1" ], + "abstract": "speedway_track_abstract", "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "┌", + "vision_levels": "blends_till_outlines", + "name": "speedway" + }, + { + "type": "overmap_terrain", + "abstract": "speedway_track_red", + "copy-from": "speedway_track_abstract", "color": "red" }, { "type": "overmap_terrain", - "id": [ "speedway_6_4" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "┌", + "abstract": "speedway_track_white", + "copy-from": "speedway_track_abstract", "color": "white" }, + { + "type": "overmap_terrain", + "id": [ "speedway_1_0", "speedway_0_1" ], + "copy-from": "speedway_track_red", + "sym": "┌" + }, + { + "type": "overmap_terrain", + "id": [ "speedway_6_4" ], + "copy-from": "speedway_track_white", + "sym": "┌" + }, { "type": "overmap_terrain", "id": [ "speedway_0_4", "speedway_1_5" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "└", - "color": "white" + "copy-from": "speedway_track_white", + "sym": "└" }, { "type": "overmap_terrain", "id": [ "speedway_6_1" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "└", - "color": "red" + "copy-from": "speedway_track_red", + "sym": "└" }, { "type": "overmap_terrain", "id": [ "speedway_7_4", "speedway_6_5" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "┘", - "color": "red" + "copy-from": "speedway_track_red", + "sym": "┘" }, { "type": "overmap_terrain", "id": [ "speedway_1_1" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "┘", - "color": "white" + "copy-from": "speedway_track_white", + "sym": "┘" }, { "type": "overmap_terrain", "id": [ "speedway_6_0", "speedway_7_1" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "┐", - "color": "white" + "copy-from": "speedway_track_white", + "sym": "┐" }, { "type": "overmap_terrain", "id": [ "speedway_1_4" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "┐", - "color": "red" + "copy-from": "speedway_track_red", + "sym": "┐" }, { "type": "overmap_terrain", "id": [ "speedway_2_0", "speedway_4_0", "speedway_3_5", "speedway_5_5" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "─", - "color": "white" + "copy-from": "speedway_track_white", + "sym": "─" }, { "type": "overmap_terrain", "id": [ "speedway_3_0", "speedway_5_0", "speedway_2_5", "speedway_4_5" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "─", - "color": "red" + "copy-from": "speedway_track_red", + "sym": "─" }, { "type": "overmap_terrain", "id": [ "speedway_0_2", "speedway_7_3" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "│", - "color": "white" + "copy-from": "speedway_track_white", + "sym": "│" }, { "type": "overmap_terrain", "id": [ "speedway_0_3", "speedway_7_2" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "speedway", - "sym": "│", - "color": "red" + "copy-from": "speedway_track_red", + "sym": "│" }, { "type": "overmap_terrain", @@ -149,57 +144,56 @@ "speedway_5_6_1" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "large_building", "name": "bleachers", "sym": "^", "color": "light_blue" }, + { + "type": "overmap_terrain", + "abstract": "speedway_road_abstract", + "copy-from": "road_abstract", + "color": "light_gray", + "see_cost": 5, + "extras": "build", + "mondensity": 2, + "flags": [ "RISK_HIGH", "GENERIC_LOOT" ] + }, { "type": "overmap_terrain", "id": [ "speedway_8_2", "speedway_8_3", "speedway_8_4", "speedway_8_6", "speedway_5_9" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "road", - "sym": "│", - "color": "light_gray" + "copy-from": "speedway_road_abstract", + "sym": "│" }, { "type": "overmap_terrain", "id": [ "speedway_7_5", "speedway_6_7", "speedway_7_7" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "road", - "sym": "─", - "color": "light_gray" + "copy-from": "speedway_road_abstract", + "sym": "─" }, { "type": "overmap_terrain", "id": [ "speedway_8_7" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "road", - "sym": "┘", - "color": "light_gray" + "copy-from": "speedway_road_abstract", + "sym": "┘" }, { "type": "overmap_terrain", "id": [ "speedway_8_1" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "road", - "sym": "┐", - "color": "light_gray" + "copy-from": "speedway_road_abstract", + "sym": "┐" }, { "type": "overmap_terrain", "id": [ "speedway_8_5", "speedway_5_8" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "road", - "sym": "┤", - "color": "light_gray" + "copy-from": "speedway_road_abstract", + "sym": "┤" }, { "type": "overmap_terrain", "id": [ "speedway_5_7" ], - "copy-from": "generic_city_building_no_sidewalk", - "name": "road", - "sym": "├", - "color": "light_gray" + "copy-from": "speedway_road_abstract", + "sym": "├" }, { "type": "overmap_terrain", @@ -218,6 +212,7 @@ "speedway_4_9" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "large_pavement", "name": "parking lot", "sym": "O", "color": "dark_gray" @@ -226,6 +221,7 @@ "type": "overmap_terrain", "id": [ "speedway_9_3", "speedway_9_4", "speedway_9_5", "speedway_9_3_1", "speedway_9_4_1", "speedway_9_5_1" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "isolated_building", "name": "garage", "sym": "O", "color": "white" @@ -233,9 +229,9 @@ { "type": "overmap_terrain", "id": [ "speedway_6_7_1", "speedway_6_7_2", "speedway_6_7_3" ], - "copy-from": "generic_city_building_no_sidewalk", + "copy-from": "speedway_road_abstract", + "vision_levels": "isolated_building", "name": "announcer station", - "sym": "─", - "color": "light_gray" + "sym": "─" } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_stream.json b/data/json/overmap/overmap_terrain/overmap_terrain_stream.json index ae42dd9a2c4ef..853c63f038748 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_stream.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_stream.json @@ -6,6 +6,7 @@ "name": "stream", "sym": ".", "color": "light_blue", + "vision_levels": "blends_till_details", "flags": [ "REQUIRES_PREDECESSOR" ] } ] diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json b/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json index 2fcd75c6b7f70..dc1020feff78b 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json @@ -1,24 +1,29 @@ [ { "type": "overmap_terrain", - "id": "road", + "abstract": "road_abstract", "name": "road", "copy-from": "generic_transportation", "color": "dark_gray", "see_cost": 2, "travel_cost_type": "road", + "looks_like": "road", + "vision_levels": "blends_till_outlines" + }, + { + "type": "overmap_terrain", + "id": "road", + "copy-from": "road_abstract", "extras": "road", "flags": [ "LINEAR", "REQUIRES_PREDECESSOR" ] }, { "type": "overmap_terrain", "id": "road_nesw_manhole", - "copy-from": "generic_transportation", + "copy-from": "road_abstract", "name": "road, manhole", "sym": "┼", "color": "yellow", - "see_cost": 2, - "travel_cost_type": "road", "extras": "road_nesw_manhole", "flags": [ "KNOWN_DOWN", "NO_ROTATE" ] }, @@ -75,6 +80,7 @@ { "type": "overmap_terrain", "id": [ "roadstop", "roadstop_roof" ], + "vision_levels": "isolated_building", "name": "roadstop", "sym": "^", "color": "light_blue", @@ -83,6 +89,7 @@ { "type": "overmap_terrain", "id": [ "roadstop_a", "roadstop_a_roof" ], + "vision_levels": "isolated_building", "name": "public washroom", "sym": "^", "color": "light_blue", @@ -91,6 +98,7 @@ { "type": "overmap_terrain", "id": [ "roadstop_b", "roadstop_b_roof" ], + "vision_levels": "isolated_building", "name": "roadside foodcart", "sym": "^", "color": "magenta", @@ -101,6 +109,7 @@ "id": "forest_trail", "name": "forest trail", "color": "green", + "vision_levels": "forested", "flags": [ "LINEAR", "REQUIRES_PREDECESSOR" ], "land_use_code": "forest" }, @@ -108,6 +117,7 @@ "type": "overmap_terrain", "id": [ "trailhead", "trailhead_shack_z0", "trailhead_outhouse_z0" ], "name": "trailhead", + "vision_levels": "blends_till_details", "sym": "T", "color": "brown" }, @@ -121,6 +131,7 @@ "type": "overmap_terrain", "id": "sub_station", "name": "subway station", + "vision_levels": "city_building", "sym": "S", "color": "yellow", "see_cost": 5, @@ -132,6 +143,7 @@ "type": "overmap_terrain", "id": "sub_station_roof", "name": "subway station roof", + "vision_levels": "roof_or_air", "sym": "S", "color": "yellow", "see_cost": 5, @@ -143,6 +155,7 @@ "type": "overmap_terrain", "id": "sewer_sub_station", "name": "subway station (sewer level)", + "vision_levels": "underground_dirt", "sym": "S", "color": "yellow", "see_cost": 5, @@ -153,6 +166,7 @@ "type": "overmap_terrain", "id": "underground_sub_station", "name": "subway station (underground level)", + "vision_levels": "underground_stone", "sym": "S", "color": "yellow", "see_cost": 5, @@ -163,6 +177,7 @@ "type": "overmap_terrain", "id": "subway", "name": "subway", + "vision_levels": "underground_stone", "color": "dark_gray", "see_cost": 5, "extras": "subway", @@ -179,6 +194,7 @@ "type": "overmap_terrain", "id": "lab_subway", "name": "subway", + "vision_levels": "underground_stone", "color": "dark_gray", "see_cost": 5, "extras": "lab_subway", @@ -195,6 +211,7 @@ "type": "overmap_terrain", "id": [ "sub_ramp_above", "sub_ramp_below" ], "name": "subway ramp", + "vision_levels": "underground_stone", "sym": "S", "color": "dark_gray", "see_cost": 5 @@ -203,6 +220,7 @@ "type": "overmap_terrain", "id": [ "s_reststop_1", "s_reststop_2" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "isolated_building", "name": "rest area", "sym": "#", "color": "blue" @@ -211,6 +229,7 @@ "type": "overmap_terrain", "id": [ "s_reststop_1_roof", "s_reststop_2_roof" ], "copy-from": "generic_city_building", + "vision_levels": "roof_or_air", "name": "rest area roof", "sym": "#", "color": "blue" @@ -219,6 +238,7 @@ "type": "overmap_terrain", "id": [ "s_restparking_1", "s_restparking_2" ], "copy-from": "generic_city_building_no_sidewalk", + "vision_levels": "large_pavement", "name": "rest area parking", "sym": "+", "color": "dark_gray" @@ -226,6 +246,7 @@ { "type": "overmap_terrain", "id": [ "control_tower_0", "control_tower_1", "control_tower_2", "s_air_atc", "s_air_atc_2", "s_air_atc_3", "s_air_atc_4" ], + "vision_levels": "isolated_tower", "name": "control tower", "sym": "X", "color": "i_light_gray", @@ -236,6 +257,7 @@ "type": "overmap_terrain", "id": "control_tower_roof", "name": "control tower roof", + "vision_levels": "roof_or_air", "sym": "X", "color": "i_light_gray", "see_cost": 5, @@ -259,6 +281,7 @@ "s_air_runway_r" ], "name": "runway", + "vision_levels": "blends_till_outlines", "sym": "─", "color": "light_gray", "see_cost": 5, @@ -267,6 +290,7 @@ { "type": "overmap_terrain", "id": [ "runway_fuel", "runway_fuel2" ], + "vision_levels": "blends_till_outlines", "name": "runway", "sym": "─", "color": "light_gray", @@ -277,6 +301,7 @@ { "type": "overmap_terrain", "id": "fuel_station", + "vision_levels": "large_pavement", "name": "fuel station", "sym": ".", "color": "dark_gray", @@ -287,6 +312,7 @@ { "type": "overmap_terrain", "id": "fuel_station_roof", + "vision_levels": "roof_or_air", "name": "fuel station roof", "sym": ".", "color": "dark_gray", @@ -296,6 +322,7 @@ { "type": "overmap_terrain", "id": [ "airport_lot_0", "airport_lot_1", "s_air_parking" ], + "vision_levels": "large_pavement", "name": "parking lot", "sym": "O", "color": "dark_gray", @@ -305,6 +332,7 @@ { "type": "overmap_terrain", "id": [ "hangar", "s_air_hangars" ], + "vision_levels": "isolated_building", "name": "small hangar", "sym": "O", "color": "white", @@ -314,6 +342,7 @@ { "type": "overmap_terrain", "id": [ "hangar_roof", "s_air_hangars_roof" ], + "vision_levels": "roof_or_air", "name": "small hangar roof", "sym": "O", "color": "white", @@ -323,6 +352,7 @@ { "type": "overmap_terrain", "id": "s_air_term", + "vision_levels": "isolated_building", "name": "private airport terminal", "sym": "A", "color": "light_gray", @@ -333,6 +363,7 @@ { "type": "overmap_terrain", "id": "s_air_term_roof", + "vision_levels": "roof_or_air", "name": "private airport terminal roof", "sym": "A", "color": "light_gray", @@ -355,6 +386,7 @@ { "type": "overmap_terrain", "id": "s_air_helicopter_pad", + "vision_levels": "large_pavement", "name": "helicopter pad", "sym": "H", "color": "white", @@ -366,6 +398,7 @@ "type": "overmap_terrain", "id": [ "bus_stat_0", "bus_stat_1" ], "name": "bus station", + "vision_levels": "large_pavement", "sym": "B", "color": "i_light_cyan", "see_cost": 2, @@ -375,6 +408,7 @@ { "type": "overmap_terrain", "id": [ "bus_stat_0_roof", "bus_stat_1_roof" ], + "vision_levels": "roof_or_air", "name": "bus station roof", "sym": "B", "color": "i_light_cyan", @@ -413,6 +447,7 @@ "parking_garage_roof_top" ], "name": "parking garage", + "vision_levels": "city_building", "sym": "O", "color": "dark_gray", "see_cost": 5, @@ -447,6 +482,7 @@ "parking_3x1_2" ], "copy-from": "generic_city_building", + "vision_levels": "large_pavement", "name": "parking lot", "sym": "O", "color": "dark_gray" @@ -454,18 +490,16 @@ { "type": "overmap_terrain", "id": [ "s_lot_no_sidewalk", "trailer_hub_00" ], + "vision_levels": "large_pavement", "copy-from": "s_lot", "delete": { "flags": [ "SIDEWALK" ] } }, { "type": "overmap_terrain", "id": [ "trailer_road", "trailer_road_1parkway", "trailer_road_2parkway" ], - "copy-from": "generic_transportation", + "copy-from": "road_abstract", "extras": "road", - "name": "road", - "sym": "│", - "travel_cost_type": "road", - "color": "light_gray" + "sym": "│" }, { "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 5ea0f0eeac51e..d061f9738678c 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_triffid.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_triffid.json @@ -4,6 +4,7 @@ "id": "triffid_grove", "name": "triffid grove", "copy-from": "generic_forest", + "vision_levels": "unusual_structure", "sym": "T", "color": "light_red", "see_cost": 5, @@ -12,95 +13,18 @@ }, { "type": "overmap_terrain", - "id": "triffid_roots", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootss", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootsn", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootse", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootsw", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootsen", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootsnw", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootssw", - "name": "triffid roots", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "mondensity": 2, - "spawns": { "group": "GROUP_TRIFFID", "population": [ 40, 45 ], "chance": 80 }, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_rootsse", + "vision_levels": "underground_dirt", + "id": [ + "triffid_roots", + "triffid_rootss", + "triffid_rootsn", + "triffid_rootse", + "triffid_rootsw", + "triffid_rootsen", + "triffid_rootsnw", + "triffid_rootssw", + "triffid_rootsse" + ], "name": "triffid roots", "sym": "T", "color": "light_red", @@ -112,6 +36,7 @@ { "type": "overmap_terrain", "id": "triffid_finale", + "vision_levels": "underground_dirt", "name": "triffid heart", "sym": "T", "color": "red", @@ -122,16 +47,8 @@ }, { "type": "overmap_terrain", - "id": "triffid_grove_z3", - "name": "triffid grove trunk", - "sym": "T", - "color": "light_red", - "see_cost": 5, - "flags": [ "KNOWN_UP", "KNOWN_DOWN", "RISK_EXTREME" ] - }, - { - "type": "overmap_terrain", - "id": "triffid_grove_z2", + "id": [ "triffid_grove_z3", "triffid_grove_z2" ], + "vision_levels": "unusual_structure", "name": "triffid grove trunk", "sym": "T", "color": "light_red", @@ -141,6 +58,7 @@ { "type": "overmap_terrain", "id": "triffid_grove_roof", + "vision_levels": "roof_or_air", "name": "triffid grove roof", "sym": "T", "color": "light_red", @@ -150,6 +68,7 @@ { "type": "overmap_terrain", "id": "triffid_field", + "vision_levels": "unusual_structure", "name": "vibrant field", "copy-from": "generic_forest", "sym": ".", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json b/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json index bb06120c94dae..0ada5ca83ce9a 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json @@ -2,6 +2,7 @@ { "type": "overmap_terrain", "abstract": "generic_sewer", + "vision_levels": "underground_dirt", "name": "sewer", "color": "green", "see_cost": 5, @@ -30,6 +31,7 @@ "type": "overmap_terrain", "id": [ "sewage_treatment_0_0_0", "sewage_treatment_1_0_0", "sewage_treatment_1_1_0" ], "name": "sewage treatment plant", + "vision_levels": "isolated_building", "sym": "P", "color": "red", "see_cost": 5, @@ -38,6 +40,7 @@ { "type": "overmap_terrain", "id": "sewage_treatment_0_0_roof", + "vision_levels": "always_full", "name": "open air", "sym": ".", "color": "blue", @@ -47,6 +50,7 @@ "type": "overmap_terrain", "id": [ "sewage_treatment_1_0_roof", "sewage_treatment_1_1_roof", "sewage_treatment_1_0_upper_roof" ], "name": "sewage treatment plant roof", + "vision_levels": "isolated_building", "sym": "P", "color": "red", "see_cost": 5 @@ -57,6 +61,7 @@ "name": "sewage treatment plant", "sym": "O", "color": "blue", + "vision_levels": "single_water", "see_cost": 5, "flags": [ "KNOWN_DOWN" ] }, @@ -66,6 +71,7 @@ "name": "sewage treatment plant roof", "sym": "O", "color": "blue", + "vision_levels": "roof_or_air", "see_cost": 5 }, { @@ -81,6 +87,7 @@ "name": "sewage treatment plant - underground", "sym": "P", "color": "green", + "vision_levels": "underground_dirt", "see_cost": 5, "extras": "build", "flags": [ "KNOWN_UP" ] @@ -91,6 +98,7 @@ "name": "toxic waste dump", "sym": "D", "color": "pink", + "vision_levels": "isolated_building", "see_cost": 2, "flags": [ "RISK_HIGH" ] }, @@ -113,6 +121,7 @@ "name": "hazardous waste sarcophagus", "sym": "X", "color": "pink", + "vision_levels": "isolated_building", "see_cost": 5, "flags": [ "RISK_HIGH" ] }, @@ -120,6 +129,7 @@ "type": "overmap_terrain", "id": "pump_station_1", "copy-from": "generic_city_building", + "vision_levels": "isolated_building", "name": "pump station", "sym": "P", "color": "red", @@ -129,6 +139,7 @@ "type": "overmap_terrain", "id": [ "pump_station_1_roof", "pump_station_2_roof" ], "copy-from": "generic_city_building", + "vision_levels": "roof_or_air", "name": "pump station roof", "sym": "P", "color": "red", @@ -138,6 +149,7 @@ "type": "overmap_terrain", "id": "pump_station_2", "copy-from": "generic_city_building", + "vision_levels": "isolated_building", "name": "pump station", "sym": "P", "color": "red", @@ -147,6 +159,7 @@ "type": "overmap_terrain", "id": [ "pump_station_3", "pump_station_4", "pump_station_5" ], "name": "pump station", + "vision_levels": "isolated_building", "sym": "P", "color": "green", "see_cost": 999, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_waterbody.json b/data/json/overmap/overmap_terrain/overmap_terrain_waterbody.json index 99ec72599e70b..5c679dae2bbcd 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_waterbody.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_waterbody.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "abstract": "generic_lake", "copy-from": "generic_water", + "vision_levels": "water_body", "name": "lake", "sym": "#", "color": "blue", @@ -43,6 +44,7 @@ "type": "overmap_terrain", "abstract": "generic_ocean", "copy-from": "generic_water", + "vision_levels": "water_body", "name": "ocean", "sym": "#", "color": "blue", diff --git a/data/json/overmap/overmap_terrain/overmap_vitrified_terrain.json b/data/json/overmap/overmap_terrain/overmap_vitrified_terrain.json index 0b55339fa8c5d..a26d6daa1bf5e 100644 --- a/data/json/overmap/overmap_terrain/overmap_vitrified_terrain.json +++ b/data/json/overmap/overmap_terrain/overmap_vitrified_terrain.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "id": [ "unvitrified_farm_1", "unvitrified_farm_2", "unvitrified_farm_neg_1", "unvitrified_farm_0" ], "name": "quiet farmstead", + "vision_levels": "isolated_building", "sym": "G", "color": "i_light_gray", "flags": [ "NO_ROTATE" ], @@ -11,6 +12,7 @@ { "type": "overmap_terrain", "id": [ "unvitrified_orchard" ], + "vision_levels": "first_glance_forest", "name": "quiet orchard", "sym": "G", "color": "i_light_gray", diff --git a/data/json/overmap/overmap_terrain/river_cave.json b/data/json/overmap/overmap_terrain/river_cave.json index df6b2ed4ca24e..faa9e8ae3094c 100644 --- a/data/json/overmap/overmap_terrain/river_cave.json +++ b/data/json/overmap/overmap_terrain/river_cave.json @@ -3,6 +3,7 @@ "type": "overmap_terrain", "id": "c_cave_entrance", "name": "river cave entrance", + "vision_levels": "natural_outcropping", "sym": "O", "color": "light_cyan", "see_cost": 2, @@ -12,6 +13,7 @@ "type": "overmap_terrain", "id": "river_cave_food", "name": "kraken food storage", + "vision_levels": "underground_dirt", "sym": "O", "color": "cyan_green", "see_cost": 5, @@ -35,6 +37,7 @@ "type": "overmap_terrain", "id": "river_cave", "name": "river cave tunnel", + "vision_levels": "underground_dirt", "color": "brown", "see_cost": 5, "spawns": { "group": "GROUP_KRAKEN", "population": [ 4, 6 ], "chance": 100 }, diff --git a/data/json/overmap/vision_levels.json b/data/json/overmap/vision_levels.json new file mode 100644 index 0000000000000..66ccc93b47adb --- /dev/null +++ b/data/json/overmap/vision_levels.json @@ -0,0 +1,203 @@ +[ + { + "id": "default", + "type": "oter_vision", + "levels": [ ] + }, + { + "id": "always_full", + "type": "oter_vision", + "levels": [ ] + }, + { + "id": "isolated_building", + "type": "oter_vision", + "levels": [ + { "name": "building", "sym": "^", "color": "light_gray", "looks_like": "cabin" }, + { "name": "building", "sym": "^", "color": "light_gray", "looks_like": "cabin" }, + { "name": "building", "sym": "^", "color": "light_gray", "looks_like": "cabin" } + ] + }, + { + "id": "city_building", + "type": "oter_vision", + "levels": [ + { "name": "city", "sym": "#", "color": "light_gray" }, + { "name": "city building", "sym": "O", "color": "light_gray" }, + { "name": "city building", "sym": "O", "color": "light_gray" } + ] + }, + { + "id": "isolated_tower", + "type": "oter_vision", + "levels": [ { "name": "tower", "sym": "0", "color": "light_gray" }, { "name": "tower", "sym": "0", "color": "light_gray" } ] + }, + { + "id": "island", + "type": "oter_vision", + "levels": [ { "blends_adjacent": true }, { "name": "island", "sym": "o", "color": "brown" } ] + }, + { + "id": "wreckage", + "type": "oter_vision", + "levels": [ { "name": "wreckage", "sym": "^", "color": "dark_gray" }, { "name": "wreckage", "sym": "^", "color": "dark_gray" } ] + }, + { + "id": "forested", + "type": "oter_vision", + "levels": [ + { "name": "forest", "sym": "F", "color": "green", "looks_like": "forest_thick" }, + { "name": "forest", "sym": "F", "color": "green", "looks_like": "forest_thick" }, + { "name": "forest", "sym": "F", "color": "green", "looks_like": "forest_thick" } + ] + }, + { + "id": "first_glance_forest", + "type": "oter_vision", + "levels": [ + { "name": "forest", "sym": "F", "color": "green", "looks_like": "forest_thick" }, + { "name": "managed forest", "sym": "F", "color": "green", "looks_like": "forest" } + ] + }, + { + "id": "forested_swampy", + "type": "oter_vision", + "levels": [ + { "name": "forest", "sym": "F", "color": "green", "looks_like": "forest_thick" }, + { "name": "swamp", "sym": "F", "color": "cyan", "looks_like": "forest_water" }, + { "name": "swamp", "sym": "F", "color": "cyan", "looks_like": "forest_water" } + ] + }, + { + "id": "open_land", + "type": "oter_vision", + "levels": [ + { "name": "field", "sym": ".", "color": "brown", "looks_like": "field" }, + { "name": "field", "sym": ".", "color": "brown", "looks_like": "field" } + ] + }, + { + "id": "farm_field", + "type": "oter_vision", + "levels": [ + { "name": "field", "sym": ".", "color": "brown", "looks_like": "field" }, + { "name": "farm field", "sym": "#", "color": "i_brown" } + ] + }, + { + "id": "large_pavement", + "type": "oter_vision", + "levels": [ { "blends_adjacent": true }, { "name": "pavement", "sym": "O", "color": "dark_gray", "looks_like": "s_lot" } ] + }, + { + "id": "single_water", + "type": "oter_vision", + "levels": [ + { "name": "water", "sym": "O", "color": "blue", "looks_like": "pond_field" }, + { "name": "water", "sym": "O", "color": "blue", "looks_like": "pond_field" } + ] + }, + { + "id": "water_body", + "type": "oter_vision", + "levels": [ + { "name": "water body", "sym": "#", "color": "blue", "looks_like": "river_center" }, + { "name": "water body", "sym": "#", "color": "blue", "looks_like": "river_center" } + ] + }, + { + "id": "roof_or_air", + "type": "oter_vision", + "levels": [ + { "name": "open air", "color": "blue", "sym": ".", "looks_like": "open_air" }, + { "name": "open air", "color": "blue", "sym": ".", "looks_like": "open_air" } + ] + }, + { + "id": "underground_dirt", + "type": "oter_vision", + "levels": [ { "name": "underground", "color": "brown", "sym": "#" }, { "name": "basement", "color": "black", "sym": "O" } ] + }, + { + "id": "underground_stone", + "type": "oter_vision", + "levels": [ { "name": "underground", "color": "brown", "sym": "#" }, { "name": "basement", "color": "black", "sym": "O" } ] + }, + { + "id": "large_building", + "type": "oter_vision", + "levels": [ + { "name": "large building", "color": "i_white", "sym": "+" }, + { "name": "large building", "color": "i_white", "sym": "+" }, + { "name": "large building", "color": "i_white", "sym": "+" } + ] + }, + { + "id": "large_city_building", + "type": "oter_vision", + "levels": [ + { "name": "city", "color": "light_gray", "sym": "#" }, + { "name": "large building", "color": "i_light_gray", "sym": "+" }, + { "name": "large building", "color": "i_light_gray", "sym": "+" } + ] + }, + { + "id": "large_structure", + "//": "more recognizable structure, easier to figure out what is", + "type": "oter_vision", + "levels": [ + { "name": "structure", "color": "light_gray", "sym": "#" }, + { "name": "structure", "color": "light_gray", "sym": "#" } + ] + }, + { + "id": "large_ship", + "type": "oter_vision", + "levels": [ { "name": "ship", "color": "dark_gray", "sym": "#" }, { "name": "ship", "color": "dark_gray", "sym": "#" } ] + }, + { + "id": "large_outcropping", + "type": "oter_vision", + "levels": [ + { "name": "outcropping", "color": "light_gray", "sym": "X" }, + { "name": "outcropping", "color": "light_gray", "sym": "X" } + ] + }, + { + "id": "natural_outcropping", + "type": "oter_vision", + "levels": [ + { "blends_adjacent": true }, + { "name": "outcropping", "color": "brown", "sym": "^" }, + { "name": "outcropping", "color": "brown", "sym": "^" } + ] + }, + { + "id": "natural_depression", + "type": "oter_vision", + "levels": [ + { "blends_adjacent": true }, + { "name": "depression", "color": "brown", "sym": "U" }, + { "name": "depression", "color": "brown", "sym": "U" } + ] + }, + { + "id": "unusual_structure", + "//": "can't even mistake it for something familiar", + "type": "oter_vision", + "levels": [ + { "name": "unusual structure", "sym": "8", "color": "i_brown" }, + { "name": "unusual structure", "sym": "8", "color": "i_brown" } + ] + }, + { + "id": "blends_till_outlines", + "type": "oter_vision", + "levels": [ { "blends_adjacent": true } ] + }, + { + "id": "blends_till_details", + "type": "oter_vision", + "levels": [ { "blends_adjacent": true }, { "blends_adjacent": true } ] + } +] diff --git a/doc/OVERMAP.md b/doc/OVERMAP.md index d8c4162ac3531..2c7a959628a5c 100644 --- a/doc/OVERMAP.md +++ b/doc/OVERMAP.md @@ -210,6 +210,21 @@ update these definitions as follows: } ``` +### oter_vision + +When the overmap is displayed to the player through the map screen, tiles can be displayed with +varying degrees of information. There are five levels of overmap vision, each providing progressively +more detail about the shown tile. They are as follows: + +- unseen, no information is known about the tile +- vague, only cursory details such as from a quick glance - broad features +- outlines, able to distinguish large/visible features +- details, features that are harder to spot become visible +- full, all information provided in the **overmap_terrain** is provided + +The information on how to display the middle three vision levels is provided in a **oter_vision** +defintion. + ## Overmap Terrain ### Rotation @@ -231,6 +246,7 @@ rotation for the referenced overmap terrains (e.g. the `_north` version for all) | `sym` | Symbol used when drawing the location, like `"F"` (or you may use an ASCII value like `70`). | | `color` | Color to draw the symbol in. See [COLOR.md](COLOR.md). | | `looks_like` | Id of another overmap terrain to be used for the graphical tile, if this doesn't have one. | +| `vision_levels` | Id of a `oter_vision` that describes how this overmap terrain will be displayed when there is not full vision of the tile. | `connect_group` | Specify that this overmap terrain might be graphically connected to its neighbours, should a tileset wish to. It will connect to any other `overmap_terrain` with the same `connect_group`. | | `see_cost` | Affects player vision on overmap. Higher values obstruct vision more. | | `travel_cost_type` | How to treat this location when planning a route using autotravel on the overmap. Valid values are `road`,`field`,`dirt_road`,`trail`,`forest`,`shore`,`swamp`,`water`,`air`,`impassable`,`other`. Some types are harder to travel through with different types of vehicles, or on foot. | @@ -281,6 +297,42 @@ an exhaustive example... } ``` +## Overmap Vision + +### Fields + +| Identifier | Description | +|------------|-------------| +| type | Must be `oter_vision` | +| id | Identifier of this `oter_vision`. Cannot contain a `$`. | +| levels | Array of vision levels. Between 0 and 3 can be specified. The information is specified in the order of vague, outlines, detailed | + +For levels, each entry is a JSON object with the following fields + +| Identifier | Description | +|------------|-------------| +| name | Same as an overmap_terrain name | +| sym | Same as an overmap_terrain sym | +| color | Same as an overmap_terrain color | +| looks_like | overmap_terrain id that will be drawn if there is no tile drawn | +| blends_adjacent | If true, the other fields will be ignored and instead of drawing this tile, the most common adjacent tile will be selected and drawn instead | + +For tilesets, the id for each level will be specified as: `id$VISION_LEVEL`, where `VISION_LEVEL` is +replaced by one of `vague`, `outlines`, or `details`. + +### Example + +```json +{ + "type": "oter_vision", + "id": "example_vision", + "levels": [ + { "blends_adjacent": true }, + { "name": "example", "sym": "&", "color": "white" } + ] +} +``` + ## Overmap Special An overmap special is an entity that is placed in the overmap after the city generation process has diff --git a/lang/string_extractor/parser.py b/lang/string_extractor/parser.py index 589e204481c61..db2099f258c3a 100644 --- a/lang/string_extractor/parser.py +++ b/lang/string_extractor/parser.py @@ -43,6 +43,7 @@ from .parsers.npc import parse_npc from .parsers.npc_class import parse_npc_class from .parsers.option_slider import parse_option_slider +from .parsers.oter_vision import parse_oter_vision from .parsers.overmap_terrain import parse_overmap_terrain from .parsers.palette import parse_palette from .parsers.profession import parse_profession @@ -192,6 +193,7 @@ def dummy_parser(json, origin): "npc": parse_npc, "npc_class": parse_npc_class, "oter_id_migration": dummy_parser, + "oter_vision": parse_oter_vision, "option_slider": parse_option_slider, "overlay_order": dummy_parser, "overmap_connection": dummy_parser, diff --git a/lang/string_extractor/parsers/oter_vision.py b/lang/string_extractor/parsers/oter_vision.py new file mode 100644 index 0000000000000..70d388e4c4f20 --- /dev/null +++ b/lang/string_extractor/parsers/oter_vision.py @@ -0,0 +1,9 @@ +from ..write_text import write_text + + +def parse_oter_vision(json, origin): + if "levels" in json: + for level in json["levels"]: + if "name" in json: + write_text(json["name"], origin, + comment="oter vision level name") diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index 4dc347232a0c3..c153a814b1abc 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -76,6 +76,7 @@ #include "npc.h" #include "omdata.h" #include "output.h" +#include "overmap.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" @@ -3790,7 +3791,7 @@ void activity_handlers::tree_communion_do_turn( player_activity *act, Character seen.insert( loc ); const std::function filter = []( const oter_id & ter ) { // FIXME: this is terrible and should be a property instead of a name check... - return ter.obj().is_wooded() || ter.obj().get_name() == _( "field" ); + return ter.obj().is_wooded() || ter.obj().get_name( om_vision_level::full ) == _( "field" ); }; while( !q.empty() ) { tripoint_abs_omt tpt = q.front(); diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index d862f8da72169..fd42c31842457 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -52,6 +52,7 @@ #include "npc.h" #include "output.h" #include "overlay_ordering.h" +#include "overmap.h" #include "path_info.h" #include "pixel_minimap.h" #include "rect_range.h" @@ -100,7 +101,7 @@ static const std::array multitile_keys = {{ }; static const std::string empty_string; -static const std::array TILE_CATEGORY_IDS = {{ +static const std::array TILE_CATEGORY_IDS = {{ "", // TILE_CATEGORY::NONE, "vehicle_part", // TILE_CATEGORY::VEHICLE_PART, "terrain", // TILE_CATEGORY::TERRAIN, @@ -114,6 +115,7 @@ static const std::array TILE_CATEGORY_IDS = {{ "hit_entity", // TILE_CATEGORY::HIT_ENTITY, "weather", // TILE_CATEGORY::WEATHER, "overmap_terrain", // TILE_CATEGORY::OVERMAP_TERRAIN + "overmap_vision_level", // TILE_CATEGORY::OVERMAP_VISION_LEVEL "overmap_weather", // TILE_CATEGORY::OVERMAP_WEATHER "map_extra", // TILE_CATEGORY::MAP_EXTRA "overmap_note", // TILE_CATEGORY::OVERMAP_NOTE @@ -2325,6 +2327,18 @@ cata_tiles::find_tile_looks_like( const std::string &id, TILE_CATEGORY category, looks_like_jumps_limit ); case TILE_CATEGORY::MONSTER: return find_tile_looks_like_by_string_id( id, category, looks_like_jumps_limit ); + case TILE_CATEGORY::OVERMAP_VISION_LEVEL: { + size_t id_end = id.find( '$' ); + om_vision_level level = io::string_to_enum( id.substr( id_end + 1 ) ); + oter_vision_id vision_id( id.substr( 0, id_end ) ); + // This shouldn't fail, but better safe than sorry + const oter_vision::level *viewed = vision_id->viewed( level ); + if( viewed != nullptr && !viewed->looks_like.empty() ) { + return find_tile_looks_like( viewed->looks_like, TILE_CATEGORY::OVERMAP_TERRAIN, variant, + looks_like_jumps_limit - 1 ); + } + return std::nullopt; + } case TILE_CATEGORY::OVERMAP_TERRAIN: { std::optional ret; const oter_type_str_id type_tmp( id ); @@ -2501,7 +2515,8 @@ bool cata_tiles::draw_from_id_string_internal( const std::string &id, TILE_CATEG 1.0f ) ) ); } - if( prevent_occlusion_transp && retract > 0 ) { + // Adding to the id like this breaks the fragile string handling that vision level uses for looks_like. + if( prevent_occlusion_transp && retract > 0 && category != TILE_CATEGORY::OVERMAP_VISION_LEVEL ) { res = find_tile_looks_like( id + "_transparent", category, variant ); if( res ) { tt = &res -> tile(); @@ -2614,6 +2629,16 @@ bool cata_tiles::draw_from_id_string_internal( const std::string &id, TILE_CATEG sym = weather_def->symbol; col = weather_def->map_color; } + } else if( category == TILE_CATEGORY::OVERMAP_VISION_LEVEL ) { + size_t id_end = id.find( '$' ); + om_vision_level level = io::string_to_enum( id.substr( id_end + 1 ) ); + oter_vision_id vision_id( id.substr( 0, id_end ) ); + // if we have gotten this far, this call can't fail, because the id never would have + // been generated to get it. Nonetheless, better safe than sorry + if( const oter_vision::level *viewed = vision_id->viewed( level ) ) { + sym = viewed->symbol; + col = viewed->color; + } } else if( category == TILE_CATEGORY::OVERMAP_TERRAIN ) { const oter_type_str_id tmp( id ); if( tmp.is_valid() ) { @@ -2623,9 +2648,9 @@ bool cata_tiles::draw_from_id_string_internal( const std::string &id, TILE_CATEG rota %= om_direction::size; sym = tmp->get_rotated( static_cast( rota ) )->get_uint32_symbol(); } else { - sym = tmp->symbol; + sym = tmp->get_uint32_symbol(); } - col = tmp->color; + col = tmp->get_color(); } } else if( category == TILE_CATEGORY::OVERMAP_NOTE ) { sym = static_cast( id[5] ); @@ -5380,6 +5405,17 @@ void cata_tiles::do_tile_loading_report() oter_types.erase( std::unique( oter_types.begin(), oter_types.end() ), oter_types.end() ); tile_loading_report_seq_ids( oter_types, TILE_CATEGORY::OVERMAP_TERRAIN ); + std::vector oter_vision_levels; + for( const oter_vision &level : oter_vision::get_all() ) { + oter_vision_levels.push_back( level.get_id().str() + "$" + + io::enum_to_string( om_vision_level::details ) ); + oter_vision_levels.push_back( level.get_id().str() + "$" + + io::enum_to_string( om_vision_level::outlines ) ); + oter_vision_levels.push_back( level.get_id().str() + "$" + + io::enum_to_string( om_vision_level::vague ) ); + } + tile_loading_report_seq_ids( oter_vision_levels, TILE_CATEGORY::OVERMAP_VISION_LEVEL ); + std::vector map_extra_ids = MapExtras::get_all_function_names(); map_extra_ids.erase( std::remove_if( map_extra_ids.begin(), map_extra_ids.end(), @@ -5390,7 +5426,7 @@ void cata_tiles::do_tile_loading_report() // TODO: OVERMAP_NOTE - static_assert( static_cast( TILE_CATEGORY::last ) == 16, + static_assert( static_cast( TILE_CATEGORY::last ) == 17, "If you add more tile categories then update this tile loading report and then " "increment the value in this static_assert accordingly" ); diff --git a/src/cata_tiles.h b/src/cata_tiles.h index 82d0533518e8b..01af515574368 100644 --- a/src/cata_tiles.h +++ b/src/cata_tiles.h @@ -65,6 +65,7 @@ enum class TILE_CATEGORY { HIT_ENTITY, WEATHER, OVERMAP_TERRAIN, + OVERMAP_VISION_LEVEL, OVERMAP_WEATHER, MAP_EXTRA, OVERMAP_NOTE, @@ -85,6 +86,7 @@ const std::unordered_map to_TILE_CATEGORY = { {"hit_entity", TILE_CATEGORY::HIT_ENTITY}, {"weather", TILE_CATEGORY::WEATHER}, {"overmap_terrain", TILE_CATEGORY::OVERMAP_TERRAIN}, + {"overmap_vision_level", TILE_CATEGORY::OVERMAP_VISION_LEVEL}, {"overmap_weather", TILE_CATEGORY::OVERMAP_WEATHER}, {"map_extra", TILE_CATEGORY::MAP_EXTRA}, {"overmap_note", TILE_CATEGORY::OVERMAP_NOTE} @@ -716,8 +718,8 @@ class cata_tiles static std::vector build_renderer_list(); static std::vector build_display_list(); private: - std::string get_omt_id_rotation_and_subtile( - const tripoint_abs_omt &omp, int &rota, int &subtile ); + std::pair get_omt_id_rotation_and_subtile( const tripoint_abs_omt &omp, + int &rota, int &subtile ); protected: template void tile_loading_report_map( const maptype &tiletypemap, TILE_CATEGORY category, diff --git a/src/character.cpp b/src/character.cpp index 034ff9683d4e8..55674ac36cc49 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -1292,7 +1292,9 @@ bool Character::overmap_los( const tripoint_abs_omt &omt, int sight_points ) con int Character::overmap_sight_range( float light_level ) const { + // How many map tiles I can given the light?? int sight = sight_range( light_level ); + // What are these doing??? if( sight < SEEX ) { sight = 0; } @@ -1300,38 +1302,50 @@ int Character::overmap_sight_range( float light_level ) const sight /= ( SEEX / 2 ); } + // Clamp it for some reason? if( sight > 0 ) { sight = 6; } + // enchantment modifiers sight += enchantment_cache->get_value_add( enchant_vals::mod::OVERMAP_SIGHT ); - float multiplier = 1 + enchantment_cache->get_value_multiply( enchant_vals::mod::OVERMAP_SIGHT ); // If sight got changed due OVERMAP_SIGHT, process the rest of the modifiers, otherwise skip them if( sight > 0 ) { // The higher your perception, the farther you can see. sight += static_cast( get_per() / 2 ); - // The higher up you are, the farther you can see. - sight += std::max( 0, posz() ) * 2; + } - // Binoculars double your sight range. - // When adding checks here, also call game::update_overmap_seen at the place they first become true - const bool has_optic = cache_has_item_with( flag_ZOOM ) || - has_flag( json_flag_ENHANCED_VISION ) || - ( is_mounted() && mounted_creature->has_flag( mon_flag_MECH_RECON_VISION ) ) || - get_map().veh_at( pos_bub() ).avail_part_with_feature( "ENHANCED_VISION" ).has_value(); + if( sight == 0 ) { + return 0; + } - if( has_optic ) { - multiplier += 1; - } + return std::max( std::round( sight * multiplier ), 3 ); +} + +int Character::overmap_modified_sight_range( float light_level ) const +{ + int sight = overmap_sight_range( light_level ); + + // The higher up you are, the farther you can see. + sight += std::max( 0, posz() ) * 2; + + // Binoculars double your sight range. + // When adding checks here, also call game::update_overmap_seen at the place they first become true + const bool has_optic = cache_has_item_with( flag_ZOOM ) || + has_flag( json_flag_ENHANCED_VISION ) || + ( is_mounted() && mounted_creature->has_flag( mon_flag_MECH_RECON_VISION ) ) || + get_map().veh_at( pos_bub() ).avail_part_with_feature( "ENHANCED_VISION" ).has_value(); + + if( has_optic ) { + sight *= 2; } if( sight == 0 ) { return 0; } - sight = std::round( sight * multiplier ); return std::max( sight, 3 ); } diff --git a/src/character.h b/src/character.h index 228749f030845..62d786d07a9ad 100644 --- a/src/character.h +++ b/src/character.h @@ -862,6 +862,8 @@ class Character : public Creature, public visitable bool overmap_los( const tripoint_abs_omt &omt, int sight_points ) const; /** Returns the distance the player can see on the overmap */ int overmap_sight_range( float light_level ) const; + /** Returns the distance the player can see on the overmap, modified by zoom & height */ + int overmap_modified_sight_range( float light_level ) const; /** Returns the distance the player can see through walls */ int clairvoyance() const; /** Returns true if the player has some form of impaired sight */ diff --git a/src/computer_session.cpp b/src/computer_session.cpp index b639e55e26124..2ff32d849707c 100644 --- a/src/computer_session.cpp +++ b/src/computer_session.cpp @@ -693,7 +693,7 @@ void computer_session::action_map_sewer() const oter_id &oter = overmap_buffer.ter( center + offset ); if( ( oter->get_type_id() == oter_type_sewer ) || is_ot_match( "sewage", oter, ot_match_type::prefix ) ) { - overmap_buffer.set_seen( center + offset, true ); + overmap_buffer.set_seen( center + offset, om_vision_level::details ); } } } @@ -712,7 +712,7 @@ void computer_session::action_map_subway() const oter_id &oter = overmap_buffer.ter( center + offset ); if( ( oter->get_type_id() == oter_type_subway ) || is_ot_match( "lab_train_depot", oter, ot_match_type::contains ) ) { - overmap_buffer.set_seen( center + offset, true ); + overmap_buffer.set_seen( center + offset, om_vision_level::details ); } } } diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 261e30ede5bcc..9dc9de28e01e0 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -2169,7 +2169,7 @@ static void character_edit_menu() if( np->has_destination() ) { data << string_format( _( "Destination: %s %s" ), np->goal.to_string(), - overmap_buffer.ter( np->goal )->get_name() ) << std::endl; + overmap_buffer.ter( np->goal )->get_name( om_vision_level::full ) ) << std::endl; } data << string_format( _( "Trust: %d" ), np->op_of_u.trust ) << " " << string_format( _( "Fear: %d" ), np->op_of_u.fear ) << " " @@ -2939,7 +2939,7 @@ static void debug_menu_game_state() popup_top( s.c_str(), player_character.posx(), player_character.posy(), abs_sub.x(), abs_sub.y(), - overmap_buffer.ter( player_character.global_omt_location() )->get_name(), + overmap_buffer.ter( player_character.global_omt_location() )->get_name( om_vision_level::full ), to_turns( calendar::turn - calendar::turn_zero ), g->num_creatures() ); for( const npc &guy : g->all_npcs() ) { @@ -3668,11 +3668,22 @@ void debug() break; case debug_menu_index::REVEAL_MAP: { + uilist vis_sel; + vis_sel.text = _( "Reveal at which vision level?" ); + for( int i = static_cast( om_vision_level::unseen ); + i < static_cast( om_vision_level::last ); ++i ) { + vis_sel.addentry( i, true, std::nullopt, io::enum_to_string( static_cast( i ) ) ); + } + vis_sel.query(); + int vis_ret = vis_sel.ret; + if( vis_ret == UILIST_CANCEL ) { + break; + } overmap &cur_om = g->get_cur_om(); for( int i = 0; i < OMAPX; i++ ) { for( int j = 0; j < OMAPY; j++ ) { for( int k = -OVERMAP_DEPTH; k <= OVERMAP_HEIGHT; k++ ) { - cur_om.set_seen( { i, j, k }, true ); + cur_om.set_seen( { i, j, k }, static_cast( vis_ret ), true ); } } } diff --git a/src/display.cpp b/src/display.cpp index 51e897627220b..9850ee064dd43 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -1123,7 +1123,8 @@ std::string display::colorized_overmap_text( const avatar &u, const int width, c const int top = -( height / 2 ); const int bottom = height + top - 1; - oter_display_options opts( center_xyz, u.overmap_sight_range( g->light_level( u.posz() ) ) ); + oter_display_options opts( center_xyz, + u.overmap_modified_sight_range( g->light_level( u.posz() ) ) ); opts.showhordes = true; if( mission_xyz != overmap::invalid_tripoint ) { opts.mission_target = mission_xyz; @@ -1175,7 +1176,8 @@ std::string display::current_position_text( const tripoint_abs_omt &loc ) if( const timed_event *e = get_timed_events().get( timed_event_type::OVERRIDE_PLACE ) ) { return e->string_id; } - return overmap_buffer.ter( loc )->get_name(); + om_vision_level seen = overmap_buffer.seen( loc ); + return overmap_buffer.ter( loc )->get_name( seen ); } // Return (x, y) position of mission target, relative to avatar location, within an overmap of the diff --git a/src/editmap.cpp b/src/editmap.cpp index 6e0e05235e671..67f376b621d76 100644 --- a/src/editmap.cpp +++ b/src/editmap.cpp @@ -48,6 +48,7 @@ #include "omdata.h" #include "options.h" #include "output.h" +#include "overmap.h" #include "overmapbuffer.h" #include "scent_map.h" #include "shadowcasting.h" @@ -1974,8 +1975,8 @@ void editmap::mapgen_preview( const real_coords &tc, uilist &gmenu ) here.rebuild_vehicle_level_caches(); } else if( gpmenu.ret == 3 ) { popup( _( "Changed oter_id from '%s' (%s) to '%s' (%s)" ), - orig_oters->get_name(), orig_oters.id().str(), - omt_ref->get_name(), omt_ref.id().str() ); + orig_oters->get_name( om_vision_level::full ), orig_oters.id().str(), + omt_ref->get_name( om_vision_level::full ), omt_ref.id().str() ); } else if( gpmenu.ret == UILIST_ADDITIONAL ) { if( gpmenu.ret_act == "LEFT" ) { gmenu.scrollby( -1 ); @@ -2147,8 +2148,8 @@ void editmap::edit_mapgen() gmenu.addentry( -1, !id.id().is_null(), 0, "[%3d] %s", static_cast( id ), id.id().str() ); gmenu.entries[i].extratxt.left = 1; - gmenu.entries[i].extratxt.color = id->get_color(); - gmenu.entries[i].extratxt.txt = id->get_symbol(); + gmenu.entries[i].extratxt.color = id->get_color( om_vision_level::full ); + gmenu.entries[i].extratxt.txt = id->get_symbol( om_vision_level::full ); } real_coords tc; diff --git a/src/faction_camp.cpp b/src/faction_camp.cpp index 99801bccbb5ec..26c17ad81efd9 100644 --- a/src/faction_camp.cpp +++ b/src/faction_camp.cpp @@ -4994,7 +4994,7 @@ tripoint_abs_omt om_target_tile( const tripoint_abs_omt &omt_pos, int min_range, const oter_id &omt_ref = overmap_buffer.ter( omt_tgt ); - if( must_see && !overmap_buffer.seen( omt_tgt ) ) { + if( must_see && overmap_buffer.seen( omt_tgt ) == om_vision_level::unseen ) { errors = true; popup( _( "You must be able to see the target that you select." ) ); } diff --git a/src/game.cpp b/src/game.cpp index 423a8d0941e10..a85aff7333c23 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -7237,10 +7237,11 @@ void game::pre_print_all_tile_info( const tripoint &lp, const catacurses::window { // get global area info according to look_around caret position // TODO: fix point types - const oter_id &cur_ter_m = overmap_buffer.ter( tripoint_abs_omt( ms_to_omt_copy( m.getabs( - lp ) ) ) ); + tripoint_abs_omt omp( ms_to_omt_copy( m.getabs( lp ) ) ); + const oter_id &cur_ter_m = overmap_buffer.ter( omp ); + om_vision_level vision = overmap_buffer.seen( omp ); // we only need the area name and then pass it to print_all_tile_info() function below - const std::string area_name = cur_ter_m->get_name(); + const std::string area_name = cur_ter_m->get_name( vision ); print_all_tile_info( lp, w_info, area_name, 1, first_line, last_line, cache ); } @@ -12358,7 +12359,7 @@ void game::vertical_notes( int z_before, int z_after ) const tripoint_abs_omt cursp_before( p.xy(), z_before ); const tripoint_abs_omt cursp_after( p.xy(), z_after ); - if( !overmap_buffer.seen( cursp_before ) ) { + if( overmap_buffer.seen( cursp_before ) == om_vision_level::unseen ) { continue; } if( overmap_buffer.has_note( cursp_after ) ) { @@ -12369,11 +12370,11 @@ void game::vertical_notes( int z_before, int z_after ) const oter_id &ter2 = overmap_buffer.ter( cursp_after ); if( z_after > z_before && ter->has_flag( oter_flags::known_up ) && !ter2->has_flag( oter_flags::known_down ) ) { - overmap_buffer.set_seen( cursp_after, true ); + overmap_buffer.set_seen( cursp_after, om_vision_level::full ); overmap_buffer.add_note( cursp_after, string_format( ">:W;%s", _( "AUTO: goes down" ) ) ); } else if( z_after < z_before && ter->has_flag( oter_flags::known_down ) && !ter2->has_flag( oter_flags::known_up ) ) { - overmap_buffer.set_seen( cursp_after, true ); + overmap_buffer.set_seen( cursp_after, om_vision_level::full ); overmap_buffer.add_note( cursp_after, string_format( "<:W;%s", _( "AUTO: goes up" ) ) ); } } @@ -12478,10 +12479,11 @@ point game::update_map( int &x, int &y, bool z_level_changed ) void game::update_overmap_seen() { const tripoint_abs_omt ompos = u.global_omt_location(); - const int dist = u.overmap_sight_range( light_level( u.posz() ) ); + const int dist = u.overmap_modified_sight_range( light_level( u.posz() ) ); + const int base_sight = u.overmap_sight_range( light_level( u.posz() ) ); const int dist_squared = dist * dist; // We can always see where we're standing - overmap_buffer.set_seen( ompos, true ); + overmap_buffer.set_seen( ompos, om_vision_level::full ); for( const tripoint_abs_omt &p : points_in_radius( ompos, dist ) ) { const point_rel_omt delta = p.xy() - ompos.xy(); const int h_squared = delta.x() * delta.x() + delta.y() * delta.y(); @@ -12504,12 +12506,22 @@ void game::update_overmap_seen() const oter_id &ter = overmap_buffer.ter( *it ); sight_points -= static_cast( ter->get_see_cost() ) * multiplier; } - if( sight_points >= 0 ) { + const auto set_seen = []( const tripoint_abs_omt & p, om_vision_level level ) { tripoint_abs_omt seen( p ); do { - overmap_buffer.set_seen( seen, true ); + overmap_buffer.set_seen( seen, level ); --seen.z(); } while( seen.z() >= 0 ); + }; + int tiles_from = rl_dist( p, ompos ); + if( tiles_from < std::floor( base_sight / 2 ) ) { + set_seen( p, om_vision_level::full ); + } else if( tiles_from < base_sight ) { + set_seen( p, om_vision_level::details ); + } else if( tiles_from < base_sight * 2 ) { + set_seen( p, om_vision_level::outlines ); + } else { + set_seen( p, om_vision_level::vague ); } } } diff --git a/src/iexamine.cpp b/src/iexamine.cpp index c583cc3cc9c28..0d0eb757096f6 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -67,6 +67,7 @@ #include "npc.h" #include "options.h" #include "output.h" +#include "overmap.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" @@ -1239,7 +1240,8 @@ int _choose_elevator_destz( tripoint const &examp, tripoint_abs_omt const &this_ _rotate_point_sm( { examp.xy(), z }, _get_rot_delta( this_omt, that_omt ), sm_orig ); if( here.ter( zp )->has_examine( iexamine::elevator ) ) { - std::string const omt_name = overmap_buffer.ter_existing( that_omt )->get_name(); + std::string const omt_name = overmap_buffer.ter_existing( that_omt )->get_name( + om_vision_level::full ); std::string const name = string_format( "%i %s%s", z, omt_name, z == examp.z ? _( " (this floor)" ) : std::string() ); choice.addentry( z + uilist_positive, z != examp.z, MENU_AUTOASSIGN, name ); diff --git a/src/init.cpp b/src/init.cpp index 42f367698e384..5c920c1a4f2f8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -415,6 +415,7 @@ void DynamicDataLoader::initialize() add( "oter_id_migration", &overmap::load_oter_id_migration ); add( "camp_migration", &overmap::load_oter_id_camp_migration ); add( "overmap_terrain", &overmap_terrains::load ); + add( "oter_vision", &oter_vision::load_oter_vision ); add( "construction_category", &construction_categories::load ); add( "construction_group", &construction_groups::load ); add( "construction", &load_construction ); @@ -613,6 +614,7 @@ void DynamicDataLoader::unload_data() overmap_connections::reset(); overmap_land_use_codes::reset(); overmap_locations::reset(); + oter_vision::reset(); city::reset(); overmap_specials::reset(); overmap_special_migration::reset(); @@ -843,6 +845,7 @@ void DynamicDataLoader::check_consistency( loading_ui &ui ) { _( "Overmap land use codes" ), &overmap_land_use_codes::check_consistency }, { _( "Overmap connections" ), &overmap_connections::check_consistency }, { _( "Overmap terrain" ), &overmap_terrains::check_consistency }, + { _( "Overmap terrain vision" ), &oter_vision::check_oter_vision }, { _( "Overmap locations" ), &overmap_locations::check_consistency }, { _( "Cities" ), &city::check_consistency }, { _( "Overmap specials" ), &overmap_specials::check_consistency }, diff --git a/src/iuse.cpp b/src/iuse.cpp index 42140c9ab3caf..8e928130cdd36 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -6334,10 +6334,11 @@ static item::extended_photo_def photo_def_for_camera_point( const tripoint &aim_ } // TODO: fix point types - const oter_id &cur_ter = - overmap_buffer.ter( tripoint_abs_omt( ms_to_omt_copy( here.getabs( aim_point ) ) ) ); + tripoint_abs_omt omp( ms_to_omt_copy( here.getabs( aim_point ) ) ); + const oter_id &cur_ter = overmap_buffer.ter( omp ); + om_vision_level vision = overmap_buffer.seen( omp ); std::string overmap_desc = string_format( _( "In the background you can see a %s." ), - colorize( cur_ter->get_name(), cur_ter->get_color() ) ); + colorize( cur_ter->get_name( vision ), cur_ter->get_color( vision ) ) ); if( outside_tiles_num == total_tiles_num ) { photo_text += _( "\n\nThis photo was taken outside." ); } else if( outside_tiles_num == 0 ) { diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index 6ddc0e8d25e44..4cb9f720db0ce 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -66,6 +66,7 @@ #include "music.h" #include "mutation.h" #include "output.h" +#include "overmap.h" #include "overmapbuffer.h" #include "pimpl.h" #include "player_activity.h" @@ -1221,7 +1222,7 @@ void reveal_map_actor::reveal_targets( const tripoint_abs_omt ¢er, const auto places = overmap_buffer.find_all( center, target.first, radius, false, target.second ); for( const tripoint_abs_omt &place : places ) { - if( !overmap_buffer.seen( place ) ) { + if( overmap_buffer.seen( place ) == om_vision_level::unseen ) { // Should be replaced with the character using the item passed as an argument if NPCs ever learn to use maps get_avatar().map_revealed_omts.emplace( place ); } diff --git a/src/map.cpp b/src/map.cpp index 642959560d8bb..d74a970ba2ced 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -7230,7 +7230,7 @@ void map::update_visibility_cache( const int zlev ) const tripoint sm( gridx, gridy, 0 ); const tripoint_abs_sm abs_sm = map::abs_sub + sm; const tripoint_abs_omt abs_omt = project_to( abs_sm ); - overmap_buffer.set_seen( abs_omt, true ); + overmap_buffer.set_seen( abs_omt, om_vision_level::full ); } } } diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 3da7152aae59e..e3cc92f746572 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -5496,7 +5496,7 @@ void map::draw_map( mapgendata &dat ) // not one of the hardcoded ones! // load from JSON??? debugmsg( "Error: tried to generate map for omtype %s, \"%s\" (id_mapgen %s)", - terrain_type.id().c_str(), terrain_type->get_name(), function_key.c_str() ); + terrain_type.id().c_str(), terrain_type->get_name( om_vision_level::full ), function_key.c_str() ); fill_background( this, ter_t_floor ); } diff --git a/src/memorial_logger.cpp b/src/memorial_logger.cpp index 2bb5d73fecfe9..b2fe2a5698641 100644 --- a/src/memorial_logger.cpp +++ b/src/memorial_logger.cpp @@ -42,6 +42,7 @@ #include "mutation.h" #include "omdata.h" #include "output.h" +#include "overmap.h" #include "overmapbuffer.h" #include "past_games_info.h" #include "pimpl.h" @@ -127,7 +128,7 @@ void memorial_logger::add( const std::string_view male_msg, const oter_id &cur_ter = overmap_buffer.ter( player_character.global_omt_location() ); const oter_type_str_id cur_oter_type = cur_ter->get_type_id(); - const std::string &oter_name = cur_ter->get_name(); + const std::string &oter_name = cur_ter->get_name( om_vision_level::full ); log.emplace_back( calendar::turn, cur_oter_type, oter_name, msg ); } diff --git a/src/mission_util.cpp b/src/mission_util.cpp index d50189f7199a0..10bf965c182da 100644 --- a/src/mission_util.cpp +++ b/src/mission_util.cpp @@ -78,7 +78,7 @@ static void reveal_target( mission *miss, const std::string &omter_id ) if( destination != overmap::invalid_tripoint ) { const oter_id oter = overmap_buffer.ter( destination ); add_msg( _( "%s has marked the only %s known to them on your map." ), p->get_name(), - oter->get_name() ); + oter->get_name( om_vision_level::full ) ); miss->set_target( destination ); if( one_in( 3 ) ) { reveal_route( miss, destination ); diff --git a/src/npctalk_funcs.cpp b/src/npctalk_funcs.cpp index ef8527c815e2b..ccb3722f6da67 100644 --- a/src/npctalk_funcs.cpp +++ b/src/npctalk_funcs.cpp @@ -363,7 +363,7 @@ void talk_function::goto_location( npc &p ) if( elem == p.global_omt_location() ) { continue; } - if( !overmap_buffer.seen( elem ) ) { + if( overmap_buffer.seen( elem ) == om_vision_level::unseen ) { continue; } std::optional camp = overmap_buffer.find_camp( elem.xy() ); diff --git a/src/omdata.h b/src/omdata.h index 50bbc11646c36..f86655f9018c1 100644 --- a/src/omdata.h +++ b/src/omdata.h @@ -42,6 +42,8 @@ struct mapgen_arguments; struct oter_t; struct overmap_location; +enum class om_vision_level : int8_t; + inline const overmap_land_use_code_id land_use_code_forest( "forest" ); inline const overmap_land_use_code_id land_use_code_wetland( "wetland" ); inline const overmap_land_use_code_id land_use_code_wetland_forest( "wetland_forest" ); @@ -111,6 +113,12 @@ type from_cube( cube_direction, const std::string &error_msg ); } // namespace om_direction +namespace io +{ +template<> +std::string enum_to_string( om_vision_level ); +} // namespace io + template<> struct enum_traits { static constexpr om_direction::type last = om_direction::type::last; @@ -242,15 +250,61 @@ struct enum_traits { static constexpr oter_travel_cost_type last = oter_travel_cost_type::last; }; +class oter_vision +{ + public: + struct blended_omt { + oter_id id; + std::string sym; + nc_color color; + std::string name; + }; + + struct level { + translation name; + uint32_t symbol = 0; + nc_color color = c_black; + std::string looks_like; + bool blends_adjacent; + + void deserialize( const JsonObject &jo ); + }; + const level *viewed( om_vision_level ) const; + + static void load_oter_vision( const JsonObject &jo, const std::string &src ); + static void reset(); + static void check_oter_vision(); + static const std::vector &get_all(); + + oter_vision_id get_id() const; + + void load( const JsonObject &jo, std::string_view src ); + void check() const; + + static blended_omt get_blended_omt_info( const tripoint_abs_omt &omp, om_vision_level vision ); + + private: + friend class generic_factory; + friend struct mod_tracker; + oter_vision_id id; + std::vector> src; + bool was_loaded = false; + + std::vector levels; +}; + struct oter_type_t { public: static const oter_type_t null_type; string_id id; std::vector, mod_id>> src; + private: + friend struct oter_t; translation name; uint32_t symbol = 0; nc_color color = c_black; + public: overmap_land_use_code_id land_use_code = overmap_land_use_code_id::NULL_ID(); std::vector looks_like; unsigned char see_cost = 0; // Affects how far the player can see in the overmap @@ -264,8 +318,18 @@ struct oter_type_t { overmap_static_spawns static_spawns; bool was_loaded = false; + oter_vision_id vision_levels; + std::string get_symbol() const; + uint32_t get_uint32_symbol() const { + return symbol; + } + + nc_color get_color() const { + return color; + } + oter_type_t() = default; oter_id get_first() const; @@ -328,21 +392,14 @@ struct oter_t { std::string get_mapgen_id() const; oter_id get_rotated( om_direction::type dir ) const; - std::string get_name() const { - return type->name.translated(); - } - - std::string get_symbol( const bool from_land_use_code = false ) const { - return utf32_to_utf8( from_land_use_code ? symbol_alt : symbol ); - } + bool blends_adjacent( om_vision_level vision ) const; - uint32_t get_uint32_symbol() const { - return symbol; - } + std::string get_name( om_vision_level ) const; + std::string get_symbol( om_vision_level, bool from_land_use_code = false ) const; + uint32_t get_uint32_symbol() const; + nc_color get_color( om_vision_level, bool from_land_use_code = false ) const; - nc_color get_color( const bool from_land_use_code = false ) const { - return from_land_use_code ? type->land_use_code->color : type->color; - } + std::string get_tileset_id( om_vision_level vision ) const; // dir is only meaningful for rotatable, non-linear terrain. If you // need an answer that also works for linear terrain, call diff --git a/src/overmap.cpp b/src/overmap.cpp index 9163c906b6417..286383b74350e 100644 --- a/src/overmap.cpp +++ b/src/overmap.cpp @@ -130,6 +130,8 @@ static const oter_type_str_id oter_type_slimepit_down( "slimepit_down" ); static const oter_type_str_id oter_type_solid_earth( "solid_earth" ); static const oter_type_str_id oter_type_sub_station( "sub_station" ); +static const oter_vision_id oter_vision_default( "default" ); + static const overmap_location_id overmap_location_land( "land" ); static const overmap_location_id overmap_location_swamp( "swamp" ); @@ -151,6 +153,44 @@ static oter_id ot_null; const oter_type_t oter_type_t::null_type{}; +namespace +{ +generic_factory oter_vision_factory( "oter_vision" ); +} // namespace + +template<> +const oter_vision &string_id::obj() const +{ + return oter_vision_factory.obj( *this ); +} + +template<> +bool string_id::is_valid() const +{ + return oter_vision_factory.is_valid( *this ); +} + +void oter_vision::load_oter_vision( const JsonObject &jo, const std::string &src ) +{ + oter_vision_factory.load( jo, src ); +} + +void oter_vision::reset() +{ + oter_vision_factory.reset(); +} + +void oter_vision::check_oter_vision() +{ + oter_vision_factory.check(); +} + +const std::vector &oter_vision::get_all() +{ + return oter_vision_factory.get_all(); +} + + namespace io { @@ -761,6 +801,61 @@ std::string enum_to_string( oter_travel_cost_type data ) } } // namespace io +void oter_vision::level::deserialize( const JsonObject &jo ) +{ + optional( jo, false, "blends_adjacent", blends_adjacent, false ); + if( blends_adjacent ) { + return; + } + mandatory( jo, false, "name", name ); + mandatory( jo, false, "sym", symbol, unicode_codepoint_from_symbol_reader ); + assign( jo, "color", color ); + optional( jo, false, "looks_like", looks_like ); +} + +oter_vision_id oter_vision::get_id() const +{ + return id; +} + +void oter_vision::load( const JsonObject &jo, std::string_view ) +{ + if( id.str().find( '$' ) != std::string::npos ) { + jo.throw_error( string_format( "id for vision level %s contains a '$'", id.str() ) ); + } + mandatory( jo, was_loaded, "levels", levels ); +} + +const oter_vision::level *oter_vision::viewed( om_vision_level vision ) const +{ + size_t idx = -1; + switch( vision ) { + case om_vision_level::vague: + idx = 0; + break; + case om_vision_level::outlines: + idx = 1; + break; + case om_vision_level::details: + idx = 2; + break; + default: + return nullptr; + } + if( idx >= levels.size() ) { + return nullptr; + } + return &levels[idx]; +} + +void oter_vision::check() const +{ + if( levels.size() > 3 ) { + debugmsg( "Too many vision levels assigned!" ); + } +} + + void oter_type_t::load( const JsonObject &jo, const std::string &src ) { const bool strict = src == "dda"; @@ -796,6 +891,8 @@ void oter_type_t::load( const JsonObject &jo, const std::string &src ) optional( jo, was_loaded, "connect_group", connect_group, string_reader{} ); optional( jo, was_loaded, "travel_cost_type", travel_cost_type, oter_travel_cost_type::other ); + optional( jo, was_loaded, "vision_levels", vision_levels, oter_vision_default ); + if( has_flag( oter_flags::line_drawing ) ) { if( has_flag( oter_flags::no_rotate ) ) { jo.throw_error( R"(Mutually exclusive flags: "NO_ROTATE" and "LINEAR".)" ); @@ -827,7 +924,14 @@ void oter_type_t::load( const JsonObject &jo, const std::string &src ) void oter_type_t::check() const { - + if( !vision_levels.is_valid() ) { + debugmsg( "Invalid vision_levels '%s' for '%s'", vision_levels.str(), id.str() ); + } + /* find omts without vision_levels assigned + if( vision_levels == oter_vision_default && !has_flag( oter_flags::should_not_spawn ) ) { + fprintf( stderr, "%s (%s)\n", id.c_str(), name.translated().c_str() ); + } + */ } void oter_type_t::finalize() @@ -932,6 +1036,57 @@ oter_id oter_t::get_rotated( om_direction::type dir ) const : type->get_rotated( om_direction::add( this->dir, dir ) ); } +bool oter_t::blends_adjacent( om_vision_level vision ) const +{ + if( const oter_vision::level *seen = type->vision_levels->viewed( vision ) ) { + return seen->blends_adjacent; + } + return false; +} + +std::string oter_t::get_name( om_vision_level vision ) const +{ + if( const oter_vision::level *seen = type->vision_levels->viewed( vision ) ) { + return seen->name.translated(); + } + return type->name.translated(); +} + +std::string oter_t::get_symbol( om_vision_level vision, const bool from_land_use_code ) const +{ + if( from_land_use_code ) { + return utf32_to_utf8( symbol_alt ); + } + if( const oter_vision::level *seen = type->vision_levels->viewed( vision ) ) { + return utf32_to_utf8( seen->symbol ); + } + return utf32_to_utf8( symbol ); +} + +uint32_t oter_t::get_uint32_symbol() const +{ + return symbol; +} + +nc_color oter_t::get_color( om_vision_level vision, const bool from_land_use_code ) const +{ + if( from_land_use_code ) { + return type->land_use_code->color; + } + if( const oter_vision::level *seen = type->vision_levels->viewed( vision ) ) { + return seen->color; + } + return type->color; +} + +std::string oter_t::get_tileset_id( om_vision_level vision ) const +{ + if( type->vision_levels->viewed( vision ) != nullptr ) { + return string_format( "vl#%s$%s", type->vision_levels.str(), io::enum_to_string( vision ) ); + } + return "om#" + type->id.str(); +} + void oter_t::get_rotation_and_subtile( int &rotation, int &subtile ) const { if( is_linear() ) { @@ -2963,7 +3118,7 @@ void overmap::init_layers() const oter_id tid = get_default_terrain( k - OVERMAP_DEPTH ); map_layer &l = layer[k]; l.terrain.fill( tid ); - l.visible.fill( false ); + l.visible.fill( om_vision_level::unseen ); l.explored.fill( false ); } } @@ -3051,27 +3206,27 @@ std::vector overmap::predecessors( const tripoint_om_omt &p ) return it->second; } -void overmap::set_seen( const tripoint_om_omt &p, bool val ) +void overmap::set_seen( const tripoint_om_omt &p, om_vision_level val, bool force ) { if( !inbounds( p ) ) { return; } - if( seen( p ) == val ) { + if( !force && seen( p ) >= val ) { return; } layer[p.z() + OVERMAP_DEPTH].visible[p.xy()] = val; - if( val ) { + if( val > om_vision_level::details ) { add_extra_note( p ); } } -bool overmap::seen( const tripoint_om_omt &p ) const +om_vision_level overmap::seen( const tripoint_om_omt &p ) const { if( !inbounds( p ) ) { - return false; + return om_vision_level::unseen; } return layer[p.z() + OVERMAP_DEPTH].visible[p.xy()]; } @@ -3334,7 +3489,7 @@ void overmap::add_extra( const tripoint_om_omt &p, const map_extra_id &id ) void overmap::add_extra_note( const tripoint_om_omt &p ) { - if( !seen( p ) ) { + if( seen( p ) < om_vision_level::details ) { return; } @@ -3917,8 +4072,9 @@ std::vector overmap::find_terrain( const std::string_view term, i for( int x = 0; x < OMAPX; x++ ) { for( int y = 0; y < OMAPY; y++ ) { tripoint_om_omt p( x, y, zlevel ); - if( seen( p ) && - lcmatch( ter( p )->get_name(), term ) ) { + om_vision_level vision = seen( p ); + if( vision != om_vision_level::unseen && + lcmatch( ter( p )->get_name( vision ), term ) ) { found.push_back( project_combine( pos(), p.xy() ) ); } } @@ -7516,6 +7672,24 @@ std::string enum_to_string( ot_match_type data ) } cata_fatal( "Invalid ot_match_type" ); } + +template<> +std::string enum_to_string( om_vision_level data ) +{ + switch( data ) { + // *INDENT-OFF* + case om_vision_level::unseen: return "unseen"; + case om_vision_level::vague: return "vague"; + case om_vision_level::outlines: return "outlines"; + case om_vision_level::details: return "details"; + case om_vision_level::full: return "full"; + // *INDENT-ON* + default: + break; + } + debugmsg( "Unknown om_vision_level %d", static_cast( data ) ); + return "unseen"; +} } // namespace io static const std::array suffixes = {{ "_north", "_west", "_south", "_east" }}; diff --git a/src/overmap.h b/src/overmap.h index f634b372b93ce..3fc9a42c519b1 100644 --- a/src/overmap.h +++ b/src/overmap.h @@ -88,9 +88,30 @@ struct radio_tower { } }; +enum class om_vision_level : int8_t { + unseen = 0, + // Vague details from a quick glance + // Broad geographical features - forest,field,buildings,water + vague, + // A scan from a distance + // Track roads, distinguish obvious features (farms from fields) + outlines, + // Detailed scan from a distance + // General building types, some hard to spot features become clear + details, + // Full knowledge of the tile + full, + last +}; + +template<> +struct enum_traits { + static constexpr om_vision_level last = om_vision_level::last; +}; + struct map_layer { cata::mdarray terrain; - cata::mdarray visible; + cata::mdarray visible; cata::mdarray explored; std::vector notes; std::vector extras; @@ -234,8 +255,9 @@ class overmap std::optional *mapgen_args( const tripoint_om_omt & ); std::string *join_used_at( const om_pos_dir & ); std::vector predecessors( const tripoint_om_omt & ); - void set_seen( const tripoint_om_omt &p, bool val ); - bool seen( const tripoint_om_omt &p ) const; + void set_seen( const tripoint_om_omt &p, om_vision_level val, bool force = false ); + om_vision_level seen( const tripoint_om_omt &p ) const; + bool seen_more_than( const tripoint_om_omt &p, om_vision_level test ) const; bool &explored( const tripoint_om_omt &p ); bool is_explored( const tripoint_om_omt &p ) const; @@ -575,7 +597,7 @@ struct oter_display_lru { std::array, cache_size> cache; size_t cache_next = 0; - std::pair get_symbol_and_color( const oter_id &cur_ter ); + std::pair get_symbol_and_color( const oter_id &cur_ter, om_vision_level ); }; // "arguments" to oter_symbol_and_color that do not change between calls in a batch @@ -632,10 +654,10 @@ struct oter_display_options { // arguments for oter_symbol_and_color pertaining to a single point struct oter_display_args { - explicit oter_display_args( bool seen ) : see( seen ) {} + explicit oter_display_args( om_vision_level vis ) : vision( vis ) {} // Can the/has the PC seen this tile - bool see; + om_vision_level vision; // If this tile is on the edge of the drawn tiles, we may draw a mission indicator on it bool edge_tile = false; // Check if location is within player line-of-sight diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index 62d5b1cb30838..ecf27dff5a55e 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -41,6 +41,7 @@ #include "game_ui.h" #include "input_context.h" #include "line.h" +#include "localized_comparator.h" #include "map.h" #include "map_iterator.h" #include "mapbuffer.h" @@ -155,15 +156,16 @@ static std::array, npm_width *npm_height> get_o tripoint_range( current - shift, current + shift ) ) { nc_color ter_color = c_black; std::string ter_sym = " "; - const bool see = has_debug_vision || overmap_buffer.seen( dest ); - if( see ) { + om_vision_level vision = has_debug_vision ? om_vision_level::full : + overmap_buffer.seen( dest ); + if( vision != om_vision_level::unseen ) { // Only load terrain if we can actually see it oter_id cur_ter = overmap_buffer.ter( dest ); - ter_color = cur_ter->get_color(); - ter_sym = cur_ter->get_symbol(); + ter_color = cur_ter->get_color( vision ); + ter_sym = cur_ter->get_symbol( vision ); } else { - ter_color = oter_unexplored.obj().get_color(); - ter_sym = oter_unexplored.obj().get_symbol(); + ter_color = oter_unexplored.obj().get_color( om_vision_level::full ); + ter_sym = oter_unexplored.obj().get_symbol( om_vision_level::full ); } map_around[index++] = std::make_pair( ter_color, ter_sym ); } @@ -294,7 +296,8 @@ static void draw_city_labels( const catacurses::window &w, const tripoint_abs_om continue; // right under the cursor. } - if( !overmap_buffer.seen( tripoint_abs_omt( city_pos, center.z() ) ) ) { + if( !overmap_buffer.seen_more_than( tripoint_abs_omt( city_pos, center.z() ), + om_vision_level::outlines ) ) { continue; // haven't seen it. } @@ -333,7 +336,8 @@ static void draw_camp_labels( const catacurses::window &w, const tripoint_abs_om continue; // right under the cursor. } - if( !overmap_buffer.seen( tripoint_abs_omt( camp_pos, center.z() ) ) ) { + if( !overmap_buffer.seen_more_than( tripoint_abs_omt( camp_pos, center.z() ), + om_vision_level::outlines ) ) { continue; // haven't seen it. } @@ -556,7 +560,7 @@ static void draw_ascii( const bool has_debug_vision = player_character.has_trait( trait_DEBUG_NIGHTVISION ); // sight_points is hoisted for speed reasons. const int sight_points = !has_debug_vision ? - player_character.overmap_sight_range( g->light_level( player_character.posz() ) ) : + player_character.overmap_modified_sight_range( g->light_level( player_character.posz() ) ) : 100; oter_display_lru lru_cache; @@ -614,8 +618,8 @@ static void draw_ascii( const point_rel_omt rp( om_direction::rotate( s_ter.p.xy(), uistate.omedit_rotation ) ); const oter_id oter = s_ter.terrain->get_rotated( uistate.omedit_rotation ); - special_cache.insert( std::make_pair( - rp, std::make_pair( oter->get_symbol(), oter->get_color() ) ) ); + special_cache.insert( std::make_pair( rp, std::make_pair( oter->get_symbol( om_vision_level::full ), + oter->get_color( om_vision_level::full ) ) ) ); s_begin.x() = std::min( s_begin.x(), rp.x() ); s_begin.y() = std::min( s_begin.y(), rp.y() ); @@ -638,7 +642,7 @@ static void draw_ascii( } const tripoint_abs_omt pos = np->global_omt_location(); - if( has_debug_vision || overmap_buffer.seen( pos ) ) { + if( has_debug_vision || overmap_buffer.seen_more_than( pos, om_vision_level::details ) ) { auto iter = npc_color.find( pos ); nc_color np_color = np->basic_symbol_color(); if( iter == npc_color.end() ) { @@ -710,13 +714,14 @@ static void draw_ascii( nc_color ter_color = c_black; std::string ter_sym = " "; - const bool see = has_debug_vision || overmap_buffer.seen( omp ); - if( see ) { + const om_vision_level vision = has_debug_vision ? om_vision_level::full : + overmap_buffer.seen( omp ); + if( vision == om_vision_level::unseen ) { // Only load terrain if we can actually see it cur_ter = overmap_buffer.ter( omp ); } - oter_display_args oter_args( see ); + oter_display_args oter_args( vision ); std::tie( ter_sym, ter_color ) = oter_symbol_and_color( omp, oter_args, oter_opts, &lru_cache ); // Are we debugging monster groups? @@ -764,8 +769,8 @@ static void draw_ascii( // Preview for place_terrain or place_special if( uistate.place_terrain || uistate.place_special ) { if( blink && uistate.place_terrain && omp.xy() == center.xy() ) { - ter_color = uistate.place_terrain->get_color(); - ter_sym = uistate.place_terrain->get_symbol(); + ter_color = uistate.place_terrain->get_color( om_vision_level::full ); + ter_sym = uistate.place_terrain->get_symbol( om_vision_level::full ); } else if( blink && uistate.place_special ) { const point_rel_omt from_center = omp.xy() - center.xy(); if( from_center.x() >= s_begin.x() && from_center.x() <= s_end.x() && @@ -853,7 +858,7 @@ static void draw_ascii( } } - if( has_debug_vision || overmap_buffer.seen( center ) ) { + if( has_debug_vision || overmap_buffer.seen_more_than( center, om_vision_level::details ) ) { for( const auto &npc : npcs_near_player ) { if( !npc->marked_for_death && npc->global_omt_location() == center ) { corner_text.emplace_back( npc->basic_symbol_color(), npc->get_name() ); @@ -929,9 +934,10 @@ static void draw_om_sidebar( const bool has_debug_vision = player_character.has_trait( trait_DEBUG_NIGHTVISION ); // sight_points is hoisted for speed reasons. const int sight_points = !has_debug_vision ? - player_character.overmap_sight_range( g->light_level( player_character.posz() ) ) : + player_character.overmap_modified_sight_range( g->light_level( player_character.posz() ) ) : 100; - const bool center_seen = has_debug_vision || overmap_buffer.seen( center ); + om_vision_level center_vision = has_debug_vision ? om_vision_level::full : + overmap_buffer.seen( center ); const tripoint_abs_omt target = player_character.get_active_mission_target(); const bool has_target = target != overmap::invalid_tripoint; const bool viewing_weather = uistate.overmap_debug_weather || uistate.overmap_visible_weather; @@ -961,7 +967,7 @@ static void draw_om_sidebar( // Draw text describing the overmap tile at the cursor position. int lines = 1; - if( center_seen ) { + if( center_vision != om_vision_level::unseen ) { if( !mgroups.empty() ) { const point desc_pos( 3, 6 ); ui.set_cursor( wbar, desc_pos ); @@ -985,25 +991,51 @@ static void draw_om_sidebar( const oter_t &ter = overmap_buffer.ter( center ).obj(); const auto sm_pos = project_to( center ); - // NOLINTNEXTLINE(cata-use-named-point-constants) - mvwputch( wbar, point( 1, 1 ), ter.get_color(), ter.get_symbol() ); + if( ter.blends_adjacent( center_vision ) ) { + oter_vision::blended_omt info = oter_vision::get_blended_omt_info( center, center_vision ); + // NOLINTNEXTLINE(cata-use-named-point-constants) + mvwputch( wbar, point( 1, 1 ), info.color, info.sym ); + } else { + // NOLINTNEXTLINE(cata-use-named-point-constants) + mvwputch( wbar, point( 1, 1 ), ter.get_color( center_vision ), ter.get_symbol( center_vision ) ); + } const point desc_pos( 3, 1 ); ui.set_cursor( wbar, desc_pos ); lines = fold_and_print( wbar, desc_pos, getmaxx( wbar ) - desc_pos.x, c_light_gray, overmap_buffer.get_description_at( sm_pos ) ); + if( center_vision != om_vision_level::full ) { + std::string vision_level_string; + switch( center_vision ) { + case om_vision_level::vague: + vision_level_string = _( "You can only make out vague details of what's here." ); + break; + case om_vision_level::outlines: + vision_level_string = _( "You can only make out outlines of what's here." ); + break; + case om_vision_level::details: + vision_level_string = _( "You can make out some details of what's here." ); + break; + default: + vision_level_string = _( "This is a bug!" ); + break; + } + lines = fold_and_print( wbar, point( 3, lines + 1 ), getmaxx( wbar ) - 3, c_light_gray, + vision_level_string ); + } } } else { const oter_t &ter = oter_unexplored.obj(); // NOLINTNEXTLINE(cata-use-named-point-constants) - mvwputch( wbar, point( 1, 1 ), ter.get_color(), ter.get_symbol() ); + mvwputch( wbar, point( 1, 1 ), ter.get_color( om_vision_level::full ), + ter.get_symbol( om_vision_level::full ) ); const point desc_pos( 3, 1 ); ui.set_cursor( wbar, desc_pos ); lines = fold_and_print( wbar, desc_pos, getmaxx( wbar ) - desc_pos.x, - ter.get_color(), ter.get_name() ); + ter.get_color( om_vision_level::full ), ter.get_name( om_vision_level::full ) ); } // Describe the weather conditions on the following line, if weather is visible @@ -1020,7 +1052,7 @@ static void draw_om_sidebar( } } - if( ( data.debug_editor && center_seen ) || data.debug_info ) { + if( ( data.debug_editor && center_vision != om_vision_level::unseen ) || data.debug_info ) { mvwprintz( wbar, point( 1, ++lines ), c_white, "abs_omt: %s", center.to_string() ); const oter_t &oter = overmap_buffer.ter( center ).obj(); @@ -1290,8 +1322,9 @@ static bool search( const ui_adaptor &om_ui, tripoint_abs_omt &curs, const tripo locations.insert( locations.end(), notes.begin(), notes.end() ); } - if( om_loc.om->seen( om_relative ) && - match_include_exclude( om_loc.om->ter( om_relative )->get_name(), term ) ) { + om_vision_level vision = om_loc.om->seen( om_relative ); + if( vision != om_vision_level::unseen && + match_include_exclude( om_loc.om->ter( om_relative )->get_name( vision ), term ) ) { locations.push_back( project_combine( om_loc.om->pos(), om_relative.xy() ) ); } } @@ -1408,14 +1441,20 @@ static void place_ter_or_special( const ui_adaptor &om_ui, tripoint_abs_omt &cur if( terrain ) { pmenu.title = _( "Select terrain to place:" ); for( const oter_t &oter : overmap_terrains::get_all() ) { - const std::string entry_text = string_format( - _( "sym: [ %s %s ], color: [ %s %s], name: [ %s ], id: [ %s ]" ), - colorize( oter.get_symbol(), oter.get_color() ), - colorize( oter.get_symbol( true ), oter.get_color( true ) ), - colorize( string_from_color( oter.get_color() ), oter.get_color() ), - colorize( string_from_color( oter.get_color( true ) ), oter.get_color( true ) ), - colorize( oter.get_name(), oter.get_color() ), - colorize( oter.id.str(), c_white ) ); + const std::string entry_text = + string_format( + _( "sym: [ %s %s ], color: [ %s %s], name: [ %s ], id: [ %s ]" ), + colorize( oter.get_symbol( om_vision_level::full ), + oter.get_color( om_vision_level::full ) ), + colorize( oter.get_symbol( om_vision_level::full, true ), + oter.get_color( om_vision_level::full, true ) ), + colorize( string_from_color( oter.get_color( om_vision_level::full ) ), + oter.get_color( om_vision_level::full ) ), + colorize( string_from_color( oter.get_color( om_vision_level::full, true ) ), + oter.get_color( om_vision_level::full, true ) ), + colorize( oter.get_name( om_vision_level::full ), + oter.get_color( om_vision_level::full ) ), + colorize( oter.id.str(), c_white ) ); pmenu.addentry( oter.id.id().to_i(), true, 0, entry_text ); } } else { @@ -1513,13 +1552,13 @@ static void place_ter_or_special( const ui_adaptor &om_ui, tripoint_abs_omt &cur } else if( action == "CONFIRM" ) { // Actually modify the overmap if( terrain ) { overmap_buffer.ter_set( curs, uistate.place_terrain->id.id() ); - overmap_buffer.set_seen( curs, true ); + overmap_buffer.set_seen( curs, om_vision_level::full ); } else { if( std::optional> used_points = overmap_buffer.place_special( *uistate.place_special, curs, uistate.omedit_rotation, false, true ) ) { for( const tripoint_abs_omt &pos : *used_points ) { - overmap_buffer.set_seen( pos, true ); + overmap_buffer.set_seen( pos, om_vision_level::full ); } } } @@ -1583,7 +1622,7 @@ static void set_special_args( tripoint_abs_omt &curs ) static std::vector get_overmap_path_to( const tripoint_abs_omt &dest, bool driving ) { - if( !overmap_buffer.seen( dest ) ) { + if( overmap_buffer.seen( dest ) == om_vision_level::unseen ) { return {}; } const Character &player_character = get_player_character(); @@ -1966,7 +2005,91 @@ static tripoint_abs_omt display( const tripoint_abs_omt &orig, } // namespace overmap_ui -std::pair oter_display_lru::get_symbol_and_color( const oter_id &cur_ter ) +struct blended_omt { + oter_id id; + std::string sym; + nc_color color; + std::string name; +}; + +oter_vision::blended_omt oter_vision::get_blended_omt_info( const tripoint_abs_omt &omp, + om_vision_level vision ) +{ + std::vector> neighbors; + const auto add_to_neighbors = [&vision, &neighbors, &omp]( const tripoint_abs_omt & next ) { + if( next == omp ) { + return; + } + om_vision_level local_vision = overmap_buffer.seen( next ); + if( local_vision == om_vision_level::unseen ) { + return; + } + oter_id ter = overmap_buffer.ter( next ); + // If the target tile is next to a tile that blends adjacent at the vision level the target tile is at, + // but not at the vision level it is at, the SDL overmap will be fed the id for the vision level of the + // tile at the vision level of the target tile, resulting in it drawing the placeholder symbol and color + // for the adjacent-blending tile. + if( ter->blends_adjacent( vision ) ) { + return; + } + neighbors.emplace_back( ter, vision ); + }; + for( const tripoint_abs_omt &next : tripoint_range( omp + point_north_west, + omp + point_south_east ) ) { + add_to_neighbors( next ); + } + // if nothing's immediately adjacent, reach out further + if( neighbors.empty() ) { + for( const tripoint_abs_omt &next : tripoint_range( omp + point( -2, -2 ), + omp + point( 2, 2 ) ) ) { + add_to_neighbors( next ); + } + } + // Okay, it didn't work, we can't see this tile + if( neighbors.empty() ) { + oter_vision::blended_omt ret; + ret.id = oter_unexplored; + ret.sym = oter_unexplored->get_symbol( om_vision_level::full ); + ret.color = oter_unexplored->get_color( om_vision_level::full ); + ret.name = oter_unexplored->get_name( om_vision_level::full ); + return ret; + } + std::vector> counts; + for( size_t i = 0; i < neighbors.size(); ++i ) { + const auto refers_to_same = [i, &neighbors]( const std::pair &entry ) { + return neighbors[entry.first] == neighbors[i]; + }; + auto it = std::find_if( counts.begin(), counts.end(), refers_to_same ); + if( it == counts.end() ) { + counts.emplace_back( i, 1 ); + continue; + } + it->second += 1; + } + const auto sort_counts = [&neighbors]( const std::pair &l, + const std::pair &r ) { + // Put in descending order + if( l.second != r.second ) { + return l.second > r.second; + } + // And do something stable so it doesn't shift if they're all equal + const std::pair left = neighbors[l.first]; + const std::pair right = neighbors[r.first]; + return localized_compare( left.first->get_name( left.second ), + right.first->get_name( right.second ) ); + }; + std::sort( counts.begin(), counts.end(), sort_counts ); + oter_vision::blended_omt ret; + size_t idx = counts[0].first; + ret.id = neighbors[idx].first; + ret.sym = ret.id->get_symbol( neighbors[idx].second ); + ret.color = ret.id->get_color( neighbors[idx].second ); + ret.name = ret.id->get_name( neighbors[idx].second ); + return ret; +} + +std::pair oter_display_lru::get_symbol_and_color( const oter_id &cur_ter, + om_vision_level vision ) { std::pair ret = {"?", c_red}; // First see if we have the oter_t cached @@ -1985,8 +2108,8 @@ std::pair oter_display_lru::get_symbol_and_color( const o } // Ok, we found something if( info ) { - ret.second = info->get_color( uistate.overmap_show_land_use_codes ); - ret.first = info->get_symbol( uistate.overmap_show_land_use_codes ); + ret.second = info->get_color( vision, uistate.overmap_show_land_use_codes ); + ret.first = info->get_symbol( vision, uistate.overmap_show_land_use_codes ); } return ret; } @@ -2004,7 +2127,8 @@ std::pair oter_symbol_and_color( const tripoint_abs_omt & plist = line_to( opts.center.xy(), opts.mission_target->xy() ); } - if( args.see ) { + // Only load terrain if we can see it + if( args.vision != om_vision_level::unseen ) { cur_ter = overmap_buffer.ter( omp ); } @@ -2041,10 +2165,10 @@ std::pair oter_symbol_and_color( const tripoint_abs_omt & // Display notes in all situations, even when not seen std::tie( ret.first, ret.second, std::ignore ) = overmap_ui::get_note_display_info( overmap_buffer.note( omp ) ); - } else if( !args.see ) { + } else if( args.vision == om_vision_level::unseen ) { // All cases above ignore the seen-status, - ret.second = oter_unexplored.obj().get_color(); - ret.first = oter_unexplored.obj().get_symbol(); + ret.second = oter_unexplored.obj().get_color( om_vision_level::full ); + ret.first = oter_unexplored.obj().get_symbol( om_vision_level::full ); // All cases below assume that see is true. } else if( opts.blink && opts.npc_color.count( omp ) != 0 ) { // Visible NPCs are cached already @@ -2072,6 +2196,7 @@ std::pair oter_symbol_and_color( const tripoint_abs_omt & ret.first = "&"; } else if( opts.blink && opts.showhordes && overmap_buffer.get_horde_size( omp ) >= HORDE_VISIBILITY_SIZE && + args.vision > om_vision_level::details && ( overmap_ui::get_and_assign_los( args.los, player_character, omp, opts.sight_points ) || uistate.overmap_debug_mongroup || player_character.has_trait( trait_DEBUG_CLAIRVOYANCE ) ) ) { // Display Hordes only when within player line-of-sight @@ -2083,22 +2208,27 @@ std::pair oter_symbol_and_color( const tripoint_abs_omt & } else if( !opts.sZoneName.empty() && opts.tripointZone.xy() == omp.xy() ) { ret.second = c_yellow; ret.first = "Z"; + } else if( cur_ter->blends_adjacent( args.vision ) ) { + oter_vision::blended_omt here = oter_vision::get_blended_omt_info( omp, args.vision ); + ret.first = here.sym; + ret.second = here.color; } else if( !uistate.overmap_show_forest_trails && cur_ter && ( cur_ter->get_type_id() == oter_type_forest_trail ) ) { // If forest trails shouldn't be displayed, and this is a forest trail, then // instead render it like a forest. - ret = lru ? lru->get_symbol_and_color( oter_forest.id() ) : std::pair { - oter_forest->get_symbol( uistate.overmap_show_land_use_codes ), - oter_forest->get_color( uistate.overmap_show_land_use_codes ) + ret = lru ? lru->get_symbol_and_color( oter_forest.id(), + args.vision ) : std::pair { + oter_forest->get_symbol( args.vision, uistate.overmap_show_land_use_codes ), + oter_forest->get_color( args.vision, uistate.overmap_show_land_use_codes ) }; if( opts.show_explored && overmap_buffer.is_explored( omp ) ) { ret.second = c_dark_gray; } } else { // Nothing special, but is visible to the player. - ret = lru ? lru->get_symbol_and_color( cur_ter ) : std::pair { - cur_ter->get_symbol( uistate.overmap_show_land_use_codes ), - cur_ter->get_color( uistate.overmap_show_land_use_codes ) + ret = lru ? lru->get_symbol_and_color( cur_ter, args.vision ) : std::pair { + cur_ter->get_symbol( args.vision, uistate.overmap_show_land_use_codes ), + cur_ter->get_color( args.vision, uistate.overmap_show_land_use_codes ) }; if( opts.show_explored && overmap_buffer.is_explored( omp ) ) { ret.second = c_dark_gray; diff --git a/src/overmapbuffer.cpp b/src/overmapbuffer.cpp index f482f2f9f7431..7ee54ca5fee4f 100644 --- a/src/overmapbuffer.cpp +++ b/src/overmapbuffer.cpp @@ -763,20 +763,28 @@ void overmapbuffer::add_camp( const basecamp &camp ) om_loc.om->camps.push_back( camp ); } -bool overmapbuffer::seen( const tripoint_abs_omt &p ) +om_vision_level overmapbuffer::seen( const tripoint_abs_omt &p ) { if( const overmap_with_local_coords om_loc = get_existing_om_global( p ) ) { return om_loc.om->seen( om_loc.local ); } - return false; + return om_vision_level::unseen; } -void overmapbuffer::set_seen( const tripoint_abs_omt &p, bool seen ) +void overmapbuffer::set_seen( const tripoint_abs_omt &p, om_vision_level seen ) { const overmap_with_local_coords om_loc = get_om_global( p ); om_loc.om->set_seen( om_loc.local, seen ); } +bool overmapbuffer::seen_more_than( const tripoint_abs_omt &p, om_vision_level test ) +{ + if( const overmap_with_local_coords om_loc = get_existing_om_global( p ) ) { + return om_loc.om->seen( om_loc.local ) > test; + } + return false; +} + const oter_id &overmapbuffer::ter( const tripoint_abs_omt &p ) { const overmap_with_local_coords om_loc = get_om_global( p ); @@ -837,7 +845,7 @@ bool overmapbuffer::reveal( const tripoint_abs_omt ¢er, int radius, for( int i = -radius; i <= radius; i++ ) { for( int j = -radius; j <= radius; j++ ) { const tripoint_abs_omt p = center + point( i, j ); - if( seen( p ) ) { + if( seen( p ) != om_vision_level::unseen ) { continue; } if( trigdist && i * i + j * j > radius_squared ) { @@ -847,7 +855,7 @@ bool overmapbuffer::reveal( const tripoint_abs_omt ¢er, int radius, continue; } result = true; - set_seen( p, true ); + set_seen( p, om_vision_level::full ); } } return result; @@ -911,7 +919,8 @@ overmap_path_params overmap_path_params::for_aircraft() static int get_terrain_cost( const tripoint_abs_omt &omt_pos, const overmap_path_params ¶ms ) { - if( params.only_known_by_player && !overmap_buffer.seen( omt_pos ) ) { + if( params.only_known_by_player && + !overmap_buffer.seen_more_than( omt_pos, om_vision_level::vague ) ) { return -1; } if( params.avoid_danger && overmap_buffer.is_marked_dangerous( omt_pos ) ) { @@ -1102,10 +1111,10 @@ bool overmapbuffer::is_findable_location( const tripoint_abs_omt &location, return false; } - if( params.must_see && !seen( location ) ) { + if( params.must_see && seen( location ) == om_vision_level::unseen ) { return false; } - if( params.cant_see && seen( location ) ) { + if( params.cant_see && seen( location ) != om_vision_level::unseen ) { return false; } @@ -1490,7 +1499,7 @@ city_reference overmapbuffer::closest_known_city( const tripoint_abs_sm ¢er const auto it = std::find_if( cities.begin(), cities.end(), [this]( const city_reference & elem ) { const tripoint_abs_omt p = project_to( elem.abs_sm_pos ); - return seen( p ); + return seen_more_than( p, om_vision_level::outlines ); } ); if( it != cities.end() ) { @@ -1503,8 +1512,15 @@ city_reference overmapbuffer::closest_known_city( const tripoint_abs_sm ¢er std::string overmapbuffer::get_description_at( const tripoint_abs_sm &where ) { const oter_id oter = ter( project_to( where ) ); - const nc_color ter_color = oter->get_color(); - std::string ter_name = colorize( oter->get_name(), ter_color ); + om_vision_level vision = seen( project_to( where ) ); + nc_color ter_color = oter->get_color( vision ); + std::string ter_name = colorize( oter->get_name( vision ), ter_color ); + if( oter->blends_adjacent( vision ) ) { + oter_vision::blended_omt blended = oter_vision::get_blended_omt_info( + project_to( where ), vision ); + ter_color = blended.color; + ter_name = colorize( blended.name, ter_color ); + } if( where.z() != 0 ) { return ter_name; diff --git a/src/overmapbuffer.h b/src/overmapbuffer.h index 2f95248ef2e1b..64bd771262907 100644 --- a/src/overmapbuffer.h +++ b/src/overmapbuffer.h @@ -25,6 +25,7 @@ class basecamp; class character_id; enum class cube_direction : int; +enum class om_vision_level : int8_t; class map_extra; class monster; class npc; @@ -194,8 +195,9 @@ class overmapbuffer void delete_extra( const tripoint_abs_omt &p ); bool is_explored( const tripoint_abs_omt &p ); void toggle_explored( const tripoint_abs_omt &p ); - bool seen( const tripoint_abs_omt &p ); - void set_seen( const tripoint_abs_omt &p, bool seen = true ); + om_vision_level seen( const tripoint_abs_omt &p ); + bool seen_more_than( const tripoint_abs_omt &p, om_vision_level test ); + void set_seen( const tripoint_abs_omt &p, om_vision_level seen ); bool has_camp( const tripoint_abs_omt &p ); bool has_vehicle( const tripoint_abs_omt &p ); bool has_horde( const tripoint_abs_omt &p ); diff --git a/src/panels.cpp b/src/panels.cpp index 6480a18e63a0d..62edb46a8652d 100644 --- a/src/panels.cpp +++ b/src/panels.cpp @@ -171,7 +171,7 @@ void overmap_ui::draw_overmap_chunk( const catacurses::window &w_minimap, const const int start_x = start_input.x; const point mid( width / 2, height / 2 ); map &here = get_map(); - const int sight_points = you.overmap_sight_range( g->light_level( you.posz() ) ); + const int sight_points = you.overmap_modified_sight_range( g->light_level( you.posz() ) ); oter_display_options opts( global_omt, sight_points ); if( targ != overmap::invalid_tripoint ) { @@ -205,8 +205,7 @@ void overmap_ui::draw_overmap_chunk( const catacurses::window &w_minimap, const nc_color ter_color; std::string ter_sym; - const bool seen = overmap_buffer.seen( omp ); - oter_display_args args( seen ); + oter_display_args args( overmap_buffer.seen( omp ) ); args.edge_tile = i == left || i == right || j == top || j == bottom; std::tie( ter_sym, ter_color ) = oter_symbol_and_color( omp, args, opts ); // TODO: Build colorized string instead of writing directly to window diff --git a/src/savegame.cpp b/src/savegame.cpp index 0ef732a6e23ee..dbb18efdc4345 100644 --- a/src/savegame.cpp +++ b/src/savegame.cpp @@ -69,7 +69,7 @@ extern std::map> quick_shortcuts_map; * Changes that break backwards compatibility should bump this number, so the game can * load a legacy format loader. */ -const int savegame_version = 33; +const int savegame_version = 34; /* * This is a global set by detected version header in .sav, maps.txt, or overmap. @@ -932,7 +932,19 @@ void overmap::unserialize_view( const JsonObject &jsobj ) JsonArray visible_json = view_member; for( int z = 0; z < OVERMAP_LAYERS; ++z ) { JsonArray visible_by_z_json = visible_json.next_array(); - unserialize_array_from_compacted_sequence( visible_by_z_json, layer[z].visible ); + if( savegame_loading_version < 34 ) { + cata::mdarray old_vision; + unserialize_array_from_compacted_sequence( visible_by_z_json, old_vision ); + for( int y = 0; y < OMAPY; ++y ) { + for( int x = 0; x < OMAPX; ++x ) { + point_om_omt idx( x, y ); + layer[z].visible[idx] = old_vision[idx] ? om_vision_level::full : + om_vision_level::unseen; + } + } + } else { + unserialize_array_from_compacted_sequence( visible_by_z_json, layer[z].visible ); + } if( visible_by_z_json.has_more() ) { visible_by_z_json.throw_error( "Too many sequences for z visible view" ); } @@ -995,6 +1007,33 @@ void overmap::unserialize_view( const JsonObject &jsobj ) } } } +template +static void serialize_enum_array_to_compacted_sequence( JsonOut &json, const MdArray &array ) +{ + using enum_type = typename MdArray::value_type; + int count = 0; + enum_type lastval = enum_traits::last; + for( size_t j = 0; j < MdArray::size_y; ++j ) { + for( size_t i = 0; i < MdArray::size_x; ++i ) { + const enum_type value = array[i][j]; + if( value == lastval ) { + ++count; + continue; + } + if( count != 0 ) { + json.write( count ); + json.end_array(); + } + lastval = value; + json.start_array(); + json.write( value ); + count = 1; + } + } + json.write( count ); + json.end_array(); +} + template static void serialize_array_to_compacted_sequence( JsonOut &json, const MdArray &array ) { @@ -1035,7 +1074,7 @@ void overmap::serialize_view( std::ostream &fout ) const json.start_array(); for( int z = 0; z < OVERMAP_LAYERS; ++z ) { json.start_array(); - serialize_array_to_compacted_sequence( json, layer[z].visible ); + serialize_enum_array_to_compacted_sequence( json, layer[z].visible ); json.end_array(); fout << std::endl; } diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index 403006693512d..aae3d01d6766b 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -659,11 +659,16 @@ static std::optional> get_mission_arrow return std::make_pair( tripoint_abs_omt( arr_pos ), mission_arrow_variant ); } -std::string cata_tiles::get_omt_id_rotation_and_subtile( +std::pair cata_tiles::get_omt_id_rotation_and_subtile( const tripoint_abs_omt &omp, int &rota, int &subtile ) { auto oter_at = []( const tripoint_abs_omt & p ) { - const oter_id &cur_ter = overmap_buffer.ter( p ); + oter_id cur_ter = overmap_buffer.ter( p ); + om_vision_level vision = overmap_buffer.seen( p ); + if( cur_ter->blends_adjacent( vision ) ) { + oter_vision::blended_omt info = oter_vision::get_blended_omt_info( p, vision ); + cur_ter = info.id; + } if( !uistate.overmap_show_forest_trails && ( cur_ter->get_type_id() == oter_type_forest_trail ) ) { @@ -705,7 +710,10 @@ std::string cata_tiles::get_omt_id_rotation_and_subtile( ot.get_rotation_and_subtile( rota, subtile ); } - return ot_type_id.id().str(); + om_vision_level vision = overmap_buffer.seen( omp ); + std::string id = ot_id->get_tileset_id( vision ); + bool is_omt = id.substr( 0, 3 ) == "om#"; + return std::make_pair( id.substr( 3 ), is_omt ); } static point draw_string( Font &font, @@ -780,7 +788,7 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ const bool has_debug_vision = you.has_trait( trait_DEBUG_NIGHTVISION ); // sight_points is hoisted for speed reasons. const int sight_points = !has_debug_vision ? - you.overmap_sight_range( g->light_level( you.posz() ) ) : + you.overmap_modified_sight_range( g->light_level( you.posz() ) ) : 100; const bool showhordes = uistate.overmap_show_hordes; const bool show_map_revealed = uistate.overmap_show_revealed_omts; @@ -797,9 +805,10 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ for( int col = min_col; col < max_col; col++ ) { const tripoint_abs_omt omp = origin + point( col, row ); - const bool see = overmap_buffer.seen( omp ); - const bool los = see && ( you.overmap_los( omp, sight_points ) || uistate.overmap_debug_mongroup || - you.has_trait( trait_DEBUG_CLAIRVOYANCE ) ); + const om_vision_level vision = overmap_buffer.seen( omp ); + const bool los = overmap_buffer.seen_more_than( omp, om_vision_level::details ) && + ( you.overmap_los( omp, sight_points ) || uistate.overmap_debug_mongroup || + you.has_trait( trait_DEBUG_CLAIRVOYANCE ) ); // the full string from the ter_id including _north etc. std::string id; TILE_CATEGORY category = TILE_CATEGORY::OVERMAP_TERRAIN; @@ -816,11 +825,15 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ } else { id = "unexplored_terrain"; } - } else if( !see ) { + } else if( vision == om_vision_level::unseen ) { id = "unknown_terrain"; } else { - id = get_omt_id_rotation_and_subtile( omp, rotation, subtile ); + bool is_omt = false; + std::tie( id, is_omt ) = get_omt_id_rotation_and_subtile( omp, rotation, subtile ); mx = overmap_buffer.extra( omp ); + if( !is_omt ) { + category = TILE_CATEGORY::OVERMAP_VISION_LEVEL; + } } const lit_level ll = overmap_buffer.is_explored( omp ) ? lit_level::LOW : lit_level::LIT; @@ -840,7 +853,7 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ } } - if( see ) { + if( vision != om_vision_level::unseen ) { if( blink && uistate.overmap_debug_mongroup ) { const std::vector mgroups = overmap_buffer.monsters_at( omp ); if( !mgroups.empty() ) { @@ -962,7 +975,8 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ // draw nearby seen npcs for( const shared_ptr_fast &guy : npcs_near_player ) { const tripoint_abs_omt &guy_loc = guy->global_omt_location(); - if( guy_loc.z() == center_abs_omt.z() && ( has_debug_vision || overmap_buffer.seen( guy_loc ) ) ) { + if( guy_loc.z() == center_abs_omt.z() && ( has_debug_vision || + overmap_buffer.seen_more_than( guy_loc, om_vision_level::details ) ) ) { draw_entity_with_overlays( *guy, global_omt_to_draw_position( guy_loc ), lit_level::LIT, height_3d ); } @@ -1029,7 +1043,8 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ for( const city_reference &city : overmap_buffer.get_cities_near( project_to( center_abs_omt ), radius ) ) { const tripoint_abs_omt city_center = project_to( city.abs_sm_pos ); - if( overmap_buffer.seen( city_center ) && overmap_area.contains( city_center.raw() ) ) { + if( overmap_buffer.seen_more_than( city_center, om_vision_level::outlines ) && + overmap_area.contains( city_center.raw() ) ) { label_bg( city.abs_sm_pos, city.city->name ); } } @@ -1037,7 +1052,8 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ for( const camp_reference &camp : overmap_buffer.get_camps_near( project_to( center_abs_omt ), radius ) ) { const tripoint_abs_omt camp_center = project_to( camp.abs_sm_pos ); - if( overmap_buffer.seen( camp_center ) && overmap_area.contains( camp_center.raw() ) ) { + if( overmap_buffer.seen_more_than( camp_center, om_vision_level::outlines ) && + overmap_area.contains( camp_center.raw() ) ) { label_bg( camp.abs_sm_pos, camp.camp->name ); } } @@ -1060,7 +1076,8 @@ void cata_tiles::draw_om( const point &dest, const tripoint_abs_omt ¢er_abs_ } } - if( has_debug_vision || overmap_buffer.seen( center_abs_omt ) ) { + if( has_debug_vision || + overmap_buffer.seen_more_than( center_abs_omt, om_vision_level::details ) ) { for( const auto &npc : npcs_near_player ) { if( !npc->marked_for_death && npc->global_omt_location() == center_abs_omt ) { notes_window_text.emplace_back( npc->basic_symbol_color(), npc->get_name() ); diff --git a/src/type_id.h b/src/type_id.h index d3164eee1d3b6..5cb6ddc03a187 100644 --- a/src/type_id.h +++ b/src/type_id.h @@ -201,6 +201,9 @@ struct oter_type_t; using oter_type_id = int_id; using oter_type_str_id = string_id; +class oter_vision; +using oter_vision_id = string_id; + class overmap_connection; using overmap_connection_id = string_id; diff --git a/tests/mutation_test.cpp b/tests/mutation_test.cpp index d6bfb34c704e7..418a0e9596abe 100644 --- a/tests/mutation_test.cpp +++ b/tests/mutation_test.cpp @@ -349,31 +349,31 @@ TEST_CASE( "OVERMAP_SIGHT_enchantment_affect_overmap_sight_range", "[mutations][ WHEN( "character has no traits, that change overmap sight range" ) { THEN( "unchanged sight range" ) { - CHECK( dummy.overmap_sight_range( 100.0f ) == 10.0 ); + CHECK( dummy.overmap_modified_sight_range( 100.0f ) == 10.0 ); } } WHEN( "character has TEST_OVERMAP_SIGHT_5" ) { dummy.toggle_trait( trait_TEST_OVERMAP_SIGHT_5 ); THEN( "they have increased overmap sight range" ) { - CHECK( dummy.overmap_sight_range( 100.0f ) == 15.0 ); + CHECK( dummy.overmap_modified_sight_range( 100.0f ) == 15.0 ); } // Regression test for #42853 THEN( "having another trait does not cancel the TEST_OVERMAP_SIGHT_5 trait" ) { dummy.toggle_trait( trait_SMELLY ); - CHECK( dummy.overmap_sight_range( 100.0f ) == 15.0 ); + CHECK( dummy.overmap_modified_sight_range( 100.0f ) == 15.0 ); } } WHEN( "character has TEST_OVERMAP_SIGHT_MINUS_10 trait" ) { dummy.toggle_trait( trait_TEST_OVERMAP_SIGHT_MINUS_10 ); THEN( "they have reduced overmap sight range" ) { - CHECK( dummy.overmap_sight_range( 100.0f ) == 3.0 ); + CHECK( dummy.overmap_modified_sight_range( 100.0f ) == 3.0 ); } // Regression test for #42853 THEN( "having another trait does not cancel the TEST_OVERMAP_SIGHT_MINUS_10 trait" ) { dummy.toggle_trait( trait_SMELLY ); - CHECK( dummy.overmap_sight_range( 100.0f ) == 3.0 ); + CHECK( dummy.overmap_modified_sight_range( 100.0f ) == 3.0 ); } } } diff --git a/tests/submap_load_test.cpp b/tests/submap_load_test.cpp index fde024f3bd216..5bdb5be306a89 100644 --- a/tests/submap_load_test.cpp +++ b/tests/submap_load_test.cpp @@ -851,7 +851,7 @@ static JsonValue submap_fd_pre_migration = json_loader::from_string( submap_fd_p static void load_from_jsin( submap &sm, const JsonValue &jsin ) { // Ensure that the JSON is up to date for our savegame version - REQUIRE( savegame_version == 33 ); + REQUIRE( savegame_version == 34 ); int version = 0; JsonObject sm_json = jsin.get_object(); if( sm_json.has_member( "version" ) ) { diff --git a/tests/widget_test.cpp b/tests/widget_test.cpp index 95a4573ccbd53..48a7ce5202638 100644 --- a/tests/widget_test.cpp +++ b/tests/widget_test.cpp @@ -1954,7 +1954,7 @@ static void fill_overmap_area( const avatar &ava, const oter_id &oter ) for( int y = -1; y <= 1; ++y ) { const tripoint offset( x, y, 0 ); overmap_buffer.ter_set( ava_pos + offset, oter ); - overmap_buffer.set_seen( ava_pos + offset, true ); + overmap_buffer.set_seen( ava_pos + offset, om_vision_level::full ); } } }