Scrubber NanoUI interface.

Ports https://github.com/d3athrow/vgstation13/pull/4142 with added Bay-flavor.
To operate once must be adjacent to the scrubber.
Silicons can view the status panel from any distance they are able to access the scrubber from.
This preserves the current behavior.
This commit is contained in:
PsiOmega
2015-04-26 17:34:56 +02:00
parent 8e0d0900d9
commit e2ce3d1e01
5 changed files with 145 additions and 54 deletions

View File

@@ -89,15 +89,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

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))