Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lifeboat can now be unhacked by pilot #6661

Merged
merged 28 commits into from
Jul 29, 2024
Merged
Changes from 20 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion code/modules/shuttle/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,44 @@
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
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
///How long it takes to unlock the console
var/remaining_time = 180 SECONDS

/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)
to_chat(user, SPAN_WARNING("[src] flickers with error messages."))
if(skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED))
if(user.action_busy)
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
return
else if(!override_being_removed)
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
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."))
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
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."))
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
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
else
to_chat(user, SPAN_WARNING("[src] displays an error message that an override removal is already in progress."))
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
return
else
to_chat(user, SPAN_WARNING("[src] displays an error message and asks you to contact your pilot to resolve the problem."))
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
else if(lifeboat.status == LIFEBOAT_INACTIVE)
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Awaiting evacuation order\"."))
else if(lifeboat.status == LIFEBOAT_ACTIVE)
Expand Down Expand Up @@ -451,6 +483,8 @@
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
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
remaining_time = initial(remaining_time)
return XENO_NO_DELAY_ACTION
else
return ..()
Loading