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

Adds a popup when attempting to do a flyby from the ground #4709

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions code/modules/shuttle/computers/dropship_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,17 @@
if(!skillcheck(user, SKILL_PILOT, SKILL_PILOT_EXPERT))
to_chat(user, SPAN_WARNING("You don't have the skill to perform a flyby."))
return FALSE
var/is_groundside = is_ground_level(shuttle.z)
if(is_groundside)
if(tgui_alert(user, "This will result in the dropship landing in the same place again, are you SURE this is what you want to do?", "Flyby Confirmation", list("Yes, I want to do a flyby", "No, cancel"), 10 SECONDS) != "Yes, I want to do a flyby")
return TRUE
if(disabled || shuttle.is_hijacked)
return
if(comp.dropship_control_lost)
to_chat(user, SPAN_WARNING("The dropship isn't responding to controls."))
return
if(ui.status != UI_INTERACTIVE)
return
to_chat(user, SPAN_NOTICE("You begin the launch sequence for a flyby."))
log_ares_flight(user.name, "Launched Dropship [shuttle.name] on a flyby.")
var/log = "[key_name(user)] launched the dropship [src.shuttleId] on flyby."
Expand Down