From 9b52cc7fd320d6910dc64087938ce6b760a3ea17 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:34:59 -0700 Subject: [PATCH 01/24] Update computer.dm --- code/modules/shuttle/computer.dm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 00dcd987f089..8f80454e556b 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -371,7 +371,17 @@ . = ..() var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = SSshuttle.getShuttle(shuttleId) if(lifeboat.status == LIFEBOAT_LOCKED) - to_chat(user, SPAN_WARNING("[src] flickers with error messages.")) + if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) + user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), + SPAN_NOTICE("You try to take back the control over the lifeboat. It will take around 3 minutes.")) + if(do_after(user, 3 MINUTES, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) + lifeboat.status = LIFEBOAT_ACTIVE + lifeboat.available = TRUE + user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), + SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) + return + else + to_chat(user, SPAN_WARNING("[src] flickers with error messages.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) @@ -451,6 +461,7 @@ var/obj/docking_port/stationary/lifeboat_dock/lifeboat_dock = lifeboat.get_docked() lifeboat_dock.open_dock() xeno_message(SPAN_XENOANNOUNCE("We have wrested away control of one of the metal birds! They shall not escape!"), 3, xeno.hivenumber) + launch_initiated = FALSE return XENO_NO_DELAY_ACTION else return ..() From d7a097da351f8f295aed819fbd4e0b5c66889145 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:40:16 -0700 Subject: [PATCH 02/24] Update computer.dm --- code/modules/shuttle/computer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 8f80454e556b..9fc97a349190 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -381,7 +381,7 @@ SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) return else - to_chat(user, SPAN_WARNING("[src] flickers with error messages.")) + to_chat(user, SPAN_WARNING("[src] flickers with error messages and asks you to contact your pilot.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) From 34a8e04639b0388719bead5b5ef1c583606d4072 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:42:19 -0700 Subject: [PATCH 03/24] woops --- code/modules/shuttle/computer.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 9fc97a349190..ddfd38ca14c9 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -380,8 +380,7 @@ user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) return - else - to_chat(user, SPAN_WARNING("[src] flickers with error messages and asks you to contact your pilot.")) + else to_chat(user, SPAN_WARNING("[src] flickers with error messages and asks you to contact your pilot.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) From 3b8d40f8b8db81cc2fb2963a9eb727e191b935a2 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:45:03 -0700 Subject: [PATCH 04/24] woops --- code/modules/shuttle/computer.dm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index ddfd38ca14c9..636eb6edcf92 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -371,16 +371,16 @@ . = ..() var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = SSshuttle.getShuttle(shuttleId) if(lifeboat.status == LIFEBOAT_LOCKED) - if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) - user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), - SPAN_NOTICE("You try to take back the control over the lifeboat. It will take around 3 minutes.")) - if(do_after(user, 3 MINUTES, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) - lifeboat.status = LIFEBOAT_ACTIVE - lifeboat.available = TRUE - user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), - SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) - return - else to_chat(user, SPAN_WARNING("[src] flickers with error messages and asks you to contact your pilot.")) + if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) + user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), + SPAN_NOTICE("You try to take back the control over the lifeboat. It will take around 3 minutes.")) + if(do_after(user, 3 MINUTES, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) + lifeboat.status = LIFEBOAT_ACTIVE + lifeboat.available = TRUE + user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), + SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) + return + else to_chat(user, SPAN_WARNING("[src] flickers with error messages and asks you to contact your pilot.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) From be907a000f0e7520980094a5dbe99ab260a90d4a Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 07:27:32 -0700 Subject: [PATCH 05/24] make the countdown more friendly --- code/modules/shuttle/computer.dm | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 636eb6edcf92..5c858276e827 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -366,19 +366,36 @@ breakable = FALSE ///If true, the lifeboat is in the process of launching, and so the code will not allow another launch. var/launch_initiated = FALSE + var/override_being_removed = FALSE /obj/structure/machinery/computer/shuttle/lifeboat/attack_hand(mob/user) . = ..() var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = SSshuttle.getShuttle(shuttleId) if(lifeboat.status == LIFEBOAT_LOCKED) if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) - user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), - SPAN_NOTICE("You try to take back the control over the lifeboat. It will take around 3 minutes.")) - if(do_after(user, 3 MINUTES, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) - lifeboat.status = LIFEBOAT_ACTIVE - lifeboat.available = TRUE - user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), - SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) + if(user.action_busy || override_being_removed) + return + else to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) + override_being_removed = TRUE + var/unhack_time = 1800 + user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), + SPAN_NOTICE("You try to take back the control over the lifeboat. It will take around 3 minutes.")) + var/remaining_time = timeleft(unhack_time) / 10 + 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 + remaining_time = timeleft(unhack_time) / 10 - 20 + if(remaining_time > 0) + to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time] seconds left.")) + if(remaining_time <= 0) + to_chat(user, SPAN_NOTICE("You successfully removed the lockout!")) + playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) + lifeboat.status = LIFEBOAT_ACTIVE + lifeboat.available = TRUE + user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), + SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) return else to_chat(user, SPAN_WARNING("[src] flickers with error messages and asks you to contact your pilot.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) From 957c17945a0e7cafbb951a45540b2585003fd029 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 07:30:31 -0700 Subject: [PATCH 06/24] test --- code/modules/shuttle/computer.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 5c858276e827..3ce362a1f9d1 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -375,7 +375,8 @@ if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) if(user.action_busy || override_being_removed) return - else to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) + else if(!override_being_removed) + to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) override_being_removed = TRUE var/unhack_time = 1800 user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), From 26cc7202360d3e5976ec677e9ae2602be6848aec Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 07:47:04 -0700 Subject: [PATCH 07/24] code doc before beagle asks me --- code/modules/shuttle/computer.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 3ce362a1f9d1..5124fd3f168f 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -366,6 +366,7 @@ breakable = FALSE ///If true, the lifeboat is in the process of launching, and so the code will not allow another launch. var/launch_initiated = FALSE + ///If true, the lifeboat is in the process of having the xeno override removed by the pilot. var/override_being_removed = FALSE /obj/structure/machinery/computer/shuttle/lifeboat/attack_hand(mob/user) From a2be46fdcf5a3450881bfed40635c0afeb32f136 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 08:00:50 -0700 Subject: [PATCH 08/24] grammar, wording --- code/modules/shuttle/computer.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 5124fd3f168f..735d434f570e 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -381,7 +381,7 @@ override_being_removed = TRUE var/unhack_time = 1800 user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), - SPAN_NOTICE("You try to take back the control over the lifeboat. It will take around 3 minutes.")) + SPAN_NOTICE("You try to take back control over the lifeboat. It will take around 3 minutes.")) var/remaining_time = timeleft(unhack_time) / 10 while(remaining_time > 20) if(!do_after(user, 20 SECONDS, INTERRUPT_ALL|INTERRUPT_CHANGED_LYING, BUSY_ICON_HOSTILE, numticks = 20)) @@ -397,9 +397,9 @@ lifeboat.status = LIFEBOAT_ACTIVE lifeboat.available = TRUE user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), - SPAN_NOTICE("You have successfully taken back the control over the lifeboat.")) + SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) return - else to_chat(user, SPAN_WARNING("[src] flickers with error messages and asks you to contact your pilot.")) + else to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) From 6289b5628a2cfecb4f96eaab6a085d522fda7bec Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 08:21:03 -0700 Subject: [PATCH 09/24] Update computer.dm --- code/modules/shuttle/computer.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 735d434f570e..e376e444d862 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -374,7 +374,7 @@ var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = SSshuttle.getShuttle(shuttleId) if(lifeboat.status == LIFEBOAT_LOCKED) if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) - if(user.action_busy || override_being_removed) + if(user.action_busy) return else if(!override_being_removed) to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) @@ -398,6 +398,7 @@ lifeboat.available = TRUE user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) + else to_chat(user, SPAN_WARNING("[src] displays an error message that an override removal is already in progress.")) return else to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) From 3d48478e2ea35acf61498027ca4a1f83e9b003f6 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:26:09 -0700 Subject: [PATCH 10/24] Update computer.dm --- code/modules/shuttle/computer.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index e376e444d862..4481a3592b39 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -398,6 +398,7 @@ lifeboat.available = TRUE user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) + override_being_removed = FALSE else to_chat(user, SPAN_WARNING("[src] displays an error message that an override removal is already in progress.")) return else to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) From 15060da54c9d6b9abc10a7647dc72e756e9b63ec Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:44:48 -0700 Subject: [PATCH 11/24] Update code/modules/shuttle/computer.dm Co-authored-by: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 4481a3592b39..44b6a81557e0 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -388,7 +388,7 @@ to_chat(user, SPAN_WARNING("You fail to remove the lockout!")) override_being_removed = FALSE return - remaining_time = timeleft(unhack_time) / 10 - 20 + remaining_time = remaining_time - 20 SECONDS if(remaining_time > 0) to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time] seconds left.")) if(remaining_time <= 0) From 74cae246f853eca74dcd6588a1a3fa0bfe4ca3e9 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:45:12 -0700 Subject: [PATCH 12/24] Update code/modules/shuttle/computer.dm Co-authored-by: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 44b6a81557e0..19ff7fcae4c7 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -368,6 +368,8 @@ var/launch_initiated = FALSE ///If true, the lifeboat is in the process of having the xeno override removed by the pilot. var/override_being_removed = FALSE + ///How long it takes to unlock the console + var/remaining_time = 180 SECONDS /obj/structure/machinery/computer/shuttle/lifeboat/attack_hand(mob/user) . = ..() From a49534a3e468c0c88c7ae868ad8c70dab3e587f1 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:45:22 -0700 Subject: [PATCH 13/24] Update code/modules/shuttle/computer.dm Co-authored-by: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 19ff7fcae4c7..caad165d4d25 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -381,7 +381,6 @@ else if(!override_being_removed) to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) override_being_removed = TRUE - var/unhack_time = 1800 user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), SPAN_NOTICE("You try to take back control over the lifeboat. It will take around 3 minutes.")) var/remaining_time = timeleft(unhack_time) / 10 From 8be169247b1ac9eca22874763b42fbf5b56756d5 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:45:32 -0700 Subject: [PATCH 14/24] Update code/modules/shuttle/computer.dm Co-authored-by: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index caad165d4d25..da734207b1a3 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -383,7 +383,6 @@ override_being_removed = TRUE user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), SPAN_NOTICE("You try to take back control over the lifeboat. It will take around 3 minutes.")) - var/remaining_time = timeleft(unhack_time) / 10 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!")) From aa51739f905e3c26c85854912378bc90fcfe5307 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:45:51 -0700 Subject: [PATCH 15/24] Update code/modules/shuttle/computer.dm Co-authored-by: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index da734207b1a3..22a1984a00a8 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -382,7 +382,7 @@ to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) override_being_removed = TRUE user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), - SPAN_NOTICE("You try to take back control over the lifeboat. It will take around 3 minutes.")) + SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time] seconds.")) 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!")) From 255f8d1f5461ce13a3c27cf10fbba74d8abaff43 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:46:07 -0700 Subject: [PATCH 16/24] Update code/modules/shuttle/computer.dm Co-authored-by: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 22a1984a00a8..1ea24b3436fd 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -482,6 +482,7 @@ lifeboat_dock.open_dock() xeno_message(SPAN_XENOANNOUNCE("We have wrested away control of one of the metal birds! They shall not escape!"), 3, xeno.hivenumber) launch_initiated = FALSE + remaining_time = initial(remaining_time) return XENO_NO_DELAY_ACTION else return ..() From 0449b212c2beb1c95507ed7da88c7cccdebd7452 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:47:15 -0700 Subject: [PATCH 17/24] harry review :) Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 1ea24b3436fd..31882aa90c42 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -399,9 +399,11 @@ user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) override_being_removed = FALSE - else to_chat(user, SPAN_WARNING("[src] displays an error message that an override removal is already in progress.")) + else + to_chat(user, SPAN_WARNING("[src] displays an error message that an override removal is already in progress.")) return - else to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) + else + to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) From e73019e0edab6fe372e42600953d2012904d81a1 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Wed, 24 Jul 2024 04:44:33 -0700 Subject: [PATCH 18/24] drulikar review, thanks :) Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/shuttle/computer.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 31882aa90c42..54c2dc18e33f 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -376,7 +376,7 @@ var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = SSshuttle.getShuttle(shuttleId) if(lifeboat.status == LIFEBOAT_LOCKED) if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) - if(user.action_busy) + if(user.action_busy || override_being_removed) return else if(!override_being_removed) to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) @@ -399,8 +399,6 @@ user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) override_being_removed = FALSE - else - to_chat(user, SPAN_WARNING("[src] displays an error message that an override removal is already in progress.")) return else to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) From 9352bb240571b9928aa33e9aaf6ea405f60146ac Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Wed, 24 Jul 2024 04:54:43 -0700 Subject: [PATCH 19/24] else if removal --- code/modules/shuttle/computer.dm | 39 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 54c2dc18e33f..8e069d803073 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -378,27 +378,26 @@ if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) if(user.action_busy || override_being_removed) return - else if(!override_being_removed) - to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) - override_being_removed = TRUE - user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), - SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time] seconds.")) - 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 - remaining_time = remaining_time - 20 SECONDS - if(remaining_time > 0) - to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time] seconds left.")) - if(remaining_time <= 0) - to_chat(user, SPAN_NOTICE("You successfully removed the lockout!")) - playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) - lifeboat.status = LIFEBOAT_ACTIVE - lifeboat.available = TRUE - user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), - SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) + to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) + override_being_removed = TRUE + user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), + SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time] seconds.")) + 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 + remaining_time = remaining_time - 20 SECONDS + if(remaining_time > 0) + to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time / 10] seconds left.")) + if(remaining_time <= 0) + to_chat(user, SPAN_NOTICE("You successfully removed the lockout!")) + playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) + lifeboat.status = LIFEBOAT_ACTIVE + lifeboat.available = TRUE + user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), + SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) + override_being_removed = FALSE return else to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) From 88fb7d109c52318b45d424681c99a026e3633992 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Wed, 24 Jul 2024 04:57:43 -0700 Subject: [PATCH 20/24] deciseconds --- code/modules/shuttle/computer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 8e069d803073..c84499e740ce 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -381,7 +381,7 @@ to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) override_being_removed = TRUE user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), - SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time] seconds.")) + SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time / 10] seconds.")) 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!")) From f8dc475d94b83d2fc64dbf18f2c113b5dead14cf Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Wed, 24 Jul 2024 05:03:21 -0700 Subject: [PATCH 21/24] Update computer.dm --- code/modules/shuttle/computer.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index c84499e740ce..4d9f4b2e0fe8 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -375,7 +375,10 @@ . = ..() var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = SSshuttle.getShuttle(shuttleId) if(lifeboat.status == LIFEBOAT_LOCKED) - if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) + if(!skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) + to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) + return + else if(user.action_busy || override_being_removed) return to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) @@ -399,8 +402,6 @@ SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) override_being_removed = FALSE return - else - to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) From 39b27a0c4375dd819ebc80236caa70d1fa477e4f Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Wed, 24 Jul 2024 05:18:01 -0700 Subject: [PATCH 22/24] try else removal --- code/modules/shuttle/computer.dm | 45 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 4d9f4b2e0fe8..7608def18df1 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -378,30 +378,29 @@ if(!skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem.")) return - else - if(user.action_busy || override_being_removed) - return - to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) - override_being_removed = TRUE - user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), - SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time / 10] seconds.")) - 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 - remaining_time = remaining_time - 20 SECONDS - if(remaining_time > 0) - to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time / 10] seconds left.")) - if(remaining_time <= 0) - to_chat(user, SPAN_NOTICE("You successfully removed the lockout!")) - playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) - lifeboat.status = LIFEBOAT_ACTIVE - lifeboat.available = TRUE - user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), - SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) - override_being_removed = FALSE + if(user.action_busy || override_being_removed) return + to_chat(user, SPAN_NOTICE("You start to remove the lockout.")) + override_being_removed = TRUE + user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), + SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time / 10] seconds.")) + 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 + remaining_time = remaining_time - 20 SECONDS + if(remaining_time > 0) + to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time / 10] seconds left.")) + if(remaining_time <= 0) + to_chat(user, SPAN_NOTICE("You successfully removed the lockout!")) + playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) + lifeboat.status = LIFEBOAT_ACTIVE + lifeboat.available = TRUE + user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), + SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) + override_being_removed = FALSE + return else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\".")) else if(lifeboat.status == LIFEBOAT_ACTIVE) From eb6d47bf5ac002a4a0357fa112b73b0799cba777 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 29 Jul 2024 08:36:27 -0700 Subject: [PATCH 23/24] Update computer.dm --- code/modules/shuttle/computer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 0cbe3f7f476e..a3ed3baf9e9f 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -389,7 +389,7 @@ override_being_removed = TRUE user.visible_message(SPAN_NOTICE("[user] starts to type on [src]."), SPAN_NOTICE("You try to take back control over the lifeboat. It will take around [remaining_time / 10] seconds.")) - while(remaining_time > 20) + while(remaining_time > 20 SECONDS) 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 From 6fa07b9413d5b8a42834ef80ab857c69a90b97c4 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 29 Jul 2024 08:38:19 -0700 Subject: [PATCH 24/24] Update computer.dm --- code/modules/shuttle/computer.dm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index a3ed3baf9e9f..5f17c9a73285 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -397,14 +397,13 @@ remaining_time = remaining_time - 20 SECONDS if(remaining_time > 0) to_chat(user, SPAN_NOTICE("You partially bypass the lockout, only [remaining_time / 10] seconds left.")) - if(remaining_time <= 0) - to_chat(user, SPAN_NOTICE("You successfully removed the lockout!")) - playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) - lifeboat.status = LIFEBOAT_ACTIVE - lifeboat.available = TRUE - user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), - SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) - override_being_removed = FALSE + to_chat(user, SPAN_NOTICE("You successfully removed the lockout!")) + playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) + lifeboat.status = LIFEBOAT_ACTIVE + lifeboat.available = TRUE + user.visible_message(SPAN_NOTICE("[src] blinks with blue lights."), + SPAN_NOTICE("You have successfully taken back control over the lifeboat.")) + override_being_removed = FALSE return else if(lifeboat.status == LIFEBOAT_INACTIVE) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\"."))