mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
- Add additional can_atmos_pass value ATMOS_PASS_PROC which indicates custom behavior requiring calling the CanZASPass proc. - The benefit being for the other three values we DON'T need to call CanZASPass at all! We already know the behavior without the overhead of a proc call. - Obviously any atom with can_atmos_pass = ATMOS_PASS_PROC cannot now call ..() in CanZASPass() since the default behavior would be to (recursively) call CanZASPass() - This required re-numbering the constants, so I also fixed all code that assumed particular values for the constants. - Switched all types which overrode CanZASPass with custom logic to be can_atmos_pass = ATMOS_PASS_PROC - Changed /turf/c_airblock() to skip calling /atom/movable/c_airblock() for the three can_atmos_pass values that don't require calling the proc.
14 lines
757 B
Plaintext
14 lines
757 B
Plaintext
// Bitflag values for c_airblock()
|
|
#define AIR_BLOCKED 1 // Blocked
|
|
#define ZONE_BLOCKED 2 // Not blocked, but zone boundaries will not cross.
|
|
#define BLOCKED 3 // Blocked, zone boundaries will not cross even if opened.
|
|
|
|
#define ZONE_MIN_SIZE 14 // Zones with less than this many turfs will always merge, even if the connection is not direct
|
|
|
|
// Used for quickly making certain things allow airflow or not.
|
|
// More complicated, conditional airflow should override CanZASPass().
|
|
#define ATMOS_PASS_YES 1 // Always blocks air and zones.
|
|
#define ATMOS_PASS_NO 2 // Never blocks air or zones.
|
|
#define ATMOS_PASS_DENSITY 3 // Blocks air and zones if density = 1, allows both if density = 0
|
|
#define ATMOS_PASS_PROC 4 // Call CanZASPass() using c_airblock
|