Refactored directionals (#20082)

Refactored directionals, ported lists of directions from TG, got rid of
useless proc to get the reverse direction.
This commit is contained in:
Fluffy
2024-10-25 17:56:02 +00:00
committed by GitHub
parent e8107c3170
commit d9c44532fc
146 changed files with 377 additions and 281 deletions
+2 -2
View File
@@ -162,7 +162,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
A.fire_act(air_contents.temperature, air_contents.volume)
//spread
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
var/turf/simulated/enemy_tile = get_step(my_tile, direction)
if(istype(enemy_tile))
@@ -202,7 +202,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
qdel(src)
return
set_dir(pick(GLOB.cardinal))
set_dir(pick(GLOB.cardinals))
var/datum/gas_mixture/air_contents = loc.return_air()
color = fire_color(air_contents.temperature)
+2 -2
View File
@@ -93,7 +93,7 @@
var/connected_dirs
GET_ZONE_NEIGHBOURS(T, connected_dirs)
if(connected_dirs && (dir & GLOB.reverse_dir[connected_dirs]) == dir)
if(connected_dirs && (dir & REVERSE_DIR(connected_dirs)) == dir)
. &= ~dir //they are, so unflag the cardinals in question
//it is safe to remove src from the zone if all cardinals are connected by corner turfs
@@ -179,7 +179,7 @@
if(istype(unsim, /turf/simulated))
var/turf/simulated/sim = unsim
sim.open_directions |= GLOB.reverse_dir[d]
sim.open_directions |= REVERSE_DIR(d)
if(TURF_HAS_VALID_ZONE(sim))
//Might have assigned a zone, since this happens for each direction.