mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-30 07:06:31 +01:00
@@ -107,6 +107,7 @@
|
||||
#include "get_turf_pixel.dm"
|
||||
#include "initialize_sanity.dm"
|
||||
// #include "keybinding_init.dm" // this works
|
||||
#include "mapping.dm"
|
||||
#include "map_template_paths.dm"
|
||||
// #include "missing_icons.dm" // there is a lot
|
||||
// #include "pills.dm"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/// Conveys all log_mapping messages as unit test failures, as they all indicate mapping problems.
|
||||
/datum/unit_test/maptest_log_mapping
|
||||
// Happen before all other tests, to make sure we only capture normal mapping logs.
|
||||
priority = TEST_PRE
|
||||
|
||||
/datum/unit_test/maptest_log_mapping/Run()
|
||||
var/static/regex/test_areacoord_regex = regex(@"\(-?\d+,-?\d+,(-?\d+)\)")
|
||||
|
||||
for(var/log_entry in GLOB.unit_test_mapping_logs)
|
||||
// Only fail if AREACOORD was conveyed, and it's a station or mining z-level.
|
||||
// This is due to mapping errors don't have coords being impossible to diagnose as a unit test,
|
||||
// and various ruins frequently intentionally doing non-standard things.
|
||||
if(!test_areacoord_regex.Find(log_entry))
|
||||
continue
|
||||
var/z = text2num(test_areacoord_regex.group[1])
|
||||
if(!isStationLevel(z))
|
||||
continue
|
||||
|
||||
TEST_FAIL(log_entry)
|
||||
Reference in New Issue
Block a user