Make NanoUI resistant to Topic spoofs

Move Topic() into a NanoUI-specific ui_act proc
Update to @YotaXP's latest JSON code.
Return focus to the mapwindow if a key is pressed in a NanoUI.
This commit is contained in:
Bjorn Neergaard
2015-12-15 22:37:52 -06:00
parent 070a081db8
commit da4842dddf
29 changed files with 354 additions and 168 deletions
@@ -157,13 +157,13 @@
data["maskConnected"] = 1
return data
/obj/item/weapon/tank/Topic(href, href_list)
/obj/item/weapon/tank/ui_act(action, params)
if (..())
return
switch(href_list["nano"])
switch(action)
if("pressure")
switch(href_list["set"])
switch(params["set"])
if("custom")
var/custom = input(usr, "What rate do you set the regulator to? The dial reads from 0 to [TANK_MAX_RELEASE_PRESSURE].") as null|num
if(isnum(custom))