mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
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
This commit is contained in:
@@ -65,8 +65,8 @@
|
|||||||
|
|
||||||
|
|
||||||
// Alert level related
|
// Alert level related
|
||||||
#define ALERT_COEFF_AUTOEVAC_NORMAL 2.5
|
#define ALERT_COEFF_AUTOEVAC_NORMAL 1.5
|
||||||
#define ALERT_COEFF_GREEN 2
|
#define ALERT_COEFF_GREEN 1.2
|
||||||
#define ALERT_COEFF_BLUE 1
|
#define ALERT_COEFF_BLUE 1
|
||||||
#define ALERT_COEFF_RED 0.5
|
#define ALERT_COEFF_RED 0.5
|
||||||
#define ALERT_COEFF_AUTOEVAC_CRITICAL 0.4
|
#define ALERT_COEFF_AUTOEVAC_CRITICAL 0.4
|
||||||
|
|||||||
@@ -217,28 +217,36 @@ SUBSYSTEM_DEF(shuttle)
|
|||||||
if(emergency_no_escape || admin_emergency_no_recall || emergency_no_recall || !emergency || !SSticker.HasRoundStarted())
|
if(emergency_no_escape || admin_emergency_no_recall || emergency_no_recall || !emergency || !SSticker.HasRoundStarted())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/threshold = CONFIG_GET(number/emergency_shuttle_autocall_threshold)
|
if(!length(GLOB.joined_player_list)) //if there's nobody actually in the game...
|
||||||
if(!threshold)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
var/alive = 0
|
var/threshold = CONFIG_GET(number/emergency_shuttle_autocall_threshold)
|
||||||
for(var/I in GLOB.player_list)
|
if(threshold)
|
||||||
var/mob/M = I
|
var/alive = 0
|
||||||
if(M.stat != DEAD)
|
for(var/I in GLOB.player_list)
|
||||||
++alive
|
var/mob/M = I
|
||||||
|
if(M.stat != DEAD)
|
||||||
|
++alive
|
||||||
|
|
||||||
|
var/total = length(GLOB.joined_player_list)
|
||||||
|
if(!total) return
|
||||||
|
|
||||||
var/total = GLOB.joined_player_list.len
|
if(alive / total <= threshold)
|
||||||
if(total <= 0)
|
emergency_no_recall = TRUE
|
||||||
return //no players no autoevac
|
if(emergency.timeLeft(1) > ALERT_COEFF_AUTOEVAC_CRITICAL)
|
||||||
|
var/msg = "Automatically dispatching shuttle due to crew death."
|
||||||
if(alive / total <= threshold)
|
message_admins(msg)
|
||||||
var/msg = "Automatically dispatching shuttle due to crew death."
|
log_game("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
|
||||||
message_admins(msg)
|
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
|
||||||
log_game("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
|
emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_CRITICAL)
|
||||||
emergency_no_recall = TRUE
|
return
|
||||||
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
|
if(world.time - SSticker.round_start_time >= 2 HOURS) //auto call the shuttle after 2 hours
|
||||||
if(emergency.timeLeft(1) > emergency_no_recall * 0.4)
|
emergency_no_recall = TRUE //no recalling after 2 hours
|
||||||
emergency.request(null, set_coefficient = 0.4)
|
if(emergency.timeLeft(1) > SSsecurity_level.current_security_level.shuttle_call_time_mod)
|
||||||
|
var/msg = "Automatically dispatching shuttle due to lack of shift end response."
|
||||||
|
message_admins(msg)
|
||||||
|
priority_announce("Dispatching shuttle due to lack of shift end response.")
|
||||||
|
emergency.request(null)
|
||||||
|
|
||||||
/datum/controller/subsystem/shuttle/proc/block_recall(lockout_timer)
|
/datum/controller/subsystem/shuttle/proc/block_recall(lockout_timer)
|
||||||
if(isnull(lockout_timer))
|
if(isnull(lockout_timer))
|
||||||
@@ -434,7 +442,7 @@ SUBSYSTEM_DEF(shuttle)
|
|||||||
|
|
||||||
if(callShuttle)
|
if(callShuttle)
|
||||||
if(EMERGENCY_IDLE_OR_RECALLED)
|
if(EMERGENCY_IDLE_OR_RECALLED)
|
||||||
emergency.request(null, set_coefficient = 2.5)
|
emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_NORMAL)
|
||||||
log_game("There is no means of calling the shuttle anymore. Shuttle automatically called.")
|
log_game("There is no means of calling the shuttle anymore. Shuttle automatically called.")
|
||||||
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
|
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user