Proximity monitor component
Attaching this component to an atom means that the atom will be able to detect mobs/objs moving within a 1 tile of it.
The component creates several
obj/effect/abstract/proximity_checker objects, which follow the parent atom around, always making sure it's at the center.
When something crosses one of these
proximiy_checkers, the parent has the
HasProximity() proc called on it, with the crossing mob/obj as the argument.
|proximity_checkers||A list of currently created |
|HandleMove||Called when the |
|create_prox_checkers||Called in Initialize(). Generates a set of |
|recenter_prox_checkers||Re-centers all of the parent's |
A list of currently created
/obj/effect/abstract/proximity_checkers in use with this component.
Called when the
parent receives the
COMSIG_MOVABLE_MOVED signal, which occurs when it
Code is only ran when there is no
Dir, which occurs when the parent is teleported, gets placed into a storage item, dropped, or picked up.
Normal movement, for example moving 1 tile to the west, is handled by the
- source - this will be the
- OldLoc - the location the parent just moved from
- Dir - the direction the parent just moved in
- forced - if we were forced to move
Called in Initialize(). Generates a set of
/obj/effect/abstract/proximity_checker objects around the parent, and registers signals to them.
Re-centers all of the parent's
proximity_checkers around its current location.