mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-26 05:26:24 +01:00
Merge pull request #8164 from PsiOmegaDelta/NanoAir
Air Alarm and Atmospheric Controller NanoUI
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user