Updates secrets panel to use the new shuttle...

...datum correctly.

Conflicts:
	code/modules/admin/admin.dm
This commit is contained in:
mwerezak
2014-06-26 14:42:35 -04:00
committed by ZomgPonies
parent 05c5f81b97
commit f5f4682b8e
2 changed files with 104 additions and 11 deletions
+5 -2
View File
@@ -29,7 +29,6 @@
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>
<A href='?src=\ref[src];secretsadmin=DNA'>List DNA (Blood)</A><BR>
<A href='?src=\ref[src];secretsadmin=fingerprints'>List Fingerprints</A><BR><BR>
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
@@ -65,7 +64,6 @@
dat += {"
<B>'Random' Events</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=gravity'>Toggle station artificial gravity</A><BR>
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors (aka lagocolyptic shower)</A><BR>
<A href='?src=\ref[src];secretsfun=blackhole'>Spawn a vortex anomaly</A><BR>
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly</A><BR>
@@ -92,6 +90,11 @@
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
<BR>
<A href='?src=\ref[src];secretsfun=launchshuttle'>Launch a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=forcelaunchshuttle'>Force launch a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=jumpshuttle'>Jump a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
<BR>"}
+99 -9
View File
@@ -2046,21 +2046,111 @@
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
if("launchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_launch())
S.launch(usr)
message_admins("\blue [key_name_admin(usr)] launched the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle")
else
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
if("forcelaunchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShFL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_force())
S.force_launch(usr)
message_admins("\blue [key_name_admin(usr)] has forced the [shuttle_tag] shuttle launch", 1)
log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch")
else
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
if("jumpshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShJ")
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No")
if (long_jump == "Yes")
var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!transition_area) return
var/move_duration = input("How many seconds will this jump take?") as num
S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
else
S.short_jump(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
if("moveshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShA")
feedback_add_details("admin_secrets_fun_used","ShM")
var/confirm = alert("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("Which shuttle do you want to call?") as null|anything in shuttle_controller.shuttles
if(shuttle_tag)
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
if(istype(S) && S.moving_status == 0)
S.move()
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
S.move(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
if("togglebombcap")
feedback_inc("admin_secrets_fun_used",1)