-
-
Notifications
You must be signed in to change notification settings - Fork 120
Clicking Documentation
Want to figure out how interaction works?
-
var/interaction_flags (atom)
(default FLAG_INTERACTION_LIVING) flag that controls what can interact with the object, which is handled in an atom proc calledcan_caller_interact_with(var/mob/caller,var/enable_message = TRUE)
. Possible values:- FLAG_INTERACTION_NONE (Cannot interact.)
- FLAG_INTERACTION_LIVING (Living can interact. Without this flag means that living cannot interact.)
- FLAG_INTERACTION_DEAD (Dead people can interact. Without this flag means that dead people cannot interact with it.)
- FLAG_INTERACTION_NO_HORIZONTAL (Add this flag to prevent horizontal people from interacting.)
- FLAG_INTERACTION_NO_DISTANCE (Add this flag to disable distance checks. Good if you do your own distance checks.) Flags are bits that can be combined into one bit.
-
usr
should be avoided at all costs. Do not use this variable. -
caller
always a mob, it's the mob that called this proc. -
object
always another atom, the one that's being interacted on or with. -
location
the turf, stat panel, grid cell, etc. in which the object was clicked. -
params
other parameters including mouse/keyboard flags, icon offsets. This was already converted into a list from params2list so don't convert twice!
What this atom (src) should do when it clicks on another atom (object) by a mob (caller). Return TRUE
on success, FALSE
on failure.
What this atom (src) should do when it's clicked on by another atom (object) by a mob(caller). Return TRUE
on success, FALSE
on failure.
What this atom (src) should do when it's activated in hands by a mob (caller). Return TRUE
on success, FALSE
on failure.
Returns the object it SHOULD click on when the src is clicked on, such as the top inventory object in an inventory. Should be used inside defer_click_on_object
or click_on_object
.
Converts the client's params click into clickflags, which are altered by player preference. Returns one or more bitflags of CLICK_RIGHT
, CLICK_LEFT
, and CLICK_MIDDLE
.
Performs a check to see if the object can actually be clicked on by the caller. Args do not need to be passed as it is done automatically.