Adds ability to exempt areas from unit tests on a per-map basis

This commit is contained in:
Neerti
2017-11-18 02:38:58 -05:00
parent 2a55433ca9
commit 2567e4e3d1
3 changed files with 20 additions and 1 deletions

View File

@@ -12,7 +12,8 @@
/area/holodeck,
/area/supply/station,
/area/mine,
/area/vacant/vacant_shop
/area/vacant/vacant_shop,
/area/turbolift
)
var/list/exempt_from_atmos = typesof(/area/maintenance,
@@ -33,6 +34,11 @@
/area/vacant/vacant_shop
)
// Some maps have areas specific to the map, so include those.
exempt_areas += using_map.unit_test_exempt_areas
exempt_from_atmos += using_map.unit_test_exempt_from_atmos
exempt_from_apc += using_map.unit_test_exempt_from_apc
for(var/area/A in world)
if(A.z == 1 && !(A.type in exempt_areas))
area_test_count++

View File

@@ -42,6 +42,14 @@
station_networks = list()
allowed_spawns = list("Arrivals Shuttle","Gateway", "Cryogenic Storage", "Cyborg Storage")
unit_test_exempt_areas = list(
/area/ninja_dojo
)
unit_test_exempt_from_atmos = list(
/area/tcomm/chamber
)
// Short range computers see only the six main levels, others can see the surrounding surface levels.
/datum/map/southern_cross/get_map_levels(var/srcz, var/long_range = TRUE)

View File

@@ -74,6 +74,11 @@ var/list/all_maps = list()
var/id_hud_icons = 'icons/mob/hud.dmi' // Used by the ID HUD (primarily sechud) overlay.
// Some maps include areas for that map only and don't exist when not compiled, so Travis needs this to learn of new areas that are specific to a map.
var/list/unit_test_exempt_areas = list()
var/list/unit_test_exempt_from_atmos = list()
var/list/unit_test_exempt_from_apc = list()
/datum/map/New()
..()
if(zlevel_datum_type)