mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Emergency shuttle is aware of security level (#78271)
## About The Pull Request The emergency shuttle maintains its security level coefficient and does the calculation instead of outside procs that aren't aware of what alert it was when the shuttle was first called. If the shuttle auto-call timer should be capped at the current security level timer, that can be done in a different PR. ## Why It's Good For The Game Fixes https://github.com/tgstation/tgstation/issues/78159 ## Changelog 🆑 LT3 fix: Emergency shuttle should correctly scale timer up/down when changing security levels /🆑
This commit is contained in:
@@ -41,8 +41,6 @@ SUBSYSTEM_DEF(security_level)
|
||||
|
||||
announce_security_level(selected_level) // We want to announce BEFORE updating to the new level
|
||||
|
||||
var/old_shuttle_call_time_mod = current_security_level.shuttle_call_time_mod // Need this before we set the new one
|
||||
|
||||
SSsecurity_level.current_security_level = selected_level
|
||||
|
||||
if(selected_level.looping_sound)
|
||||
@@ -52,9 +50,7 @@ SUBSYSTEM_DEF(security_level)
|
||||
can_fire = FALSE
|
||||
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) // By god this is absolutely shit
|
||||
old_shuttle_call_time_mod = 1 / old_shuttle_call_time_mod
|
||||
SSshuttle.emergency.modTimer(old_shuttle_call_time_mod)
|
||||
SSshuttle.emergency.modTimer(selected_level.shuttle_call_time_mod)
|
||||
SSshuttle.emergency.alert_coeff_change(selected_level.shuttle_call_time_mod)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_SECURITY_LEVEL_CHANGED, selected_level.number_level)
|
||||
SSnightshift.check_nightshift()
|
||||
|
||||
@@ -262,8 +262,8 @@ SUBSYSTEM_DEF(shuttle)
|
||||
log_shuttle("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
|
||||
emergency_no_recall = TRUE
|
||||
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
|
||||
if(emergency.timeLeft(1) > emergency_call_time * 0.4)
|
||||
emergency.request(null, set_coefficient = 0.4)
|
||||
if(emergency.timeLeft(1) > emergency_call_time * ALERT_COEFF_AUTOEVAC_CRITICAL)
|
||||
emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_CRITICAL)
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/block_recall(lockout_timer)
|
||||
if(admin_emergency_no_recall)
|
||||
@@ -457,7 +457,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
if(callShuttle)
|
||||
if(EMERGENCY_IDLE_OR_RECALLED)
|
||||
emergency.request(null, set_coefficient = 2.5)
|
||||
emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_NORMAL)
|
||||
log_shuttle("There is no means of calling the emergency shuttle anymore. Shuttle automatically called.")
|
||||
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user