mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Merge pull request #14342 from neersighted/tgui_followup
More tgui fixes and tweaks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user