From 2e044683ac2dd7f2b758b709ed98d5e28d57d015 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Thu, 7 Dec 2023 23:45:31 +0300 Subject: [PATCH] PO can remove queens override again, bit by bit edition (#5143) # About the pull request PO can perform a 20 seconds do_after to remove additional 20 seconds of the lockdown. # Explain why it's good for the game You used to be able to remove lockdown completely if you perform a 3 minutes do_after, but it was lost during the port to new shuttle system. Now it's back in another, better form! Gives marines a chance to remove lockdown sooner if they control the cockpit. In best case scenario you can remove the lock in 5 minutes. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: ihatethisengine balance: PO can remove queens dropship override again. /:cl: --------- Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- .../shuttle/computers/dropship_computer.dm | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index 6774d81e590d..67d3a20d969e 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -7,6 +7,7 @@ unacidable = TRUE exproof = TRUE needs_power = FALSE + var/override_being_removed = FALSE // Admin disabled var/disabled = FALSE @@ -143,15 +144,31 @@ to_chat(user, SPAN_NOTICE("\The [src] is not responsive")) return - if(dropship_control_lost && skillcheck(user, SKILL_PILOT, SKILL_PILOT_EXPERT)) + if(dropship_control_lost) var/remaining_time = timeleft(door_control_cooldown) / 10 - if(remaining_time > 60) - to_chat(user, SPAN_WARNING("The shuttle is not responding, try again in [remaining_time] seconds.")) + to_chat(user, SPAN_WARNING("The shuttle is not responding due to an unauthorized access attempt. In large text it says the lockout will be automatically removed in [remaining_time] seconds.")) + if(!skillcheck(user, SKILL_PILOT, SKILL_PILOT_EXPERT)) return - to_chat(user, SPAN_NOTICE("You start to remove the Queens override.")) - if(!do_after(user, 3 MINUTES, INTERRUPT_ALL, BUSY_ICON_HOSTILE)) - to_chat(user, SPAN_WARNING("You fail to remove the Queens override")) + if(user.action_busy || override_being_removed) return + to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) + override_being_removed = TRUE + while(remaining_time > 20) + if(!do_after(user, 20 SECONDS, INTERRUPT_ALL|INTERRUPT_CHANGED_LYING, BUSY_ICON_HOSTILE, numticks = 20)) + to_chat(user, SPAN_WARNING("You fail to remove the lockout!")) + override_being_removed = FALSE + return + if(!dropship_control_lost) + to_chat(user, SPAN_NOTICE("The lockout is already removed.")) + break + remaining_time = timeleft(door_control_cooldown) / 10 - 20 + if(remaining_time > 0) + to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time] seconds left.")) + door_control_cooldown = addtimer(CALLBACK(src, PROC_REF(remove_door_lock)), remaining_time SECONDS, TIMER_STOPPABLE|TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_NO_HASH_WAIT) + override_being_removed = FALSE + if(dropship_control_lost) + remove_door_lock() + to_chat(user, SPAN_NOTICE("You succesfully removed the lockout!")) playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) if(!shuttle.is_hijacked) @@ -216,7 +233,7 @@ if(!dropship_control_lost) dropship.control_doors("unlock", "all", TRUE) dropship_control_lost = TRUE - door_control_cooldown = addtimer(CALLBACK(src, PROC_REF(remove_door_lock)), SHUTTLE_LOCK_COOLDOWN, TIMER_STOPPABLE) + door_control_cooldown = addtimer(CALLBACK(src, PROC_REF(remove_door_lock)), SHUTTLE_LOCK_COOLDOWN, TIMER_STOPPABLE|TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_NO_HASH_WAIT) if(GLOB.almayer_orbital_cannon) GLOB.almayer_orbital_cannon.is_disabled = TRUE addtimer(CALLBACK(GLOB.almayer_orbital_cannon, TYPE_PROC_REF(/obj/structure/orbital_cannon, enable)), 10 MINUTES, TIMER_UNIQUE) @@ -299,6 +316,7 @@ playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) dropship_control_lost = FALSE if(door_control_cooldown) + deltimer(door_control_cooldown) door_control_cooldown = null /obj/structure/machinery/computer/shuttle/dropship/flight/ui_data(mob/user)