Merge pull request #8164 from PsiOmegaDelta/NanoAir

Air Alarm and Atmospheric Controller NanoUI
This commit is contained in:
Chinsky
2015-02-21 07:51:01 +03:00
18 changed files with 681 additions and 487 deletions
+17 -5
View File
@@ -16,15 +16,27 @@
var/damtype = "brute"
var/force = 0
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
return 1
if(usr.can_interact_with_interface(nano_host(), checkrange) != STATUS_INTERACTIVE)
return 1
add_fingerprint(usr)
return 0
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
var/obj/host = nano_host()
if(host.CanUseTopic(usr, href_list, custom_state) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return 0
CouldNotUseTopic(usr)
return 1
/obj/proc/CouldUseTopic(var/mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
// Nada
/obj/item/proc/is_used_on(obj/O, mob/user)