Merge pull request #10702 from Ghommie/Ghommie-cit528

Hey, do you remember that wizard round where everyone tried arming up the nuclear bomb and we all went DELTA RED DELTA RED DELTA RED DELTA ?
This commit is contained in:
kevinz000
2020-03-10 17:24:48 -07:00
committed by GitHub
3 changed files with 31 additions and 6 deletions
@@ -31,6 +31,7 @@
var/interior = ""
var/proper_bomb = TRUE //Please
var/obj/effect/countdown/nuclearbomb/countdown
var/nuclear_cooldown //used to stop global spam.
/obj/machinery/nuclearbomb/Initialize()
. = ..()
@@ -416,12 +417,16 @@
return
timing = !timing
if(timing)
if(nuclear_cooldown > world.time)
to_chat(usr, "<span class='danger'>[src]'s timer protocols are currently on cooldown, please stand by.</span>")
return
previous_level = get_security_level()
detonation_timer = world.time + (timer_set * 10)
for(var/obj/item/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list)
S.switch_mode_to(TRACK_INFILTRATOR)
countdown.start()
set_security_level("delta")
nuclear_cooldown = world.time + 15 SECONDS
if(GLOB.war_declared)
var/area/A = get_area(src)
+16 -1
View File
@@ -2,6 +2,7 @@
#define ENGINES_START_TIME 100
#define ENGINES_STARTED (SSshuttle.emergency.mode == SHUTTLE_IGNITING)
#define IS_DOCKED (SSshuttle.emergency.mode == SHUTTLE_DOCKED || (ENGINES_STARTED))
#define MAX_AUTH_INPUTS 6
#define NOT_BEGUN 0
#define STAGE_1 1
@@ -18,6 +19,9 @@
resistance_flags = INDESTRUCTIBLE
var/auth_need = 3
var/list/authorized = list()
var/auth_cooldown //these two vars are used to quell spam.
var/auth_combo = 0
var/hijack_last_stage_increase = 0
var/hijack_stage_time = 50
var/hijack_stage_cooldown = 50
@@ -92,6 +96,13 @@
to_chat(user, "<span class='warning'>The access level of your card is not high enough.</span>")
return
if(auth_cooldown <= world.time)
auth_combo = 0
else if(auth_combo >= MAX_AUTH_INPUTS)
to_chat(user, "<span class='warning'>Authorizations controller lockdown engaged, please wait [CEILING(auth_cooldown - world.time, 1)] before trying again.</span>")
return
var/old_len = authorized.len
switch(action)
@@ -116,6 +127,10 @@
minor_announce("[remaining] authorizations needed until shuttle is launched early", null, alert)
if(repeal)
minor_announce("Early launch authorization revoked, [remaining] authorizations needed")
auth_cooldown = world.time + 15 SECONDS
if(++auth_combo == MAX_AUTH_INPUTS) //C-c-combo breaker!
say("Authorization controller abuse detected, lockdown engaged.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
/obj/machinery/computer/emergency_shuttle/proc/authorize(mob/user, source)
var/obj/item/card/id/ID = user.get_idcard(TRUE)
@@ -629,7 +644,7 @@
#undef ENGINES_START_TIME
#undef ENGINES_STARTED
#undef IS_DOCKED
#undef MAX_AUTH_INPUTS
#undef NOT_BEGUN
#undef STAGE_1
#undef STAGE_2