code/modules/ambient_occlusion/turf_ao.dm

CALCULATE_JUNCTIONS | Define for getting a bitfield of adjacent turfs that meet a condition. |
---|
Define Details
CALCULATE_JUNCTIONS
Define for getting a bitfield of adjacent turfs that meet a condition.
Arguments:
- ORIGIN - The atom to step from,
- VAR - The var to write the bitfield to.
- TVAR - The temporary turf variable to use.
- FUNC - An additional function used to validate the turf found in each direction. Generally should reference TVAR.
Example:
- var/our_junction = 0
- var/turf/T
- CALCULATE_JUNCTIONS(src, our_junction, T, isopenturf(T))
- // isopenturf(T) NEEDS to be in the macro call since its nested into for loops.
NOTICE:
- This macro used to be CALCULATE_NEIGHBORS.
- It has been renamed to avoid conflicts and confusions with other codebases.