mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
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:
@@ -4,7 +4,7 @@
|
||||
var/effect_system_type = null // Which effect system to attach.
|
||||
|
||||
var/effect_amount = 10 // How many effect objects to create on each interval. Note that there's a hard cap on certain effect_systems.
|
||||
var/effect_cardinals_only = FALSE // If true, effects only move in GLOB.cardinal directions.
|
||||
var/effect_cardinals_only = FALSE // If true, effects only move in GLOB.cardinals directions.
|
||||
var/effect_forced_dir = null // If set, effects emitted will always move in this direction.
|
||||
|
||||
/obj/effect/map_effect/interval/effect_emitter/Initialize()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
new_firedoor.req_one_access = req_one_access
|
||||
if(!single_window)
|
||||
var/list/neighbours = list()
|
||||
for (var/dir in GLOB.cardinal)
|
||||
for (var/dir in GLOB.cardinals)
|
||||
var/turf/T = get_step(src, dir)
|
||||
var/obj/effect/map_effect/window_spawner/other = locate(/obj/effect/map_effect/window_spawner) in T
|
||||
if(!other)
|
||||
|
||||
@@ -133,7 +133,7 @@ do { \
|
||||
|
||||
// On both tiles
|
||||
for(var/obj/structure/window/reinforced/crescent/W in T3)
|
||||
if(W.dir == GLOB.reverse_dir[text2num(D)])
|
||||
if(W.dir == REVERSE_DIR(text2num(D)))
|
||||
qdel(W)
|
||||
|
||||
// Mark as visited
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/turf/T3 = unvisited_neighbours["[D]"] // Pick random dir turf
|
||||
|
||||
// Remove the color between the two
|
||||
var/turf/T4 = get_step(T3, GLOB.reverse_dir[text2num(D)])
|
||||
var/turf/T4 = get_step(T3, REVERSE_DIR(text2num(D)))
|
||||
T4?.color = MAZEGEN_TURF_CELL
|
||||
|
||||
// Mark as visited
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// -- Spark Procs --
|
||||
/proc/spark(var/atom/movable/loc, var/amount = 1, var/spread_dirs = GLOB.cardinal)
|
||||
/proc/spark(var/atom/movable/loc, var/amount = 1, var/spread_dirs = GLOB.cardinals)
|
||||
new /datum/effect_system/sparks(get_turf(loc), TRUE, amount, spread_dirs)
|
||||
|
||||
/proc/bind_spark(var/atom/movable/loc, var/amount = 1, var/spread_dirs = GLOB.cardinal)
|
||||
/proc/bind_spark(var/atom/movable/loc, var/amount = 1, var/spread_dirs = GLOB.cardinals)
|
||||
var/datum/effect_system/sparks/S = new(loc, FALSE, amount, spread_dirs)
|
||||
S.bind(loc)
|
||||
return S
|
||||
|
||||
Reference in New Issue
Block a user