Re-implements world end events as datums.

This commit is contained in:
PsiOmegaDelta
2015-07-07 23:09:03 +02:00
committed by PsiOmega
parent 5703fdfe85
commit 457987046b
15 changed files with 83 additions and 42 deletions
@@ -0,0 +1,13 @@
/datum/admin_secret_item/admin_secret/admin_logs
name = "Admin Logs"
/datum/admin_secret_item/admin_secret/admin_logs/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat = "<B>Admin Log<HR></B>"
for(var/l in admin_log)
dat += "<li>[l]</li>"
if(!admin_log.len)
dat += "No-one has done anything this round!"
user << browse(dat, "window=admin_log")
@@ -9,28 +9,28 @@
. = ..()
if(!.)
return
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
var/shuttle_tag = input(user, "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
var/origin_area = input(user, "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
var/destination_area = input(user, "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")
var/long_jump = alert(user, "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
var/transition_area = input(user, "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
var/move_duration = input(user, "How many seconds will this jump take?") as num
S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("<span class='notice'>[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle</span>", 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")
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle</span>", 1)
log_admin("[key_name_admin(user)] 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("<span class='notice'>[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle</span>", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle</span>", 1)
log_admin("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
@@ -14,13 +14,13 @@
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
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/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_launch())
S.launch(usr)
S.launch(user)
log_and_message_admins("launched the [shuttle_tag] shuttle", user)
else
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
alert(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
@@ -14,13 +14,13 @@
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
var/shuttle_tag = input(user, "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)
S.force_launch(user)
log_and_message_admins("forced the [shuttle_tag] shuttle", user)
else
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
alert(user, "The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
@@ -16,4 +16,4 @@
else if(!H.dna)
dat += "<tr><td>[H]</td><td>H.dna = null</td></tr>"
dat += "</table>"
usr << browse(dat, "window=fingerprints;size=440x410")
user << browse(dat, "window=fingerprints;size=440x410")
@@ -9,20 +9,20 @@
. = ..()
if(!.)
return
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")
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("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
var/shuttle_tag = input(user, "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
var/origin_area = input(user, "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
var/destination_area = input(user, "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)
log_and_message_admins("[key_name_admin(usr)] moved the [shuttle_tag] shuttle", user)
log_and_message_admins("moved the [shuttle_tag] shuttle", user)