From 366a58d34277bb39567c4d088066222727266c7a Mon Sep 17 00:00:00 2001 From: Byemoh Date: Wed, 19 Jun 2024 17:04:59 -0500 Subject: [PATCH 1/4] shuttle changes --- code/__DEFINES/shuttles.dm | 4 +-- code/controllers/subsystem/shuttle.dm | 43 +++++++++++++++------------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index 5904f4276f60..81362d674751 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -65,8 +65,8 @@ // Alert level related -#define ALERT_COEFF_AUTOEVAC_NORMAL 2.5 -#define ALERT_COEFF_GREEN 2 +#define ALERT_COEFF_AUTOEVAC_NORMAL 1.5 +#define ALERT_COEFF_GREEN 1.2 #define ALERT_COEFF_BLUE 1 #define ALERT_COEFF_RED 0.5 #define ALERT_COEFF_AUTOEVAC_CRITICAL 0.4 diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 0152b6e9494d..cfa1e45c2ce3 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -217,28 +217,33 @@ SUBSYSTEM_DEF(shuttle) if(emergency_no_escape || admin_emergency_no_recall || emergency_no_recall || !emergency || !SSticker.HasRoundStarted()) return - var/threshold = CONFIG_GET(number/emergency_shuttle_autocall_threshold) - if(!threshold) + if(!length(GLOB.joined_player_list)) //if there's nobody actually in the game... return - var/alive = 0 - for(var/I in GLOB.player_list) - var/mob/M = I - if(M.stat != DEAD) - ++alive - - var/total = GLOB.joined_player_list.len - if(total <= 0) - return //no players no autoevac - - if(alive / total <= threshold) - var/msg = "Automatically dispatching shuttle due to crew death." + var/threshold = CONFIG_GET(number/emergency_shuttle_autocall_threshold) + if(threshold) + var/alive = 0 + for(var/I in GLOB.player_list) + var/mob/M = I + if(M.stat != DEAD) + ++alive + + if(alive / total <= threshold) + var/msg = "Automatically dispatching shuttle due to crew death." + message_admins(msg) + log_game("[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_no_recall * 0.4) + emergency.request(null, set_coefficient = 0.4) + return + if(world.time - SSticker.round_start_time >= 2 HOURS) //auto call the shuttle after 2 hours + var/msg = "Automatically dispatching shuttle due to lack of shift end response." message_admins(msg) - log_game("[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_no_recall * 0.4) - emergency.request(null, set_coefficient = 0.4) + priority_announce("Dispatching shuttle due to lack of shift end response.") + if(emergency.mode == SHUTTLE_IDLE) + emergency.request(null) /datum/controller/subsystem/shuttle/proc/block_recall(lockout_timer) if(isnull(lockout_timer)) @@ -434,7 +439,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_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.") From e6e3dd25baba2d0b3ddd355bef1307d99b95bb81 Mon Sep 17 00:00:00 2001 From: Byemoh Date: Wed, 19 Jun 2024 17:05:28 -0500 Subject: [PATCH 2/4] fix error --- code/controllers/subsystem/shuttle.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index cfa1e45c2ce3..b1306f36937a 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -227,6 +227,9 @@ SUBSYSTEM_DEF(shuttle) var/mob/M = I if(M.stat != DEAD) ++alive + + var/total = length(GLOB.joined_player_list) + if(!total) return if(alive / total <= threshold) var/msg = "Automatically dispatching shuttle due to crew death." From 17e8b76730edfdc710f6d7559a34d867c6fea157 Mon Sep 17 00:00:00 2001 From: Byemoh Date: Tue, 6 Aug 2024 13:27:36 -0500 Subject: [PATCH 3/4] Update shuttle.dm --- code/controllers/subsystem/shuttle.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index b1306f36937a..df8ff079fbca 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -241,11 +241,11 @@ SUBSYSTEM_DEF(shuttle) emergency.request(null, set_coefficient = 0.4) return if(world.time - SSticker.round_start_time >= 2 HOURS) //auto call the shuttle after 2 hours - var/msg = "Automatically dispatching shuttle due to lack of shift end response." - message_admins(msg) - emergency_no_recall = TRUE - priority_announce("Dispatching shuttle due to lack of shift end response.") + emergency_no_recall = TRUE //no recalling after 2 hours if(emergency.mode == SHUTTLE_IDLE) + 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) From 1bc4cee69a6e8b136222f944afe139c31df20348 Mon Sep 17 00:00:00 2001 From: Byemoh Date: Sat, 10 Aug 2024 00:16:12 -0500 Subject: [PATCH 4/4] you can technically cheese this plus fixing --- code/controllers/subsystem/shuttle.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index df8ff079fbca..ebcd925711a8 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -232,17 +232,17 @@ SUBSYSTEM_DEF(shuttle) if(!total) return if(alive / total <= threshold) - var/msg = "Automatically dispatching shuttle due to crew death." - message_admins(msg) - log_game("[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_no_recall * 0.4) - emergency.request(null, set_coefficient = 0.4) - return + if(emergency.timeLeft(1) > ALERT_COEFF_AUTOEVAC_CRITICAL) + var/msg = "Automatically dispatching shuttle due to crew death." + message_admins(msg) + log_game("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]") + priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.") + emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_CRITICAL) + return if(world.time - SSticker.round_start_time >= 2 HOURS) //auto call the shuttle after 2 hours emergency_no_recall = TRUE //no recalling after 2 hours - if(emergency.mode == SHUTTLE_IDLE) + 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.")