Merge branch 'master' of https://github.com/VOREStation/VOREStation into upstream-merge-8298

This commit is contained in:
MistakeNot4892
2022-08-25 14:26:20 +10:00
1603 changed files with 70496 additions and 61794 deletions
+38 -25
View File
@@ -1,5 +1,5 @@
/datum/unit_test/apc_area_test
name = "MAP: Area Test APC / Scrubbers / Vents Z level 1"
name = "MAP: Area Test APC / Scrubbers / Vents (Defined Z-Levels)"
/datum/unit_test/apc_area_test/start_test()
var/list/bad_areas = list()
@@ -47,17 +47,16 @@
var/area_good = 1
var/bad_msg = "--------------- [A.name]([A.type])"
if(isnull(A.apc) && !(A.type in exempt_from_apc))
log_unit_test("[bad_msg] lacks an APC.")
log_unit_test("[bad_msg] lacks an APC. (X[A.x]|Y[A.y]) - Z[A.z])")
area_good = 0
if(!A.air_scrub_info.len && !(A.type in exempt_from_atmos))
log_unit_test("[bad_msg] lacks an Air scrubber.")
log_unit_test("[bad_msg] lacks an Air scrubber. (X[A.x]|Y[A.y]) - (Z[A.z])")
area_good = 0
if(!A.air_vent_info.len && !(A.type in exempt_from_atmos))
log_unit_test("[bad_msg] lacks an Air vent.")
log_unit_test("[bad_msg] lacks an Air vent. (X[A.x]|Y[A.y]) - (Z[A.z])")
area_good = 0
if(!area_good)
@@ -71,9 +70,11 @@
return 1
/datum/unit_test/wire_test
name = "MAP: Cable Test Z level 1"
name = "MAP: Cable Test (Defined Z-Levels)"
/datum/unit_test/wire_test/start_test()
set background=1
var/wire_test_count = 0
var/bad_tests = 0
var/turf/T = null
@@ -81,23 +82,35 @@
var/list/cable_turfs = list()
var/list/dirs_checked = list()
for(C in world)
T = null
var/list/exempt_from_wires = list()
exempt_from_wires += using_map.unit_test_exempt_from_wires.Copy()
T = get_turf(C)
if(T && T.z == 1)
cable_turfs |= get_turf(C)
var/list/zs_to_test = using_map.unit_test_z_levels || list(1) //Either you set it, or you just get z1
for(T in cable_turfs)
var/bad_msg = "--------------- [T.name] \[[T.x] / [T.y] / [T.z]\]"
dirs_checked.Cut()
for(C in T)
wire_test_count++
var/combined_dir = "[C.d1]-[C.d2]"
if(combined_dir in dirs_checked)
bad_tests++
log_unit_test("[bad_msg] Contains multiple wires with same direction on top of each other.")
dirs_checked.Add(combined_dir)
for(var/color in possible_cable_coil_colours)
cable_turfs = list()
for(C in world)
T = null
T = get_turf(C)
var/area/A = get_area(T)
if(T && (T.z in zs_to_test) && !(A.type in exempt_from_wires))
if(C.color == possible_cable_coil_colours[color])
cable_turfs |= get_turf(C)
for(T in cable_turfs)
var/bad_msg = "--------------- [T.name] \[[T.x] / [T.y] / [T.z]\] [color]"
dirs_checked.Cut()
for(C in T)
wire_test_count++
var/combined_dir = "[C.d1]-[C.d2]"
if(combined_dir in dirs_checked)
bad_tests++
log_unit_test("[bad_msg] Contains multiple wires with same direction on top of each other.")
dirs_checked.Add(combined_dir)
log_unit_test("[color] wires checked.")
if(bad_tests)
fail("\[[bad_tests] / [wire_test_count]\] Some turfs had overlapping wires going the same direction.")
@@ -121,12 +134,12 @@
var/a_gas = ""
for(var/gas in E.A.air.gas)
a_gas += "[gas]=[E.A.air.gas[gas]]"
var/b_temp
var/b_moles
var/b_vol
var/b_gas = ""
// Two zones mixing
if(istype(E, /connection_edge/zone))
var/connection_edge/zone/Z = E
@@ -144,11 +157,11 @@
b_vol = "Unsim"
for(var/gas in U.air.gas)
b_gas += "[gas]=[U.air.gas[gas]]"
edge_log += "Active Edge [E] ([E.type])"
edge_log += "Edge side A: T:[a_temp], Mol:[a_moles], Vol:[a_vol], Gas:[a_gas]"
edge_log += "Edge side B: T:[b_temp], Mol:[b_moles], Vol:[b_vol], Gas:[b_gas]"
for(var/turf/T in E.connecting_turfs)
edge_log += "+--- Connecting Turf [T] ([T.type]) @ [T.x], [T.y], [T.z] ([T.loc])"