Files
Paradise/code/modules/nano/interaction/base.dm
Tigercat2000 221476ef3b Refactor stack recipes
- Styling fixes
 - Added post_build() to stack recipes, for any recipes that need to do
   something special
   - Called with two arguments, the stack that it originated from, and the
     new object.
 - Moved stack recipes to their own file

Currently, only two things use post_build
 - Cablecuffs use it to color the cuffs the same as the wire they
   originated from
 - Metal rods use it to call update_icon, in order to display the correct
   sprite for whatever amount of rods you created.
2016-07-31 07:20:26 -07:00

40 lines
1.1 KiB
Plaintext

/datum/proc/nano_host()
return src
/datum/proc/CanUseTopic(var/mob/user, var/datum/topic_state/state)
var/src_object = nano_host()
return state.can_use_topic(src_object, user)
/datum/topic_state/proc/href_list(var/mob/user)
return list()
/datum/topic_state/proc/can_use_topic(var/src_object, var/mob/user)
return STATUS_CLOSE
/mob/proc/shared_nano_interaction()
if(stat || !client)
return STATUS_CLOSE // no updates, close the interface
else if(restrained() || lying || stunned || weakened)
return STATUS_UPDATE // update only (orange visibility)
return STATUS_INTERACTIVE
/mob/dead/observer/shared_nano_interaction()
if(check_rights(R_ADMIN, 0, src))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates
/mob/living/silicon/ai/shared_nano_interaction()
if(lacks_power())
return STATUS_CLOSE
if(check_unable(1, 0))
return STATUS_CLOSE
return ..()
/mob/living/silicon/robot/shared_nano_interaction()
. = STATUS_INTERACTIVE
if(!cell || cell.charge <= 0)
return STATUS_CLOSE
if(lockcharge)
. = STATUS_DISABLED
return min(., ..())