connect_range ![code/datums/components/connect_range.dm 6](git.png)
This component behaves similar to connect_loc_behalf but for all turfs in range, hooking into a signal on each of them. Just like connect_loc_behalf, It can react to that signal on behalf of a separate listener. Good for components, though it carries some overhead. Can't be an element as that may lead to bugs.
Vars | |
connections | An assoc list of signal -> procpath to register to the loc this object is on. |
---|---|
range | The component will hook into signals only on turfs not farther from tracked than this. |
tracked | The atom the component is tracking. The component will delete itself if the tracked is deleted. Signals will also be updated whenever it moves (if it's a movable). |
turfs | The turfs currently connected to this component |
works_in_containers | Whether the component works when the movable isn't directly located on a turf. |
Var Details
connections ![code/datums/components/connect_range.dm 10](git.png)
An assoc list of signal -> procpath to register to the loc this object is on.
range ![code/datums/components/connect_range.dm 20](git.png)
The component will hook into signals only on turfs not farther from tracked than this.
tracked ![code/datums/components/connect_range.dm 17](git.png)
The atom the component is tracking. The component will delete itself if the tracked is deleted. Signals will also be updated whenever it moves (if it's a movable).
turfs ![code/datums/components/connect_range.dm 12](git.png)
The turfs currently connected to this component
works_in_containers ![code/datums/components/connect_range.dm 24](git.png)
Whether the component works when the movable isn't directly located on a turf.