Adds a radio MMI upgrade module, printable in the mech fab

Can be uninstalled with a screwdriver
This commit is contained in:
Crazylemon64
2018-06-24 13:32:36 -07:00
parent 4fec0d6b0a
commit be4a1e426d
8 changed files with 200 additions and 71 deletions
+15 -1
View File
@@ -59,10 +59,14 @@
return STATUS_CLOSE
//Some atoms such as vehicles might have special rules for how mobs inside them interact with NanoUI.
//Some atoms such as vehicles might have special limitations for how mobs inside them interact with NanoUI.
/atom/proc/contents_nano_distance(var/src_object, var/mob/living/user)
return user.shared_living_nano_distance(src_object)
//Some atoms such as vehicles might have special benefits for how mobs inside them interact with NanoUI.
/atom/proc/contents_nano_interact(var/src_object, var/mob/living/user)
return STATUS_CLOSE // No help at all by default
/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object)
if(!(src_object in view(4, src))) // If the src object is not in visable, disable updates
return STATUS_CLOSE
@@ -84,6 +88,16 @@
if(STATUS_INTERACTIVE)
return STATUS_UPDATE
/mob/living/carbon/brain/default_can_use_topic(var/src_object)
. = shared_nano_interaction(src_object)
if(. <= STATUS_DISABLED)
return
// Maybe add a handler here to call an "interaction state" thing on the MMI,
// later
if(loc)
. = max(., loc.contents_nano_interact(src_object, src)) // This is an "augment" on interaction
. = min(., loc.contents_nano_distance(src_object, src)) // This is a "limit" on interaction
/mob/living/carbon/human/default_can_use_topic(var/src_object)
. = shared_nano_interaction(src_object)
if(. != STATUS_CLOSE)