Added a JMP button to logs when someone adds something to a transfer valve.

This commit is contained in:
Whitellama
2014-08-17 16:06:07 -07:00
parent 09907858f3
commit 7539a6a5bb

View File

@@ -51,7 +51,7 @@
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
bombers += "[key_name(user)] attached a [item] to a transfer valve."
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.loc.x];Y=[user.loc.y];Z=[user.loc.z]'>JMP</a>)")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = user
nanomanager.update_uis(src) // update all UIs attached to src
@@ -66,7 +66,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
// this is the data which will be sent to the ui
@@ -77,13 +77,13 @@
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick