mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-14 02:43:16 +00:00
* Player-craftable Trapdoors * Update trapdoor.dm Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
78 lines
3.3 KiB
Plaintext
78 lines
3.3 KiB
Plaintext
#define CHANGETURF_DEFER_CHANGE (1<<0)
|
|
#define CHANGETURF_IGNORE_AIR (1<<1) // This flag prevents changeturf from gathering air from nearby turfs to fill the new turf with an approximation of local air
|
|
#define CHANGETURF_FORCEOP (1<<2)
|
|
#define CHANGETURF_SKIP (1<<3) // A flag for PlaceOnTop to just instance the new turf instead of calling ChangeTurf. Used for uninitialized turfs NOTHING ELSE
|
|
#define CHANGETURF_INHERIT_AIR (1<<4) // Inherit air from previous turf. Implies CHANGETURF_IGNORE_AIR
|
|
#define CHANGETURF_RECALC_ADJACENT (1<<5) //Immediately recalc adjacent atmos turfs instead of queuing.
|
|
#define CHANGETURF_TRAPDOOR_INDUCED (1<<6) // Caused by a trapdoor, for trapdoor to know that this changeturf was caused by itself
|
|
|
|
#define IS_OPAQUE_TURF(turf) (turf.directional_opacity == ALL_CARDINALS)
|
|
|
|
//supposedly the fastest way to do this according to https://gist.github.com/Giacom/be635398926bb463b42a
|
|
///Returns a list of turf in a square
|
|
#define RANGE_TURFS(RADIUS, CENTER) \
|
|
RECT_TURFS(RADIUS, RADIUS, CENTER)
|
|
|
|
#define RECT_TURFS(H_RADIUS, V_RADIUS, CENTER) \
|
|
block( \
|
|
locate(max(CENTER.x-(H_RADIUS),1), max(CENTER.y-(V_RADIUS),1), CENTER.z), \
|
|
locate(min(CENTER.x+(H_RADIUS),world.maxx), min(CENTER.y+(V_RADIUS),world.maxy), CENTER.z) \
|
|
)
|
|
|
|
///Returns all turfs in a zlevel
|
|
#define Z_TURFS(ZLEVEL) block(locate(1,1,ZLEVEL), locate(world.maxx, world.maxy, ZLEVEL))
|
|
|
|
#define TURF_FROM_COORDS_LIST(List) (locate(List[1], List[2], List[3]))
|
|
|
|
/// The pipes, disposals, and wires are hidden
|
|
#define UNDERFLOOR_HIDDEN 0
|
|
/// The pipes, disposals, and wires are visible but cannot be interacted with
|
|
#define UNDERFLOOR_VISIBLE 1
|
|
/// The pipes, disposals, and wires are visible and can be interacted with
|
|
#define UNDERFLOOR_INTERACTABLE 2
|
|
|
|
//Wet floor type flags. Stronger ones should be higher in number.
|
|
/// Turf is dry and mobs won't slip
|
|
#define TURF_DRY (0)
|
|
/// Turf has water on the floor and mobs will slip unless walking or using galoshes
|
|
#define TURF_WET_WATER (1<<0)
|
|
/// Turf has a thick layer of ice on the floor and mobs will slip in the direction until they bump into something
|
|
#define TURF_WET_PERMAFROST (1<<1)
|
|
/// Turf has a thin layer of ice on the floor and mobs will slip
|
|
#define TURF_WET_ICE (1<<2)
|
|
/// Turf has lube on the floor and mobs will slip
|
|
#define TURF_WET_LUBE (1<<3)
|
|
/// Turf has superlube on the floor and mobs will slip even if they are crawling
|
|
#define TURF_WET_SUPERLUBE (1<<4)
|
|
|
|
/// Checks if a turf is wet
|
|
#define IS_WET_OPEN_TURF(O) O.GetComponent(/datum/component/wet_floor)
|
|
|
|
/// Maximum amount of time, (in deciseconds) a tile can be wet for.
|
|
#define MAXIMUM_WET_TIME 5 MINUTES
|
|
|
|
/**
|
|
* Get the turf that `A` resides in, regardless of any containers.
|
|
*
|
|
* Use in favor of `A.loc` or `src.loc` so that things work correctly when
|
|
* stored inside an inventory, locker, or other container.
|
|
*/
|
|
#define get_turf(A) (get_step(A, 0))
|
|
|
|
/**
|
|
* Get the ultimate area of `A`, similarly to [get_turf].
|
|
*
|
|
* Use instead of `A.loc.loc`.
|
|
*/
|
|
#define get_area(A) (isarea(A) ? A : get_step(A, 0)?.loc)
|
|
|
|
#define TEMPORARY_THERMAL_CONDUCTIVITY 1
|
|
|
|
#define MAX_TEMPORARY_THERMAL_CONDUCTIVITY 1
|
|
/// Turf will be passable if density is 0
|
|
#define TURF_PATHING_PASS_DENSITY 0
|
|
/// Turf will be passable depending on [CanAStarPass] return value
|
|
#define TURF_PATHING_PASS_PROC 1
|
|
/// Turf is never passable
|
|
#define TURF_PATHING_PASS_NO 2
|