mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Added a JMP button to logs when someone adds something to a transfer valve.
This commit is contained in:
@@ -51,7 +51,7 @@
|
|||||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
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."
|
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.")
|
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||||
attacher = user
|
attacher = user
|
||||||
nanomanager.update_uis(src) // update all UIs attached to src
|
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)
|
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
|
||||||
ui_interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
/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
|
// this is the data which will be sent to the ui
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
data["valveOpen"] = valve_open ? 1 : 0
|
data["valveOpen"] = valve_open ? 1 : 0
|
||||||
|
|
||||||
// update the ui if it exists, returns null if no ui is passed/found
|
// 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)
|
if (!ui)
|
||||||
// the ui does not exist, so we'll create a new() one
|
// 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
|
// 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)
|
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
|
// 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
|
// open the new ui window
|
||||||
ui.open()
|
ui.open()
|
||||||
// auto update every Master Controller tick
|
// auto update every Master Controller tick
|
||||||
|
|||||||
Reference in New Issue
Block a user