Files
CHOMPStation2/code/modules/nano/interaction/contained.dm
PsiOmega 67708c6d3b Fixes #8880.
Case of incorrectly sent parameter.
2015-04-18 08:59:49 +02:00

19 lines
505 B
Plaintext

/*
This state checks if user is somewhere within src_object, as well as the default NanoUI interaction.
*/
/var/global/datum/topic_state/contained_state/contained_state = new()
/datum/topic_state/contained_state/can_use_topic(var/atom/src_object, var/mob/user)
if(!src_object.contains(user))
return STATUS_CLOSE
return user.shared_nano_interaction()
/atom/proc/contains(var/atom/location)
if(!location)
return 0
if(location == src)
return 1
return contains(location.loc)