Merge pull request #8993 from PsiOmegaDelta/PortableNanoUI

Portable atmospheric pump/scrubbers now use NanoUI.
This commit is contained in:
Chinsky
2015-04-29 09:43:47 +03:00
9 changed files with 317 additions and 106 deletions
+4 -4
View File
@@ -90,15 +90,15 @@
/mob/living/default_can_use_topic(var/src_object)
. = shared_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE)
if(. != STATUS_CLOSE)
if(loc)
. = loc.contents_nano_distance(src_object, src)
. = min(., loc.contents_nano_distance(src_object, src))
if(STATUS_INTERACTIVE)
return STATUS_UPDATE
/mob/living/carbon/human/default_can_use_topic(var/src_object)
. = shared_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE)
. = shared_living_nano_distance(src_object)
if(. != STATUS_CLOSE)
. = min(., shared_living_nano_distance(src_object))
if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction.
return STATUS_INTERACTIVE
+18
View File
@@ -0,0 +1,18 @@
/var/global/datum/topic_state/physical/physical_state = new()
/datum/topic_state/physical/can_use_topic(var/src_object, var/mob/user)
. = user.shared_nano_interaction(src_object)
if(. > STATUS_CLOSE)
return min(., user.check_physical_distance(src_object))
/mob/proc/check_physical_distance(var/src_object)
return STATUS_CLOSE
/mob/dead/observer/check_physical_distance(var/src_object)
return default_can_use_topic(src_object)
/mob/living/check_physical_distance(var/src_object)
return shared_living_nano_distance(src_object)
/mob/living/silicon/check_physical_distance(var/src_object)
return max(STATUS_UPDATE, shared_living_nano_distance(src_object))