Merge pull request #14342 from neersighted/tgui_followup

More tgui fixes and tweaks
This commit is contained in:
tkdrg
2016-01-04 18:39:52 -03:00
39 changed files with 242 additions and 180 deletions
@@ -88,7 +88,7 @@
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open = force_open)
if (!ui)
ui = new(user, src, ui_key, "chem_dispenser", name, 550, 700)
ui = new(user, src, ui_key, "chem_dispenser", name, 550, 550)
ui.open()
/obj/machinery/chem_dispenser/get_ui_data()
@@ -129,11 +129,9 @@
switch(action)
if("amount")
amount = round(text2num(params["amount"]), 5) // round to nearest 5
if (amount < 0) // Since the user can actually type the commands himself, some sanity checking
amount = 0
if (amount > 100)
amount = 100
var/amount = text2num(params["amount"])
if(amount in beaker.possible_transfer_amounts)
src.amount = amount
if("dispense")
if(beaker && dispensable_reagents.Find(params["reagent"]))
var/datum/reagents/R = beaker.reagents