Paradise Station 13 - Modules - TypesVar Details - Proc Details

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.

Vars

proximity_checkersA list of currently created /obj/effect/abstract/proximity_checkers in use with this component.

Procs

HandleMoveCalled when the parent receives the COMSIG_MOVABLE_MOVED signal, which occurs when it Move()s
create_prox_checkersCalled in Initialize(). Generates a set of /obj/effect/abstract/proximity_checker objects around the parent, and registers signals to them.
recenter_prox_checkersRe-centers all of the parent's proximity_checkers around its current location.

Var Details

proximity_checkers

A list of currently created /obj/effect/abstract/proximity_checkers in use with this component.

Proc Details

HandleMove

Called when the parent receives the COMSIG_MOVABLE_MOVED signal, which occurs when it Move()s

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 proximity_checker objects.

Arguments:

create_prox_checkers

Called in Initialize(). Generates a set of /obj/effect/abstract/proximity_checker objects around the parent, and registers signals to them.

recenter_prox_checkers

Re-centers all of the parent's proximity_checkers around its current location.