mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Adds a unit test that all roundstart spawnable jobs have a landmark to spawn at (#74995)
## About The Pull Request https://github.com/tgstation/tgstation/pull/74985#issuecomment-1523773626 Tests that all jobs that have `spawn_position > 0` at roundstart have a location to spawn at. Also changes the failure message for `get_default_roundstart_spawn_point` to send to `log_mapping` rather than `log_world`, as it is a map error and log world doesn't really help anyone. This would've been sufficient for the existing unit test `log_mapping`, but that unit test expects that the log has an areacoord supplied, which we can't really do, given we're reporting a _lack_ of something. ## Why It's Good For The Game Stops maps from regressing and dumping people on the latejoin shuttle roundstart. ## Changelog ~~Not necessary unless I find a map which forgot a landmark~~ 🆑 Melbert fix: Tramstation Robotics and RD now spawn in their departments roundstart fix: Birdboat detective now spawns in their office /🆑
This commit is contained in:
@@ -41,6 +41,9 @@
|
||||
/// List of additional areas that count as a part of the library
|
||||
var/library_areas = list()
|
||||
|
||||
/// List of unit tests that are skipped when running this map
|
||||
var/list/skipped_tests
|
||||
|
||||
/**
|
||||
* Proc that simply loads the default map config, which should always be functional.
|
||||
*/
|
||||
@@ -199,6 +202,16 @@
|
||||
continue
|
||||
library_areas += path
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
// Check for unit tests to skip, no reason to check these if we're not running tests
|
||||
for(var/path_as_text in json["ignored_unit_tests"])
|
||||
var/path_real = text2path(path_as_text)
|
||||
if(!ispath(path_real, /datum/unit_test))
|
||||
stack_trace("Invalid path in mapping config for ignored unit tests: \[[path_as_text]\]")
|
||||
continue
|
||||
LAZYADD(skipped_tests, path_real)
|
||||
#endif
|
||||
|
||||
defaulted = FALSE
|
||||
return TRUE
|
||||
#undef CHECK_EXISTS
|
||||
|
||||
Reference in New Issue
Block a user