Backports NanoUI fixes from dev.

Fixes #11579.
This commit is contained in:
PsiOmegaDelta
2015-12-03 21:50:24 +01:00
parent 1ffb2098bc
commit cc72f82371
3 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
name = "Crew monitor" name = "Crew monitor"
/obj/nano_module/crew_monitor/Topic(href, href_list) /obj/nano_module/crew_monitor/Topic(href, href_list)
if(..()) return if(..()) return 1
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if (!T || !(T.z in config.player_levels)) if (!T || !(T.z in config.player_levels))
usr << "<span class='warning'>Unable to establish a connection<span>: You're too far away from the station!" usr << "<span class='warning'>Unable to establish a connection<span>: You're too far away from the station!"

View File

@@ -47,7 +47,7 @@
// Allows us to process UI clicks, which are relayed in form of hrefs. // Allows us to process UI clicks, which are relayed in form of hrefs.
/obj/nano_module/power_monitor/Topic(href, href_list) /obj/nano_module/power_monitor/Topic(href, href_list)
if(..()) if(..())
return return 1
if( href_list["clear"] ) if( href_list["clear"] )
active_sensor = null active_sensor = null
if( href_list["refresh"] ) if( href_list["refresh"] )

View File

@@ -140,6 +140,7 @@ nanoui is used to open and update nano browser uis
* @return nothing * @return nothing
*/ */
/datum/nanoui/proc/update_status(var/push_update = 0) /datum/nanoui/proc/update_status(var/push_update = 0)
src_object = src_object.nano_host()
var/new_status = src_object.CanUseTopic(user, state) var/new_status = src_object.CanUseTopic(user, state)
if(master_ui) if(master_ui)
new_status = min(new_status, master_ui.status) new_status = min(new_status, master_ui.status)