From cee99a195f1ed82f4dd03daa17f4f4c377fe25cf Mon Sep 17 00:00:00 2001 From: Lucy Date: Thu, 13 Jun 2024 19:10:14 -0400 Subject: [PATCH] Fix roundstart antag rulesets breaking with the Late Arrivals trait (#2256) --- monkestation/code/modules/storytellers/gamemode_subsystem.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monkestation/code/modules/storytellers/gamemode_subsystem.dm b/monkestation/code/modules/storytellers/gamemode_subsystem.dm index 27155fdadedd..00b44274bcf8 100644 --- a/monkestation/code/modules/storytellers/gamemode_subsystem.dm +++ b/monkestation/code/modules/storytellers/gamemode_subsystem.dm @@ -261,7 +261,10 @@ SUBSYSTEM_DEF(gamemode) else if(living_players && isliving(player)) if(!ishuman(player) && !isAI(player)) continue - if(!(player.z in SSmapping.levels_by_trait(ZTRAIT_STATION))) + // I split these checks up to make the code more readable ~Lucy + var/is_on_station = is_station_level(player.z) + var/is_late_arrival = HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS) && istype(get_area(player), /area/shuttle/arrival) + if(!is_on_station && !is_late_arrival) continue candidate_candidates += player