mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-17 12:52:34 +00:00
34 lines
1.3 KiB
Plaintext
34 lines
1.3 KiB
Plaintext
/datum/admin_secret_item/admin_secret/move_shuttle
|
|
name = "Move a Shuttle"
|
|
|
|
/datum/admin_secret_item/admin_secret/move_shuttle/can_execute(var/mob/user)
|
|
if(!SSshuttle)
|
|
return 0
|
|
return ..()
|
|
|
|
/datum/admin_secret_item/admin_secret/move_shuttle/execute(var/mob/user)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
var/confirm = alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
|
|
if(confirm == "Cancel")
|
|
return
|
|
|
|
var/shuttle_tag = input(user, "Which shuttle do you want to move?") as null|anything in SSshuttle.shuttles
|
|
if(!shuttle_tag)
|
|
return
|
|
|
|
var/datum/shuttle/S = SSshuttle.shuttles[shuttle_tag]
|
|
|
|
var/list/destinations = list()
|
|
for(var/k in SSshuttle.registered_shuttle_landmarks)
|
|
var/obj/effect/shuttle_landmark/WP = SSshuttle.registered_shuttle_landmarks[k]
|
|
if(istype(WP))
|
|
destinations += WP
|
|
|
|
var/obj/effect/shuttle_landmark/destination = input(user, "Select the destination.") as null|anything in destinations
|
|
if(!destination) return
|
|
|
|
S.attempt_move(destination)
|
|
log_and_message_admins("moved the [shuttle_tag] shuttle to [destination] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[destination.x];Y=[destination.y];Z=[destination.z]'>JMP</a>)", user)
|