From 2c7d0ab610565e5e3cf623ce2ae433e6a4c58492 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:15:01 -0700 Subject: [PATCH] [MIRROR] Default spawnpoint (#12513) Co-authored-by: TheGreatKitsune <88862343+TheGreatKitsune@users.noreply.github.com> --- code/__defines/preferences.dm | 2 ++ .../client/preferences/types/character/general/01_basic.dm | 4 ++++ code/modules/unit_tests/map_tests.dm | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/code/__defines/preferences.dm b/code/__defines/preferences.dm index 3b027e78dc..6347419483 100644 --- a/code/__defines/preferences.dm +++ b/code/__defines/preferences.dm @@ -76,3 +76,5 @@ #define PAI_UNSET "None Set" #define PAI_DEFAULT_CHASSIS "Drone" #define PAI_DEFAULT_EMAGGED_CHASSIS "Syndicate Fox" + +#define DEFAULT_LATEJOIN_LOCATION /datum/spawnpoint/arrivals diff --git a/code/modules/client/preferences/types/character/general/01_basic.dm b/code/modules/client/preferences/types/character/general/01_basic.dm index 022407bf5d..9f0e55cacd 100644 --- a/code/modules/client/preferences/types/character/general/01_basic.dm +++ b/code/modules/client/preferences/types/character/general/01_basic.dm @@ -173,6 +173,10 @@ /datum/preference/choiced/living/spawnpoint/apply_to_living(mob/living/target, value) return // handled in job_controller +/datum/preference/choiced/living/spawnpoint/create_default_value() + var/datum/spawnpoint/default_spawnpoint = DEFAULT_LATEJOIN_LOCATION + return default_spawnpoint::display_name + /datum/preference/text/living/private_notes category = PREFERENCE_CATEGORY_MANUALLY_RENDERED savefile_identifier = PREFERENCE_CHARACTER diff --git a/code/modules/unit_tests/map_tests.dm b/code/modules/unit_tests/map_tests.dm index de6fca050b..c7807b7085 100644 --- a/code/modules/unit_tests/map_tests.dm +++ b/code/modules/unit_tests/map_tests.dm @@ -236,3 +236,9 @@ if(failed) TEST_FAIL("Map has smes with duplicated RCon_tag") + +/datum/unit_test/default_spawnpoint_exists + +/datum/unit_test/default_spawnpoint_exists/Run() + var/datum/spawnpoint/default_spawnpoint = new DEFAULT_LATEJOIN_LOCATION() + TEST_ASSERT(LAZYLEN(default_spawnpoint.turfs), "Map does not define the default spawnpoint location ([default_spawnpoint.display_name])")