Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 25428ff

Browse files
authored
Adjusts the emergency shuttle call times and makes the shuttle autocall if the round goes past 2 hours (#22220)
* shuttle changes * fix error * Update shuttle.dm * you can technically cheese this plus fixing
1 parent 20579b1 commit 25428ff

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed

code/__DEFINES/shuttles.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565

6666

6767
// Alert level related
68-
#define ALERT_COEFF_AUTOEVAC_NORMAL 2.5
69-
#define ALERT_COEFF_GREEN 2
68+
#define ALERT_COEFF_AUTOEVAC_NORMAL 1.5
69+
#define ALERT_COEFF_GREEN 1.2
7070
#define ALERT_COEFF_BLUE 1
7171
#define ALERT_COEFF_RED 0.5
7272
#define ALERT_COEFF_AUTOEVAC_CRITICAL 0.4

code/controllers/subsystem/shuttle.dm

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -217,28 +217,36 @@ SUBSYSTEM_DEF(shuttle)
217217
if(emergency_no_escape || admin_emergency_no_recall || emergency_no_recall || !emergency || !SSticker.HasRoundStarted())
218218
return
219219

220-
var/threshold = CONFIG_GET(number/emergency_shuttle_autocall_threshold)
221-
if(!threshold)
220+
if(!length(GLOB.joined_player_list)) //if there's nobody actually in the game...
222221
return
223222

224-
var/alive = 0
225-
for(var/I in GLOB.player_list)
226-
var/mob/M = I
227-
if(M.stat != DEAD)
228-
++alive
229-
230-
var/total = GLOB.joined_player_list.len
231-
if(total <= 0)
232-
return //no players no autoevac
233-
234-
if(alive / total <= threshold)
235-
var/msg = "Automatically dispatching shuttle due to crew death."
236-
message_admins(msg)
237-
log_game("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
238-
emergency_no_recall = TRUE
239-
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
240-
if(emergency.timeLeft(1) > emergency_no_recall * 0.4)
241-
emergency.request(null, set_coefficient = 0.4)
223+
var/threshold = CONFIG_GET(number/emergency_shuttle_autocall_threshold)
224+
if(threshold)
225+
var/alive = 0
226+
for(var/I in GLOB.player_list)
227+
var/mob/M = I
228+
if(M.stat != DEAD)
229+
++alive
230+
231+
var/total = length(GLOB.joined_player_list)
232+
if(!total) return
233+
234+
if(alive / total <= threshold)
235+
emergency_no_recall = TRUE
236+
if(emergency.timeLeft(1) > ALERT_COEFF_AUTOEVAC_CRITICAL)
237+
var/msg = "Automatically dispatching shuttle due to crew death."
238+
message_admins(msg)
239+
log_game("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
240+
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
241+
emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_CRITICAL)
242+
return
243+
if(world.time - SSticker.round_start_time >= 2 HOURS) //auto call the shuttle after 2 hours
244+
emergency_no_recall = TRUE //no recalling after 2 hours
245+
if(emergency.timeLeft(1) > SSsecurity_level.current_security_level.shuttle_call_time_mod)
246+
var/msg = "Automatically dispatching shuttle due to lack of shift end response."
247+
message_admins(msg)
248+
priority_announce("Dispatching shuttle due to lack of shift end response.")
249+
emergency.request(null)
242250

243251
/datum/controller/subsystem/shuttle/proc/block_recall(lockout_timer)
244252
if(isnull(lockout_timer))
@@ -434,7 +442,7 @@ SUBSYSTEM_DEF(shuttle)
434442

435443
if(callShuttle)
436444
if(EMERGENCY_IDLE_OR_RECALLED)
437-
emergency.request(null, set_coefficient = 2.5)
445+
emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_NORMAL)
438446
log_game("There is no means of calling the shuttle anymore. Shuttle automatically called.")
439447
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
440448

0 commit comments

Comments
 (0)