From e61f13634eaa5e038d7d65c8158e3e14ed75509d Mon Sep 17 00:00:00 2001 From: Ghommie Date: Thu, 27 Jun 2019 04:23:14 +0200 Subject: [PATCH 1/5] Merging the end-of-shift and its shuttle call announcements into one. --- code/modules/shuttle/emergency.dm | 5 +++-- modular_citadel/code/controllers/subsystem/shuttle.dm | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index d41fd6a79b..020b4b29ab 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -199,7 +199,7 @@ . = ..() -/obj/docking_port/mobile/emergency/request(obj/docking_port/stationary/S, area/signalOrigin, reason, redAlert, set_coefficient=null) +/obj/docking_port/mobile/emergency/request(obj/docking_port/stationary/S, area/signalOrigin, reason, redAlert, set_coefficient=null, silent = FALSE) if(!isnum(set_coefficient)) var/security_num = seclevel2num(get_security_level()) switch(security_num) @@ -228,7 +228,8 @@ else SSshuttle.emergencyLastCallLoc = null - priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/ai/shuttlecalled.ogg', "Priority") + if(!silent) + priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/ai/shuttlecalled.ogg', "Priority") /obj/docking_port/mobile/emergency/cancel(area/signalOrigin) if(mode != SHUTTLE_CALL) diff --git a/modular_citadel/code/controllers/subsystem/shuttle.dm b/modular_citadel/code/controllers/subsystem/shuttle.dm index bb4592f819..ad33b6283f 100644 --- a/modular_citadel/code/controllers/subsystem/shuttle.dm +++ b/modular_citadel/code/controllers/subsystem/shuttle.dm @@ -1,6 +1,6 @@ /datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 3 hours has passed. if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //3 hours - SSshuttle.emergency.request() - priority_announce("The shift has come to an end and the shuttle called.") + SSshuttle.emergency.request(silent = TRUE) + priority_announce("The shift has come to an end and the shuttle called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, 'sound/ai/shuttlecalled.ogg', "Priority") log_game("Round time limit reached. Shuttle has been auto-called.") message_admins("Round time limit reached. Shuttle called.") From 17072eb809015825f99d987a51f8ae01f5722f12 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Thu, 27 Jun 2019 04:29:27 +0200 Subject: [PATCH 2/5] . --- modular_citadel/code/controllers/subsystem/shuttle.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/modular_citadel/code/controllers/subsystem/shuttle.dm b/modular_citadel/code/controllers/subsystem/shuttle.dm index ad33b6283f..3a46177bfc 100644 --- a/modular_citadel/code/controllers/subsystem/shuttle.dm +++ b/modular_citadel/code/controllers/subsystem/shuttle.dm @@ -1,6 +1,7 @@ /datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 3 hours has passed. if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //3 hours SSshuttle.emergency.request(silent = TRUE) + var/RedAlert = seclevel2num(get_security_level()) == SEC_LEVEL_RED ? TRUE : FALSE priority_announce("The shift has come to an end and the shuttle called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, 'sound/ai/shuttlecalled.ogg', "Priority") log_game("Round time limit reached. Shuttle has been auto-called.") message_admins("Round time limit reached. Shuttle called.") From 45467acdaf2061e6a82074ff84dc9ec9d48541ad Mon Sep 17 00:00:00 2001 From: Ghommie Date: Thu, 27 Jun 2019 04:31:40 +0200 Subject: [PATCH 3/5] .. --- modular_citadel/code/controllers/subsystem/shuttle.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_citadel/code/controllers/subsystem/shuttle.dm b/modular_citadel/code/controllers/subsystem/shuttle.dm index 3a46177bfc..ba2d54eb13 100644 --- a/modular_citadel/code/controllers/subsystem/shuttle.dm +++ b/modular_citadel/code/controllers/subsystem/shuttle.dm @@ -1,7 +1,7 @@ /datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 3 hours has passed. if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //3 hours SSshuttle.emergency.request(silent = TRUE) - var/RedAlert = seclevel2num(get_security_level()) == SEC_LEVEL_RED ? TRUE : FALSE + var/redAlert = seclevel2num(get_security_level()) == SEC_LEVEL_RED ? TRUE : FALSE priority_announce("The shift has come to an end and the shuttle called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, 'sound/ai/shuttlecalled.ogg', "Priority") log_game("Round time limit reached. Shuttle has been auto-called.") message_admins("Round time limit reached. Shuttle called.") From 17371196ee43de2fb0ee6bc08d93c3a8452e9f33 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Thu, 27 Jun 2019 16:51:14 +0200 Subject: [PATCH 4/5] Prevents the shuttle from being recalled (even if to no avail). --- modular_citadel/code/controllers/subsystem/shuttle.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modular_citadel/code/controllers/subsystem/shuttle.dm b/modular_citadel/code/controllers/subsystem/shuttle.dm index ba2d54eb13..ad32b3c1d3 100644 --- a/modular_citadel/code/controllers/subsystem/shuttle.dm +++ b/modular_citadel/code/controllers/subsystem/shuttle.dm @@ -1,7 +1,8 @@ -/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 3 hours has passed. - if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //3 hours +/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 2 hours have passed. + if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //2 hours SSshuttle.emergency.request(silent = TRUE) var/redAlert = seclevel2num(get_security_level()) == SEC_LEVEL_RED ? TRUE : FALSE priority_announce("The shift has come to an end and the shuttle called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, 'sound/ai/shuttlecalled.ogg', "Priority") log_game("Round time limit reached. Shuttle has been auto-called.") message_admins("Round time limit reached. Shuttle called.") + emergencyNoRecall = TRUE From db0d1ae5650bf07e66226c9fbdca496806303c49 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Fri, 28 Jun 2019 17:25:47 +0200 Subject: [PATCH 5/5] Applying requested changes. --- modular_citadel/code/controllers/subsystem/shuttle.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modular_citadel/code/controllers/subsystem/shuttle.dm b/modular_citadel/code/controllers/subsystem/shuttle.dm index ad32b3c1d3..ce3f062bdd 100644 --- a/modular_citadel/code/controllers/subsystem/shuttle.dm +++ b/modular_citadel/code/controllers/subsystem/shuttle.dm @@ -1,8 +1,7 @@ /datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 2 hours have passed. if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //2 hours SSshuttle.emergency.request(silent = TRUE) - var/redAlert = seclevel2num(get_security_level()) == SEC_LEVEL_RED ? TRUE : FALSE - priority_announce("The shift has come to an end and the shuttle called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, 'sound/ai/shuttlecalled.ogg', "Priority") + priority_announce("The shift has come to an end and the shuttle called. [seclevel2num(get_security_level()) == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, 'sound/ai/shuttlecalled.ogg', "Priority") log_game("Round time limit reached. Shuttle has been auto-called.") message_admins("Round time limit reached. Shuttle called.") emergencyNoRecall = TRUE