code/__HELPERS/view.dm
/proc/view_to_pixels | Takes a string or num view, and converts it to pixel width/height in a list(pixel_width, pixel_height) |
---|---|
DEFAULT_SIGHT_DISTANCE | Frustrated with bugs in can_see(), this instead uses viewers for a much more effective approach. |
CAN_I_SEE | Basic check to see if the src object can see the target object. |
CAN_THEY_SEE | Checks the visibility between two other objects. |
CAN_SEE_RANGED | Further checks distance between source and target. |
Define Details
CAN_I_SEE
Basic check to see if the src object can see the target object.
CAN_SEE_RANGED
Further checks distance between source and target.
CAN_THEY_SEE
Checks the visibility between two other objects.
DEFAULT_SIGHT_DISTANCE
Frustrated with bugs in can_see(), this instead uses viewers for a much more effective approach.
Things to note:
- Src/source must be a mob.
viewers()
returns mobs. - Adjacent objects are always considered visible. The default tile-distance between two atoms for one to consider the other as visible.