Ports Nano UI to Subsystems

This commit is contained in:
Fox McCloud
2018-03-26 23:59:52 -04:00
parent c13ce9099f
commit 5701ea7c75
122 changed files with 398 additions and 375 deletions
+2 -2
View File
@@ -752,7 +752,7 @@
return
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new one
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, issilicon(user) ? 535 : 460)
@@ -940,7 +940,7 @@
update_icon()
update()
else if( href_list["close"] )
nanomanager.close_user_uis(usr, src)
SSnanoui.close_user_uis(usr, src)
return 0
else if(href_list["close2"])
+4 -4
View File
@@ -239,7 +239,7 @@
var/temp_loss = (temperature - cooling_temperature)/TEMPERATURE_DIVISOR
temp_loss = between(2, round(temp_loss, 1), TEMPERATURE_CHANGE_MAX)
temperature = max(temperature - temp_loss, cooling_temperature)
nanomanager.update_uis(src)
SSnanoui.update_uis(src)
if(overheating)
overheating--
@@ -280,7 +280,7 @@
to_chat(user, "<span class='notice'>You add [amount] sheet\s to the [src.name].</span>")
sheets += amount
addstack.use(amount)
nanomanager.update_uis(src)
SSnanoui.update_uis(src)
return
else if(!active)
if(istype(O, /obj/item/weapon/wrench))
@@ -325,7 +325,7 @@
if(IsBroken())
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560)
ui.open()
@@ -381,7 +381,7 @@
if(power_output < max_power_output || (emagged && power_output < round(max_power_output*2.5)))
power_output++
nanomanager.update_uis(src)
SSnanoui.update_uis(src)
/obj/machinery/power/port_gen/pacman/super
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
+1 -1
View File
@@ -365,7 +365,7 @@
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
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
+1 -1
View File
@@ -389,7 +389,7 @@
ui_interact(user)
/obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420)
ui.open()
@@ -260,7 +260,7 @@
// This is purely informational UI that may be accessed by AIs or robots
/obj/machinery/power/supermatter_shard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300)
ui.open()