From 520a2cd401bed4bd9b75af9641c463ad4a6c2be4 Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Sun, 5 Jan 2014 19:29:50 -0800 Subject: [PATCH] NanoUI changes from Faerdan Conflicts: code/game/dna/dna_modifier.dm code/game/machinery/cryo.dm code/modules/nano/nanomanager.dm code/modules/nano/nanoui.dm code/modules/reagents/Chemistry-Machinery.dm --- code/game/machinery/cryo.dm | 6 +++--- code/modules/nano/nanomanager.dm | 6 +++--- code/modules/nano/nanoui.dm | 4 ++++ code/modules/reagents/Chemistry-Machinery.dm | 3 +-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 2e03725c2b1..76cfa381712 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -121,13 +121,13 @@ data["beakerVolume"] += R.volume // 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, "cryo.tmpl", "Cryo Cell Control System", 520, 410) // 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 @@ -260,7 +260,7 @@ return /obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob) if (!istype(M)) - usr << "\red The cryo cell cannot handle such liveform!" + usr << "\red The cryo cell cannot handle such a lifeform!" return if (occupant) usr << "\red The cryo cell is already occupied!" diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index 1d9bfb5db24..545365b86ea 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -25,11 +25,11 @@ * @return /nanoui Returns the found ui, for null if none exists */ /datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data) - if (isnull(ui)) // no ui has been passed, so we'll search for one + if (!ui) // no ui has been passed, so we'll search for one { - ui = get_open_ui(user, src_object, ui_key) + ui = get_open_ui(user, src, ui_key) } - if (!isnull(ui)) + if (ui) // The UI is already open so push the data to it ui.push_data(data) return ui diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index f2347e35bc0..7fea6105dfb 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -302,7 +302,11 @@ nanoui is used to open and update nano browser uis
[title ? "
[title]
" : ""]
+<<<<<<< HEAD
Initiating...
+======= + +>>>>>>> b393ea6... NanoUI changes from Faerdan "} /** diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 47b056c7912..24ef7856d5c 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -149,10 +149,9 @@ // 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) 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, "chem_dispenser.tmpl", ui_title, 380, 650) + ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 370, 605) // when the ui is first opened this is the data it will use ui.set_initial_data(data) // open the new ui window