mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-28 02:52:01 +00:00
isopenturf() macro, update_above improvements (#2931)
changes: Added a isopenturf() macro, equivalent to istype(thing, /turf/simulated/open). Converted most/all instances of istype(/turf/simulated/open) to isopenturf(). Made update_above()' aware of queue status & inlined a proc-call.
This commit is contained in:
@@ -78,10 +78,10 @@
|
||||
// Invokes fall_through() after the atom is moved to
|
||||
// its new destination this cycle. Immediately invokes fall_impact and
|
||||
// fall_collateral if the next turf is not open space.
|
||||
if (istype(victim.loc, /turf/simulated/open))
|
||||
if (isopenturf(victim.loc))
|
||||
victim.forceMove(below)
|
||||
|
||||
if (istype(victim.loc, /turf/simulated/open))
|
||||
if (isopenturf(victim.loc))
|
||||
victim.fall_through()
|
||||
else
|
||||
// This is a lookahead. It removes any lag from being moved onto
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Seems to be much simpler/saner than /vg/'s implementation.
|
||||
|
||||
// Turfs that will be colored as HOLOMAP_ROCK
|
||||
#define IS_ROCK(tile) (istype(tile, /turf/simulated/mineral) || istype(tile, /turf/simulated/floor/asteroid) || istype(tile, /turf/simulated/open))
|
||||
#define IS_ROCK(tile) (istype(tile, /turf/simulated/mineral) || istype(tile, /turf/simulated/floor/asteroid) || isopenturf(tile))
|
||||
|
||||
// Turfs that will be colored as HOLOMAP_OBSTACLE
|
||||
#define IS_OBSTACLE(tile) ((!istype(tile, /turf/space) && istype(tile.loc, /area/mine/unexplored)) \
|
||||
|
||||
@@ -195,6 +195,6 @@
|
||||
|
||||
/datum/controller/subsystem/openturf/proc/calculate_depth(turf/simulated/open/T)
|
||||
. = 0
|
||||
while (T && istype(T.below, /turf/simulated/open))
|
||||
while (T && isopenturf(T.below))
|
||||
T = T.below
|
||||
.++
|
||||
|
||||
Reference in New Issue
Block a user