Continued work in progress on a major revision of the NanoUI templating system.

Conflicts:
	code/ATMOSPHERICS/components/omni_devices/filter.dm
	code/ATMOSPHERICS/components/omni_devices/mixer.dm
	code/game/dna/dna_modifier.dm
	code/game/machinery/cryo.dm
	code/game/machinery/kitchen/smartfridge.dm
	code/modules/nano/nanoexternal.dm
	code/modules/nano/nanomanager.dm
	code/modules/nano/nanoui.dm
	code/modules/power/apc.dm
	code/modules/power/smes.dm
	code/modules/reagents/Chemistry-Machinery.dm
	nano/css/shared.css
	nano/js/nano_update.js
	nano/templates/escape_pod_console.tmpl
This commit is contained in:
Mark Aherne
2014-07-15 07:22:15 -04:00
committed by ZomgPonies
parent 4b4f85c22e
commit 9b45dbabfb
73 changed files with 2231 additions and 1268 deletions
+4 -6
View File
@@ -108,10 +108,8 @@
*
* @return nothing
*/
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
if(stat & (BROKEN|NOPOWER)) return
if(user.stat || user.restrained()) return
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null, var/force_open = 1)
if(broken_requirements.len)
user << "<span class='warning'>[src] is broken. [broken_requirements[broken_requirements[1]]]</span>"
return
@@ -120,8 +118,8 @@
// this is the data which will be sent to the ui
var/data[0]
data["amount"] = amount
data["energy"] = energy
data["maxEnergy"] = max_energy
data["energy"] = round(energy)
data["maxEnergy"] = round(max_energy)
data["isBeakerLoaded"] = beaker ? 1 : 0
var beakerContents[0]
@@ -147,7 +145,7 @@
data["chemicals"] = chemicals
// 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, 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