/obj/machinery/computer/rust_gyrotron_controller
name = "Gyrotron Remote Controller"
icon = 'icons/rust.dmi'
icon_state = "engine"
var/updating = 1
New()
..()
Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=gyrotron_controller")
usr.machine = null
return
if( href_list["target"] )
var/obj/machinery/rust/gyrotron/gyro = locate(href_list["target"])
gyro.Topic(href, href_list)
return
process()
..()
if(updating)
src.updateDialog()
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=gyrotron_controller")
return
var/t = "Gyrotron Remote Control Console
"
t += "
| Injector Status | " t += "Injection interval (sec) | " t += "Assembly consumption per injection | " t += "Fuel Assembly Port | " t += "Assembly depletion percentage | " t += "
| Fuel Injection Stage: [stage] [active_stage == stage ? " (Currently active)" : "Activate"] | ||||
| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | " t += "[Injector.rate/10] Modify | " t += "[Injector.fuel_usage*100]% Modify | " t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | " t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""] | " t += "