diff --git a/code/controllers/Processes/shuttles.dm b/code/controllers/Processes/shuttles.dm index 4f47bda014c..f9eaa77e576 100644 --- a/code/controllers/Processes/shuttles.dm +++ b/code/controllers/Processes/shuttles.dm @@ -13,6 +13,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 var/emergencyCallTime = 6000 //time taken for emergency shuttle to reach the station when called (in deciseconds) var/emergencyDockTime = 1800 //time taken for emergency shuttle to leave again once it has docked (in deciseconds) var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds) + var/emergency_sec_level_time = 0 // time sec level was last raised to red or higher var/area/emergencyLastCallLoc var/emergencyNoEscape @@ -134,6 +135,10 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) var/area/signal_origin = get_area(user) var/emergency_reason = "\nNature of emergency:\n\n[call_reason]" if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes. + if(world.time - emergency_sec_level_time < emergencyCallTime * 0.5) + // It hasn't been five minutes since the alert was raised! They're cheesing the shuttle. + to_chat(user, "A priority emergency shuttle is being prepared. Please wait another [abs(round(((emergency_sec_level_time + emergencyCallTime * 0.5) - world.time)/600))] minutes before trying again.") + return emergency.request(null, 0.5, signal_origin, html_decode(emergency_reason), 1) else emergency.request(null, 1, signal_origin, html_decode(emergency_reason), 0) diff --git a/code/modules/security_levels/security levels.dm b/code/modules/security_levels/security levels.dm index fa1e6b6c841..1f0177691e3 100644 --- a/code/modules/security_levels/security levels.dm +++ b/code/modules/security_levels/security levels.dm @@ -27,6 +27,10 @@ //Will not be announced if you try to set to the same level as it already is if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level) + if(level >= SEC_LEVEL_RED && security_level < SEC_LEVEL_RED) + // Mark down this time to prevent shuttle cheese + shuttle_master.emergency_sec_level_time = world.time + switch(level) if(SEC_LEVEL_GREEN) security_announcement_down.Announce("All threats to the station have passed. All weapons need to be holstered and privacy laws are once again fully enforced.","Attention! Security level lowered to green.")