Files
Aurora.3/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm
Matt Atlas 2e5fdf970c Landmark Shuttles (#8512)
The lifeless live again. Or in this case, what never actually lived here.

Ports Baystation12/Baystation12#17460 probably for real this time. What this allows us to do is create shuttles on runtime and make shuttles easier by just making landmarks and a shuttle instead of areas and shuttles. Also allows runtime landmark creation via flares or whatever AND allows shuttles to use different landmarks at will.

I removed most of the overmap stuff, I think. It shouldn't be hard to slam it in whenever we need to.

Changes:

    "Shuttle code has been completely reworked."
    "Shuttles can now be modified to have more than one destination."
    "Shuttles now have a takeoff sound."
    "You can now throw mobs against walls to damage them. A lot."
    "You now need a neckgrab to throw mobs."
    "BEING UNBUCKLED DURING SHUTTLE LAUNCH IS DANGEROUS! Don't do it."
    "Adminghosts can now interact with all shuttles."
2020-04-05 21:15:31 +03:00

27 lines
906 B
Plaintext

/datum/admin_secret_item/admin_secret/launch_shuttle
name = "Launch a Shuttle"
/datum/admin_secret_item/admin_secret/launch_shuttle/can_execute(var/mob/user)
if(!SSshuttle) return 0
return ..()
/datum/admin_secret_item/admin_secret/launch_shuttle/execute(var/mob/user)
. = ..()
if(!.)
return
var/list/valid_shuttles = list()
for (var/shuttle_tag in SSshuttle.shuttles)
if (istype(SSshuttle.shuttles[shuttle_tag], /datum/shuttle/autodock/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input(user, "Which shuttle do you want to launch?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/autodock/ferry/S = SSshuttle.shuttles[shuttle_tag]
if (S.can_launch())
S.launch(user)
log_and_message_admins("launched the [shuttle_tag] shuttle", user)
else
alert(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")