Skip to content

Commit

Permalink
More lifeboat launch options (#4976)
Browse files Browse the repository at this point in the history
# About the pull request

The default option when launching lifeboats will now have ARES make an
announcement, followed by a 10 second delay before doors close. The
current functionality where it instantly launches is also preserved as
the Emergency Launch option.

# Explain why it's good for the game

It's sad that currently someone can't make an announcement that they are
about to launch a lifeboat if they don't have the command tablet. This
gives them the option.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

I did test it, triggered hijack and launched lifeboat using the new
option. It worked on local server.

</details>


# Changelog
:cl: zzzmike, drathek, ihatethisengine2
add: Lifeboat launch now has an ARES announcement followed by a 10
second delay before doors close. The current launch functionality is
preserved as Emergency Launch.
/:cl:

---------

Co-authored-by: BeagleGaming1 <[email protected]>
  • Loading branch information
zzzmike and BeagleGaming1 committed Dec 6, 2023
1 parent f7d0d36 commit 16e010f
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions code/modules/shuttle/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@
icon_state = "terminal"
req_access = list()
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

/obj/structure/machinery/computer/shuttle/lifeboat/attack_hand(mob/user)
. = ..()
Expand All @@ -293,23 +295,40 @@
switch(lifeboat.mode)
if(SHUTTLE_IDLE)
if(!istype(user, /mob/living/carbon/human))
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting confirmation of the evacuation order\"."))
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Unauthorized access. Please inform your supervisor\"."))
return

var/mob/living/carbon/human/human_user = user
if(!(ACCESS_MARINE_COMMAND in human_user.wear_id?.access))
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting confirmation of the evacuation order\"."))
if(!(ACCESS_MARINE_SENIOR in human_user.wear_id?.access) && !(ACCESS_MARINE_DROPSHIP in human_user.wear_id?.access))
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Unauthorized access. Please inform your supervisor\"."))
return

if(SShijack.current_progress < SShijack.early_launch_required_progress)
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Unable to launch, fuel insufficient\"."))
return

if(tgui_alert(user, "Early launch the lifeboat?", "Confirm", list("Yes", "No"), 10 SECONDS) == "Yes")
to_chat(user, SPAN_NOTICE("[src]'s screen blinks and says \"Early launch accepted\"."))
lifeboat.evac_launch()
if(launch_initiated)
to_chat(user, SPAN_NOTICE("[src]'s screen blinks and says \"Launch sequence already initiated\"."))
return

var/response = tgui_alert(user, "Launch the lifeboat?", "Confirm", list("Yes", "No", "Emergency Launch"), 10 SECONDS)
if(launch_initiated)
to_chat(user, SPAN_NOTICE("[src]'s screen blinks and says \"Launch sequence already initiated\"."))
return
switch(response)
if ("Yes")
launch_initiated = TRUE
to_chat(user, "[src]'s screen blinks and says \"Launch command accepted\".")
shipwide_ai_announcement("Launch command received. [lifeboat.id == MOBILE_SHUTTLE_LIFEBOAT_PORT ? "Port" : "Starboard"] Lifeboat doors will close in 10 seconds.")
addtimer(CALLBACK(lifeboat, TYPE_PROC_REF(/obj/docking_port/mobile/crashable/lifeboat, evac_launch)), 10 SECONDS)
return
if ("Emergency Launch")
launch_initiated = TRUE
to_chat(user, "[src]'s screen blinks and says \"Emergency Launch command accepted\".")
lifeboat.evac_launch()
shipwide_ai_announcement("Emergency Launch command received. Launching [lifeboat.id == MOBILE_SHUTTLE_LIFEBOAT_PORT ? "Port" : "Starboard"] Lifeboat.")
return

if(SHUTTLE_IGNITING)
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Engines firing\"."))
if(SHUTTLE_CALL)
Expand Down

0 comments on commit 16e010f

Please sign in to comment.