diff --git a/aurorastation.dme b/aurorastation.dme index fd57abf6d3b..abc6c76768a 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -264,6 +264,7 @@ #include "code\_globalvars\edible.dm" #include "code\_globalvars\logging.dm" #include "code\_globalvars\tgui.dm" +#include "code\_globalvars\lists\mapping.dm" #include "code\_globalvars\lists\mobs.dm" #include "code\_onclick\adjacent.dm" #include "code\_onclick\ai.dm" diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 3d2999a5c29..1f5be0346a7 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -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) diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index e78d0054534..e0e1eeb8a4c 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -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. diff --git a/code/__DEFINES/global.dm b/code/__DEFINES/global.dm index c191056e9ea..1d4ecedfe97 100644 --- a/code/__DEFINES/global.dm +++ b/code/__DEFINES/global.dm @@ -77,14 +77,6 @@ GLOBAL_LIST_EMPTY(tdomeobserve) GLOBAL_LIST_EMPTY(tdomeadmin) GLOBAL_LIST_EMPTY(ninjastart) -GLOBAL_LIST_INIT(cardinal, list(NORTH, SOUTH, EAST, WEST)) -GLOBAL_LIST_INIT(cornerdirs, list(NORTHWEST, SOUTHEAST, NORTHEAST, SOUTHWEST)) -GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)) -GLOBAL_LIST_INIT(reverse_dir, list( // reverse_dir[dir] = reverse of dir - 2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, - 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, - 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63 -)) GLOBAL_LIST_INIT(all_days, list("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) GLOBAL_LIST_EMPTY(combatlog) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 295809d1fcd..c952dd342b9 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -345,7 +345,7 @@ example: CALCULATE_NEIGHBORS(src, result, T, isopenturf(T)) */ #define CALCULATE_NEIGHBORS(ORIGIN, VAR, TVAR, FUNC) \ - for (var/_tdir in GLOB.cardinal) { \ + for (var/_tdir in GLOB.cardinals) { \ TVAR = get_step(ORIGIN, _tdir); \ if ((TVAR) && (FUNC)) { \ VAR |= 1 << _tdir; \ diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 144f3221b9c..539f4cd9807 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -209,13 +209,13 @@ return mixedcolor /** -* Gets the highest and lowest pressures from the tiles in GLOB.cardinal directions +* Gets the highest and lowest pressures from the tiles in GLOB.cardinals directions * around us, then checks the difference. */ /proc/getOPressureDifferential(var/turf/loc) var/minp=16777216; var/maxp=0; - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/turf/simulated/T=get_turf(get_step(loc,dir)) var/cp=0 if(T && istype(T) && T.zone) @@ -236,7 +236,7 @@ /proc/getCardinalAirInfo(var/turf/loc, var/list/stats=list("temperature")) var/list/temps = new/list(4) - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/direction switch(dir) if(NORTH) diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 21b635ae2af..e3c6271db1a 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -89,7 +89,7 @@ else var/atom/movable/AM - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) AM = find_type_in_direction(src, direction) if(AM == NULLTURF_BORDER) if((smoothing_flags & SMOOTH_BORDER)) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 6e4638632fa..1d3ad5e32ff 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1031,25 +1031,6 @@ var/global/list/common_tools = list( surgery_attempt = SURGERY_IGNORE //hit yourself if you're not lying return surgery_attempt -/proc/reverse_direction(var/dir) - switch(dir) - if(NORTH) - return SOUTH - if(NORTHEAST) - return SOUTHWEST - if(EAST) - return WEST - if(SOUTHEAST) - return NORTHWEST - if(SOUTH) - return NORTH - if(SOUTHWEST) - return NORTHEAST - if(WEST) - return EAST - if(NORTHWEST) - return SOUTHEAST - /* Checks if that loc and dir has a item on the wall */ diff --git a/code/_globalvars/lists/mapping.dm b/code/_globalvars/lists/mapping.dm new file mode 100644 index 00000000000..9e123e63d9e --- /dev/null +++ b/code/_globalvars/lists/mapping.dm @@ -0,0 +1,94 @@ +GLOBAL_LIST_INIT(cardinals, list( + NORTH, + SOUTH, + EAST, + WEST, +)) +GLOBAL_LIST_INIT(cardinals_multiz, list( + NORTH, + SOUTH, + EAST, + WEST, + UP, + DOWN, +)) +GLOBAL_LIST_INIT(diagonals, list( + NORTHEAST, + NORTHWEST, + SOUTHEAST, + SOUTHWEST, +)) +GLOBAL_LIST_INIT(corners_multiz, list( + UP|NORTHEAST, + UP|NORTHWEST, + UP|SOUTHEAST, + UP|SOUTHWEST, + DOWN|NORTHEAST, + DOWN|NORTHWEST, + DOWN|SOUTHEAST, + DOWN|SOUTHWEST, +)) +GLOBAL_LIST_INIT(diagonals_multiz, list( + NORTHEAST, + NORTHWEST, + SOUTHEAST, + SOUTHWEST, + + UP|NORTH, + UP|SOUTH, + UP|EAST, + UP|WEST, + UP|NORTHEAST, + UP|NORTHWEST, + UP|SOUTHEAST, + UP|SOUTHWEST, + + DOWN|NORTH, + DOWN|SOUTH, + DOWN|EAST, + DOWN|WEST, + DOWN|NORTHEAST, + DOWN|NORTHWEST, + DOWN|SOUTHEAST, + DOWN|SOUTHWEST, +)) +GLOBAL_LIST_INIT(alldirs_multiz, list( + NORTH, + SOUTH, + EAST, + WEST, + NORTHEAST, + NORTHWEST, + SOUTHEAST, + SOUTHWEST, + + UP, + UP|NORTH, + UP|SOUTH, + UP|EAST, + UP|WEST, + UP|NORTHEAST, + UP|NORTHWEST, + UP|SOUTHEAST, + UP|SOUTHWEST, + + DOWN, + DOWN|NORTH, + DOWN|SOUTH, + DOWN|EAST, + DOWN|WEST, + DOWN|NORTHEAST, + DOWN|NORTHWEST, + DOWN|SOUTHEAST, + DOWN|SOUTHWEST, +)) +GLOBAL_LIST_INIT(alldirs, list( + NORTH, + SOUTH, + EAST, + WEST, + NORTHEAST, + NORTHWEST, + SOUTHEAST, + SOUTHWEST, +)) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 1709f6b2ff0..333d3d1e2bf 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -631,7 +631,7 @@ if(Proj.damage_flags & DAMAGE_FLAG_LASER) if(Proj.damage >= 20) bullet_mark_icon_state = "scorch" - bullet_mark_dir = pick(GLOB.cardinal) // Pick random scorch design + bullet_mark_dir = pick(GLOB.cardinals) // Pick random scorch design else bullet_mark_icon_state = "light_scorch" diff --git a/code/game/gamemodes/endgame/bluespace_jump/bluespace_jump.dm b/code/game/gamemodes/endgame/bluespace_jump/bluespace_jump.dm index 754073f72f2..ecce42ce949 100644 --- a/code/game/gamemodes/endgame/bluespace_jump/bluespace_jump.dm +++ b/code/game/gamemodes/endgame/bluespace_jump/bluespace_jump.dm @@ -100,7 +100,7 @@ to_chat(daddy, SPAN_WARNING("You feel a bit less real. Which one of you two was original again?..")) /obj/effect/bluegoast/proc/mirror_dir(var/atom/movable/am, var/old_dir, var/new_dir) - set_dir(GLOB.reverse_dir[new_dir]) + set_dir(REVERSE_DIR(new_dir)) /obj/effect/bluegoast/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) SHOULD_CALL_PARENT(FALSE) diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm index 681aa5e5657..741cb09cb1c 100644 --- a/code/game/gamemodes/events/clang.dm +++ b/code/game/gamemodes/events/clang.dm @@ -44,7 +44,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 var/starty = 0 var/endy = 0 var/endx = 0 - var/startside = pick(GLOB.cardinal) + var/startside = pick(GLOB.cardinals) switch(startside) if(NORTH) diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index 1304721a25f..7515911ac6a 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -71,7 +71,7 @@ next_wave = round_duration_in_ticks + meteor_wave_delay // Starts as barely noticeable dust impact, ends as barrage of most severe meteor types the code has to offer. Have fun. spawn() - spawn_meteors(meteor_severity, get_meteor_types(), pick(GLOB.cardinal), pick(SSmapping.levels_by_trait(ZTRAIT_STATION))) + spawn_meteors(meteor_severity, get_meteor_types(), pick(GLOB.cardinals), pick(SSmapping.levels_by_trait(ZTRAIT_STATION))) var/escalated = FALSE if(prob(escalation_probability) && (meteor_severity < maximal_severity)) meteor_severity++ diff --git a/code/game/gamemodes/technomancer/devices/shield_armor.dm b/code/game/gamemodes/technomancer/devices/shield_armor.dm index 6c4fd11f0a2..03b66ac7149 100644 --- a/code/game/gamemodes/technomancer/devices/shield_armor.dm +++ b/code/game/gamemodes/technomancer/devices/shield_armor.dm @@ -25,7 +25,7 @@ /obj/item/clothing/suit/armor/shield/New() ..() - spark(src, 5, GLOB.cardinal) + spark(src, 5, GLOB.cardinals) /obj/item/clothing/suit/armor/shield/handle_shield(mob/user, var/on_back, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") //Since this is a pierce of armor that is passive, we do not need to check if the user is incapacitated. @@ -63,7 +63,7 @@ user.visible_message(SPAN_DANGER("\The [user]'s [src] absorbs [attack_text]!")) to_chat(user, SPAN_WARNING("Your shield has absorbed most of \the [damage_source].")) - spark(src, 5, GLOB.cardinal) + spark(src, 5, GLOB.cardinals) playsound(src, 'sound/weapons/blade.ogg', 50, 1) return BULLET_ACT_HIT // This shield does not block all damage, so returning 0 is needed to tell the game to apply the new damage. diff --git a/code/game/gamemodes/technomancer/spells/apportation.dm b/code/game/gamemodes/technomancer/spells/apportation.dm index 41fb32f08f6..205bdf7e00a 100644 --- a/code/game/gamemodes/technomancer/spells/apportation.dm +++ b/code/game/gamemodes/technomancer/spells/apportation.dm @@ -34,8 +34,8 @@ if(isitem(hit_atom)) var/obj/item/I = hit_atom - spark(I, 5, GLOB.cardinal) - spark(user, 5, GLOB.cardinal) + spark(I, 5, GLOB.cardinals) + spark(user, 5, GLOB.cardinals) I.visible_message(SPAN_DANGER("\The [I] vanishes into thin air!")) I.forceMove(get_turf(user)) user.drop_item(src) @@ -48,8 +48,8 @@ else if(isliving(hit_atom)) var/mob/living/L = hit_atom to_chat(L, SPAN_DANGER("You are teleported towards \the [user]!")) - spark(L, 5, GLOB.cardinal) - spark(user, 5, GLOB.cardinal) + spark(L, 5, GLOB.cardinals) + spark(user, 5, GLOB.cardinals) L.throw_at(get_step(get_turf(src), get_dir(src, L)), 4, 1, src) addtimer(CALLBACK(src, PROC_REF(seize_mob), L, user), 1 SECOND) user.drop_item(src) diff --git a/code/game/gamemodes/technomancer/spells/passwall.dm b/code/game/gamemodes/technomancer/spells/passwall.dm index 4b38220582b..9f8188c0e53 100644 --- a/code/game/gamemodes/technomancer/spells/passwall.dm +++ b/code/game/gamemodes/technomancer/spells/passwall.dm @@ -40,7 +40,7 @@ visible_message("[user] rests a hand on \the [hit_atom].") busy = 1 - spark(our_turf, 3, GLOB.cardinal) + spark(our_turf, 3, GLOB.cardinals) while(i) checked_turf = get_step(checked_turf, direction) //Advance in the given direction diff --git a/code/game/gamemodes/technomancer/spells/reflect.dm b/code/game/gamemodes/technomancer/spells/reflect.dm index d451c653e5d..626fa079a6d 100644 --- a/code/game/gamemodes/technomancer/spells/reflect.dm +++ b/code/game/gamemodes/technomancer/spells/reflect.dm @@ -38,7 +38,7 @@ return BULLET_ACT_HIT //block as long as they are not directly behind us - var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block + var/bad_arc = REVERSE_DIR(user.dir) //arc of directions from which we cannot block if(check_shield_arc(user, bad_arc, damage_source, attacker)) if(istype(damage_source, /obj/projectile)) @@ -75,7 +75,7 @@ to_chat(attacker, SPAN_DANGER("Your [damage_source.name] goes through \the [src] in one location, comes out \ on the same side, and hits you!")) - spark(src, 5, GLOB.cardinal) + spark(src, 5, GLOB.cardinals) playsound(src, 'sound/weapons/blade.ogg', 50, 1) log_and_message_admins("[user] reflected [attacker]'s attack back at them.") diff --git a/code/game/gamemodes/technomancer/spells/shield.dm b/code/game/gamemodes/technomancer/spells/shield.dm index d6c580ec175..54835aeefdd 100644 --- a/code/game/gamemodes/technomancer/spells/shield.dm +++ b/code/game/gamemodes/technomancer/spells/shield.dm @@ -50,10 +50,10 @@ return BULLET_ACT_HIT //block as long as they are not directly behind us - var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block + var/bad_arc = REVERSE_DIR(user.dir) //arc of directions from which we cannot block if(check_shield_arc(user, bad_arc, damage_source, attacker)) user.visible_message(SPAN_DANGER("\The [user]'s [src] blocks [attack_text]!")) - spark(src, 3, GLOB.cardinal) + spark(src, 3, GLOB.cardinals) playsound(src, 'sound/weapons/blade.ogg', 50, 1) adjust_instability(2) return BULLET_ACT_BLOCK diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index 1345205f195..3d76152e599 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -131,7 +131,7 @@ pulse2.icon_state = "empdisable" pulse2.name = "emp sparks" pulse2.anchored = 1 - pulse2.set_dir(pick(GLOB.cardinal)) + pulse2.set_dir(pick(GLOB.cardinals)) QDEL_IN(pulse2, 10) @@ -174,7 +174,7 @@ // for(var/turf/simulated/t in oview(src,1)) - for(var/d in GLOB.cardinal) + for(var/d in GLOB.cardinals) var/turf/simulated/T = get_step(src, d) if(istype(T) && !T.density) if(!LinkBlockedWithAccess(src, T, ID)) diff --git a/code/game/machinery/crusher_piston.dm b/code/game/machinery/crusher_piston.dm index 826ac8fd29e..b07c69b16c9 100644 --- a/code/game/machinery/crusher_piston.dm +++ b/code/game/machinery/crusher_piston.dm @@ -488,7 +488,7 @@ var/turf/T = get_turf(src) var/list/valid_turfs = list() - for(var/dir_to_test in GLOB.cardinal) + for(var/dir_to_test in GLOB.cardinals) var/turf/new_turf = get_step(T, dir_to_test) if(!new_turf.contains_dense_objects()) valid_turfs += new_turf diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index bfe5deeb169..88899349052 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -312,7 +312,7 @@ Deployable Kits /obj/item/deployable_kit/surgery_table/assemble_kit(mob/user) ..() var/free_spot = null - for(var/check_dir in GLOB.cardinal) + for(var/check_dir in GLOB.cardinals) var/turf/T = get_step(src, check_dir) if(turf_clear(T)) free_spot = T diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 79f61ed2ad7..fbbb5a66809 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1954,7 +1954,7 @@ About the new airlock wires panel: var/turf/T = loc if(istype(T)) var/list/valid_turfs = list() - for(var/dir_to_test in GLOB.cardinal) + for(var/dir_to_test in GLOB.cardinals) var/turf/new_turf = get_step(T, dir_to_test) if(!new_turf.contains_dense_objects()) valid_turfs |= new_turf diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index e64c49a4745..57e111431fc 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -33,7 +33,7 @@ t1 += "Unrestricted Access Settings
" - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction & unres_dir) t1 += "[capitalize(dir2text(direction))]
" else diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index de7b01dad30..bba1b0b6a7e 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -77,7 +77,7 @@ if(!mapload) enable_smart_generation = 0 - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) var/turf/T = get_step(src,direction) A = get_area(T) if(istype(A) && !(A in areas_added)) diff --git a/code/game/machinery/floor_frames.dm b/code/game/machinery/floor_frames.dm index 2e556c0b15d..a5c00f65f9b 100644 --- a/code/game/machinery/floor_frames.dm +++ b/code/game/machinery/floor_frames.dm @@ -29,7 +29,7 @@ else ndir = get_dir(on_floor,usr) - if (!(ndir in GLOB.cardinal)) + if (!(ndir in GLOB.cardinals)) return var/turf/loc = get_turf(on_floor) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 26dc04c4e72..3756ea81cac 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -208,7 +208,7 @@ Class Procs: pulse2.icon_state = "empdisable" pulse2.name = "emp sparks" pulse2.anchored = 1 - pulse2.set_dir(pick(GLOB.cardinal)) + pulse2.set_dir(pick(GLOB.cardinals)) QDEL_IN(pulse2, 10) diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index 4e425ddde18..6f7fd148077 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -109,7 +109,7 @@ return var/placement_dir = get_dir(user, W) - if (!(placement_dir in GLOB.cardinal)) + if (!(placement_dir in GLOB.cardinals)) to_chat(user, SPAN_WARNING("You must stand directly in front of the wall you wish to place that on.")) return @@ -119,7 +119,7 @@ stuff_on_wall = 1 //crude, but will cover most cases. We could do stuff like check pixel_x/y but it's not really worth it. - for (var/dir in GLOB.cardinal) + for (var/dir in GLOB.cardinals) var/turf/T = get_step(W, dir) if (locate(/obj/machinery/button) in T) stuff_on_wall = 1 diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 92f084bcc5d..2b9a53ea343 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -405,7 +405,7 @@ /obj/item/pipe/Move() ..() if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_FUEL_BENT, PIPE_AUX_BENT, PIPE_HE_BENT)) \ - && (src.dir in GLOB.cardinal)) + && (src.dir in GLOB.cardinals)) src.set_dir(src.dir|turn(src.dir, 90)) else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_FUEL_STRAIGHT, PIPE_AUX_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_MVALVE)) if(dir==2) diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index d996b45718c..851d6fbd4d8 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -29,7 +29,7 @@ else ndir = get_dir(on_wall,usr) - if (!(ndir in GLOB.cardinal)) + if (!(ndir in GLOB.cardinals)) return var/turf/loc = get_turf(usr) diff --git a/code/game/objects/effects/chem/chemsmoke.dm b/code/game/objects/effects/chem/chemsmoke.dm index 5d534d2e387..6405679943d 100644 --- a/code/game/objects/effects/chem/chemsmoke.dm +++ b/code/game/objects/effects/chem/chemsmoke.dm @@ -19,7 +19,7 @@ if(cached_icon) icon = cached_icon - set_dir(pick(GLOB.cardinal)) + set_dir(pick(GLOB.cardinals)) pixel_x = -32 + rand(-8, 8) pixel_y = -32 + rand(-8, 8) @@ -285,7 +285,7 @@ while(pending.len) for(var/turf/current in pending) - for(var/D in GLOB.cardinal) + for(var/D in GLOB.cardinals) var/turf/target = get_step(current, D) if(wallList) if(istype(target, /turf/simulated/wall)) diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index ea36be39f94..8d89eed11dc 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -55,7 +55,7 @@ if(--amount < 0) return - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) var/turf/T = get_step(src, direction) if(!T) continue diff --git a/code/game/objects/effects/decals/Cleanable/fuel.dm b/code/game/objects/effects/decals/Cleanable/fuel.dm index f2675897a4a..488d80a88d7 100644 --- a/code/game/objects/effects/decals/Cleanable/fuel.dm +++ b/code/game/objects/effects/decals/Cleanable/fuel.dm @@ -33,7 +33,7 @@ if(amount < 15) return //lets suppose welder fuel is fairly thick and sticky. For something like water, 5 or less would be more appropriate. var/turf/simulated/S = loc if(!istype(S)) return - for(var/d in GLOB.cardinal) + for(var/d in GLOB.cardinals) var/turf/simulated/target = get_step(src,d) var/turf/simulated/origin = get_turf(src) if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0)) @@ -88,7 +88,7 @@ var/turf/simulated/S = loc if(!istype(S)) return - for(var/d in GLOB.cardinal) + for(var/d in GLOB.cardinals) var/turf/simulated/target = get_step(src,d) var/turf/simulated/origin = get_turf(src) if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0)) @@ -149,7 +149,7 @@ if(amount < 15) return var/turf/simulated/S = loc if(!istype(S)) return - for(var/d in GLOB.cardinal) + for(var/d in GLOB.cardinals) var/turf/simulated/target = get_step(src,d) var/turf/simulated/origin = get_turf(src) if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0)) diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 89962c6b2a2..cf488ab8cf0 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -37,7 +37,7 @@ return var/placement_dir = get_dir(user, W) - if (!(placement_dir in GLOB.cardinal)) + if (!(placement_dir in GLOB.cardinals)) to_chat(user, SPAN_WARNING("You must stand directly in front of the wall you wish to place that on.")) return @@ -47,7 +47,7 @@ stuff_on_wall = 1 //crude, but will cover most cases. We could do stuff like check pixel_x/y but it's not really worth it. - for (var/dir in GLOB.cardinal) + for (var/dir in GLOB.cardinals) var/turf/T = get_step(W, dir) if (locate(/obj/structure/sign/poster) in T) stuff_on_wall = 1 diff --git a/code/game/objects/effects/decals/snow.dm b/code/game/objects/effects/decals/snow.dm index 4c8bf5f929e..19dbcad9ca5 100644 --- a/code/game/objects/effects/decals/snow.dm +++ b/code/game/objects/effects/decals/snow.dm @@ -13,7 +13,7 @@ icon_state = "drift" /obj/effect/floor_decal/snowdrift/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state) - supplied_dir = pick(GLOB.cardinal) + supplied_dir = pick(GLOB.cardinals) return ..() /obj/effect/floor_decal/snowdrift/large @@ -22,5 +22,5 @@ pixel_x = -16 /obj/effect/floor_decal/snowdrift/large/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state) - supplied_dir = pick(GLOB.cardinal) + supplied_dir = pick(GLOB.cardinals) return ..() diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 6289a23fe14..f1b14faa12c 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -78,7 +78,7 @@ steam.start() -- spawns the effect var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location) var/direction if(src.cardinals) - direction = pick(GLOB.cardinal) + direction = pick(GLOB.cardinals) else direction = pick(GLOB.alldirs) for(i=0, i[user] starts climbing over the back of \the [src]...", SPAN_NOTICE("You start climbing over the back of \the [src]...")) if(do_after(user, 2 SECONDS, do_flags = DO_UNIQUE)) user.forceMove(loc) @@ -51,7 +51,7 @@ /obj/structure/bed/stool/chair/CanPass(atom/movable/mover, turf/target, height, air_group) if(anchored && padding_material) - if(mover?.density && isliving(mover) && (GLOB.reverse_dir[dir] & angle2dir(Get_Angle(src, mover)))) + if(mover?.density && isliving(mover) && (REVERSE_DIR(dir) & angle2dir(Get_Angle(src, mover)))) return FALSE return ..() diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index 2da247a206b..5611d846414 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -23,7 +23,7 @@ ClearOverlays() var/has_border = 0 //Check the cardinal turfs - for(var/step_dir in GLOB.cardinal) + for(var/step_dir in GLOB.cardinals) var/turf/simulated/floor/T = get_step(src, step_dir) var/is_linked = flooring.symmetric_test_link(src, T) @@ -41,7 +41,7 @@ //We can only have inner corners if we're smoothed with something if (has_smooth && flooring.flags & TURF_HAS_INNER_CORNERS) - for(var/direction in GLOB.cornerdirs) + for(var/direction in GLOB.diagonals) if((has_smooth & direction) == direction) if(!flooring.symmetric_test_link(src, get_step(src, direction))) if(flooring.has_damage_state && !isnull(broken) && (flooring.flags & TURF_CAN_BREAK)) @@ -51,7 +51,7 @@ //Next up, outer corners if (has_border && flooring.flags & TURF_HAS_CORNERS) - for(var/direction in GLOB.cornerdirs) + for(var/direction in GLOB.diagonals) if((has_border & direction) == direction) if(!flooring.symmetric_test_link(src, get_step(src, direction))) if(flooring.has_damage_state && !isnull(broken) && (flooring.flags & TURF_CAN_BREAK)) diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm index 6333285441e..742e2b6a58b 100644 --- a/code/modules/admin/verbs/atmosdebug.dm +++ b/code/modules/admin/verbs/atmosdebug.dm @@ -28,7 +28,7 @@ to_chat(usr, "Checking for overlapping pipes...") next_turf: for(var/turf/T in world) - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0) for(var/obj/machinery/atmospherics/pipe in T) if(dir & pipe.initialize_directions) diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index 6fd3c099ba6..9251e5fb573 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -27,7 +27,7 @@ var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc if(tank?.is_leaking) tank.ex_act(3) - spark(src, 4, GLOB.cardinal) + spark(src, 4, GLOB.cardinals) return TRUE /obj/item/device/assembly/igniter/attack_self(mob/user) diff --git a/code/modules/atmospherics/_atmos_setup.dm b/code/modules/atmospherics/_atmos_setup.dm index ca3e78bd063..cdd43519fd9 100644 --- a/code/modules/atmospherics/_atmos_setup.dm +++ b/code/modules/atmospherics/_atmos_setup.dm @@ -176,7 +176,7 @@ var/cache_name = state - for(var/D in GLOB.cardinal) + for(var/D in GLOB.cardinals) var/image/I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) underlays[cache_name + "[D]"] = I for(var/pipe_color in GLOB.pipe_colors) @@ -208,7 +208,7 @@ if(state == "") continue - for(var/D in GLOB.cardinal) + for(var/D in GLOB.cardinals) var/image/I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D) switch(state) if("intact") diff --git a/code/modules/atmospherics/components/omni_devices/omni_base.dm b/code/modules/atmospherics/components/omni_devices/omni_base.dm index eabd0e451ab..16ef189223a 100644 --- a/code/modules/atmospherics/components/omni_devices/omni_base.dm +++ b/code/modules/atmospherics/components/omni_devices/omni_base.dm @@ -29,7 +29,7 @@ /obj/machinery/atmospherics/omni/Initialize() icon_state = "base" ports = new() - for(var/d in GLOB.cardinal) + for(var/d in GLOB.cardinals) var/datum/omni_port/new_port = new(src, d) switch(d) if(NORTH) diff --git a/code/modules/atmospherics/components/valve.dm b/code/modules/atmospherics/components/valve.dm index 66e182bccea..65abfd30632 100644 --- a/code/modules/atmospherics/components/valve.dm +++ b/code/modules/atmospherics/components/valve.dm @@ -146,7 +146,7 @@ var/node1_dir var/node2_dir - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction diff --git a/code/modules/atmospherics/he_pipes.dm b/code/modules/atmospherics/he_pipes.dm index 006ddb4486d..f5f52a2ff0f 100644 --- a/code/modules/atmospherics/he_pipes.dm +++ b/code/modules/atmospherics/he_pipes.dm @@ -31,7 +31,7 @@ var/node1_dir var/node2_dir - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&initialize_directions_he) if (!node1_dir) node1_dir = direction diff --git a/code/modules/atmospherics/pipes.dm b/code/modules/atmospherics/pipes.dm index e9d5bfd0a99..6ff2ce71c98 100644 --- a/code/modules/atmospherics/pipes.dm +++ b/code/modules/atmospherics/pipes.dm @@ -308,7 +308,7 @@ var/node1_dir var/node2_dir - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction @@ -629,7 +629,7 @@ /obj/machinery/atmospherics/pipe/manifold/atmos_init() var/connect_directions = (NORTH|SOUTH|EAST|WEST)&(~dir) - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) if(target.initialize_directions & get_dir(target,src)) @@ -641,7 +641,7 @@ break - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) if(target.initialize_directions & get_dir(target,src)) @@ -653,7 +653,7 @@ break - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) if(target.initialize_directions & get_dir(target,src)) diff --git a/code/modules/blob/blob.dm b/code/modules/blob/blob.dm index a032a0f011e..aad9db36630 100644 --- a/code/modules/blob/blob.dm +++ b/code/modules/blob/blob.dm @@ -297,7 +297,7 @@ process_core_health() regen() for(var/i = 1 to times_to_pulse) - pulse(pulse_power, GLOB.cardinal.Copy()) + pulse(pulse_power, GLOB.cardinals.Copy()) blob_may_process = TRUE if(world.time < (attack_time + attack_cooldown)) return diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index baa07f0b401..c05b2a37a85 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -298,7 +298,7 @@ var/list/preferences_datums = list() BG.screen_loc = "character_preview_map:1,1 to 1,5" var/index = 0 - for(var/D in GLOB.cardinal) + for(var/D in GLOB.cardinals) var/atom/movable/screen/O = LAZYACCESS(char_render_holders, "[D]") if(!O) O = new diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 867c9ef7747..8a238829753 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -976,7 +976,7 @@ wearer.inertia_dir = 0 //If not then we can reset inertia and move if(malfunctioning) - direction = pick(GLOB.cardinal) + direction = pick(GLOB.cardinals) // Inside an object, tell it we moved. if(isobj(wearer.loc) || ismob(wearer.loc)) diff --git a/code/modules/cooking/machinery/gibber.dm b/code/modules/cooking/machinery/gibber.dm index aa7c02986b9..9753d4e391e 100644 --- a/code/modules/cooking/machinery/gibber.dm +++ b/code/modules/cooking/machinery/gibber.dm @@ -24,7 +24,7 @@ /obj/machinery/gibber/autogibber/Initialize() . = ..() - for(var/i in GLOB.cardinal) + for(var/i in GLOB.cardinals) var/obj/machinery/mineral/input/input_obj = locate( /obj/machinery/mineral/input, get_step(loc, i) ) if(input_obj) if(isturf(input_obj.loc)) diff --git a/code/modules/custom_ka/frames.dm b/code/modules/custom_ka/frames.dm index c107a31bbed..41672712059 100644 --- a/code/modules/custom_ka/frames.dm +++ b/code/modules/custom_ka/frames.dm @@ -117,7 +117,7 @@ if(H.mob_size < 10) // smaller than an unathi H.visible_message(SPAN_WARNING("\The [src] goes flying out of \the [H]'s hand!"), SPAN_WARNING("\The [src] flies out of your hand!")) H.drop_item(src) - src.throw_at(get_edge_target_turf(src, GLOB.reverse_dir[H.dir]), 3, 3) + src.throw_at(get_edge_target_turf(src, REVERSE_DIR(H.dir)), 3, 3) var/obj/item/organ/external/LH = H.get_organ(BP_L_HAND) var/obj/item/organ/external/RH = H.get_organ(BP_R_HAND) diff --git a/code/modules/effects/map_effects/effect_emitter.dm b/code/modules/effects/map_effects/effect_emitter.dm index 6ccdb6890c4..2b46b453195 100644 --- a/code/modules/effects/map_effects/effect_emitter.dm +++ b/code/modules/effects/map_effects/effect_emitter.dm @@ -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() diff --git a/code/modules/effects/map_effects/window_spawner.dm b/code/modules/effects/map_effects/window_spawner.dm index 3cebf89a983..86655ee1ca3 100644 --- a/code/modules/effects/map_effects/window_spawner.dm +++ b/code/modules/effects/map_effects/window_spawner.dm @@ -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) diff --git a/code/modules/effects/maze_generation/maze_generator.dm b/code/modules/effects/maze_generation/maze_generator.dm index 4552fd1ee51..c932ce53176 100644 --- a/code/modules/effects/maze_generation/maze_generator.dm +++ b/code/modules/effects/maze_generation/maze_generator.dm @@ -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 diff --git a/code/modules/effects/maze_generation/maze_generator_blockwise.dm b/code/modules/effects/maze_generation/maze_generator_blockwise.dm index b711ab5ae8f..022dfc48ed7 100644 --- a/code/modules/effects/maze_generation/maze_generator_blockwise.dm +++ b/code/modules/effects/maze_generation/maze_generator_blockwise.dm @@ -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 diff --git a/code/modules/effects/sparks/procs.dm b/code/modules/effects/sparks/procs.dm index 311c4701569..a22f5d1751c 100644 --- a/code/modules/effects/sparks/procs.dm +++ b/code/modules/effects/sparks/procs.dm @@ -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 diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index 4b6687aacbd..3ba7b947bb1 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -21,7 +21,7 @@ for(var/n in 1 to severity) waves += rand(5,15) - start_side = pick(GLOB.cardinal) + start_side = pick(GLOB.cardinals) endWhen = worst_case_end() /datum/event/meteor_wave/announce() diff --git a/code/modules/heavy_vehicle/mech_interaction.dm b/code/modules/heavy_vehicle/mech_interaction.dm index ce6475a7284..30b795198d5 100644 --- a/code/modules/heavy_vehicle/mech_interaction.dm +++ b/code/modules/heavy_vehicle/mech_interaction.dm @@ -271,7 +271,7 @@ return if(hallucination >= EMP_MOVE_DISRUPT && prob(30)) - direction = pick(GLOB.cardinal) + direction = pick(GLOB.cardinals) var/do_strafe = !isnull(user.facing_dir) && (legs.turn_delay <= legs.move_delay) if(!do_strafe && dir != direction) diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 801eeb81749..d4a4fe24872 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -208,7 +208,7 @@ var/direction = 16 - for(var/wallDir in GLOB.cardinal) + for(var/wallDir in GLOB.cardinals) var/turf/newTurf = get_step(T,wallDir) if(newTurf.density) direction |= wallDir diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index 3427ba5a687..634f4763fa6 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -2,7 +2,7 @@ /obj/effect/plant/proc/get_cardinal_neighbors() var/list/cardinal_neighbors = list() - for(var/check_dir in GLOB.cardinal) + for(var/check_dir in GLOB.cardinals) var/turf/simulated/T = get_step(get_turf(src), check_dir) if(istype(T)) cardinal_neighbors |= T diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index 7854826d5c5..07873db530d 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -83,5 +83,5 @@ //entangling people if(victim.loc == src.loc) buckle(victim) - victim.set_dir(pick(GLOB.cardinal)) + victim.set_dir(pick(GLOB.cardinals)) to_chat(victim, SPAN_DANGER("Tendrils tighten around you!")) diff --git a/code/modules/integrated_electronics/core/assemblies/generic.dm b/code/modules/integrated_electronics/core/assemblies/generic.dm index 826b9b8814c..f1c100b13ec 100644 --- a/code/modules/integrated_electronics/core/assemblies/generic.dm +++ b/code/modules/integrated_electronics/core/assemblies/generic.dm @@ -195,7 +195,7 @@ if(get_dist(on_wall,user) > 1) return var/ndir = get_dir(on_wall, user) - if(!(ndir in GLOB.cardinal)) + if(!(ndir in GLOB.cardinals)) return var/turf/T = get_turf(user) if(!istype(T, /turf/simulated/floor)) diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 9095933fdaa..59a1b507f5a 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -69,7 +69,7 @@ attack_message = "[A] attempted to strike [D], but missed!" else attack_message = "[A] attempted to strike [D], but [D.get_pronoun("he")] rolled out of the way!" - D.set_dir(pick(GLOB.cardinal)) + D.set_dir(pick(GLOB.cardinals)) miss_type = 1 if(!miss_type && block) diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 7030cbc7d89..cc6bf09f05d 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -555,7 +555,7 @@ return 1 // Get data for building windows here. - var/list/possible_directions = GLOB.cardinal.Copy() + var/list/possible_directions = GLOB.cardinals.Copy() var/window_count = 0 for (var/obj/structure/window/check_window in user.loc) window_count++ diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 350cbbb2864..ac92d1b84d4 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -556,7 +556,7 @@ return ..() /obj/machinery/mining/brace/proc/connect() - for(var/angle in GLOB.cardinal) // make it face any drill in GLOB.cardinal direction from it + for(var/angle in GLOB.cardinals) // make it face any drill in GLOB.cardinals direction from it var/obj/machinery/mining/drill/D = locate() in get_step(src, angle) if(D) src.dir = angle diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index a7aef506608..2f850e9a4e6 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -355,19 +355,19 @@ GLOBAL_LIST_EMPTY_TYPED(alloy_data, /datum/alloy) . = ..() //Locate our output and input machinery. - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/input_spot = locate(/obj/machinery/mineral/input, get_step(src, dir)) if(input_spot) input = get_turf(input_spot) // thought of qdeling the spots here, but it's useful when rebuilding a destroyed machine break - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/output_spot = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(output) output = get_turf(output_spot) break if(!input) - input = get_step(src, GLOB.reverse_dir[dir]) + input = get_step(src, REVERSE_DIR(dir)) if(!output) output = get_step(src, dir) diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index bfd995b7cc8..d52c3d0dd3e 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -143,19 +143,19 @@ stack_paths[stacktype] = capitalize(initial(S.name)) //Locate our output and input machinery. - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/input_spot = locate(/obj/machinery/mineral/input, get_step(src, dir)) if(input_spot) input = get_turf(input_spot) // thought of qdeling the spots here, but it's useful when rebuilding a destroyed machine break - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/output_spot = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(output) output = get_turf(output_spot) break if(!input) - input = get_step(src, GLOB.reverse_dir[dir]) + input = get_step(src, REVERSE_DIR(dir)) if(!output) output = get_step(src, dir) diff --git a/code/modules/mining/machine_unloading.dm b/code/modules/mining/machine_unloading.dm index e268dc82e63..da251c92bec 100644 --- a/code/modules/mining/machine_unloading.dm +++ b/code/modules/mining/machine_unloading.dm @@ -22,19 +22,19 @@ . = ..() //Locate our output and input machinery. - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/input_spot = locate(/obj/machinery/mineral/input, get_step(src, dir)) if(input_spot) input = get_turf(input_spot) // thought of qdeling the spots here, but it's useful when rebuilding a destroyed machine break - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/output_spot = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(output) output = get_turf(output_spot) break if(!input) - input = get_step(src, GLOB.reverse_dir[dir]) + input = get_step(src, REVERSE_DIR(dir)) if(!output) output = get_step(src, dir) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index fa96da9b11d..352503df3fa 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -488,13 +488,13 @@ qdel(src) return updateOverlays() - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/obj/structure/track/R = locate(/obj/structure/track, get_step(src, dir)) if(R) R.updateOverlays() /obj/structure/track/Destroy() - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/obj/structure/track/R = locate(/obj/structure/track, get_step(src, dir)) if(R) R.updateOverlays() @@ -527,7 +527,7 @@ var/dir_sum = 0 - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(locate(/obj/structure/track, get_step(src, direction))) dir_sum += direction diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index 06dcb4e0c5e..a199ee57d1d 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -22,11 +22,11 @@ /obj/machinery/mineral/mint/Initialize() . = ..() - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) if(src.input) break - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(src.output) break diff --git a/code/modules/mob/abstract/freelook/blueprints/blueprints.dm b/code/modules/mob/abstract/freelook/blueprints/blueprints.dm index c11232db994..cc3a456ebc7 100644 --- a/code/modules/mob/abstract/freelook/blueprints/blueprints.dm +++ b/code/modules/mob/abstract/freelook/blueprints/blueprints.dm @@ -202,7 +202,7 @@ break var/turf/T = pending_turfs[1] pending_turfs -= T - for(var/dir in GLOB.cardinal) // Floodfill to find all turfs contiguous with the randomly chosen start_turf. + for(var/dir in GLOB.cardinals) // Floodfill to find all turfs contiguous with the randomly chosen start_turf. var/turf/NT = get_step(T, dir) if(!isturf(NT) || !(NT in selected_turfs) || (NT in pending_turfs) || (NT in checked_turfs)) continue diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 0d9890bd4a3..75a2fa656b5 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -229,7 +229,7 @@ attack_message = "[H] attempted to strike [src], but missed!" else attack_message = "[H] attempted to strike [src], but [src.get_pronoun("he")] rolled out of the way!" - src.set_dir(pick(GLOB.cardinal)) + src.set_dir(pick(GLOB.cardinals)) miss_type = 1 if(!miss_type && block) @@ -380,7 +380,7 @@ problem_railing = R break for(var/obj/structure/railing/R in get_step(T, dir)) - if(R.dir == GLOB.reverse_dir[dir]) + if(R.dir == REVERSE_DIR(dir)) problem_railing = R same_loc = TRUE break diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index b214c45956d..3c36b009ebb 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -752,7 +752,7 @@ if(length(trail_info)) var/track_path = trail_info["footprint_type"] T.add_tracks(track_path ? track_path : H.species.get_move_trail(H), trail_info["footprint_DNA"], H.dir, 0, trail_info["footprint_color"]) // Coming - var/turf/simulated/from = get_step(H, reverse_direction(H.dir)) + var/turf/simulated/from = get_step(H, REVERSE_DIR(H.dir)) if(istype(from)) from.add_tracks(track_path ? track_path : H.species.get_move_trail(H), trail_info["footprint_DNA"], 0, H.dir, trail_info["footprint_color"]) // Going diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index 8059aec55b2..50de0045f96 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -58,7 +58,7 @@ return if(prob(33) && H.canmove && isturf(H.loc) && !H.pulledby) //won't move if being pulled - step(H, pick(GLOB.cardinal)) + step(H, pick(GLOB.cardinals)) if(prob(1)) H.emote(pick("scratch","jump","roll","tail")) diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index 9ac8ca359f7..152e4aa6537 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -97,7 +97,7 @@ GLOBAL_LIST_EMPTY(sparring_attack_cache) else target.visible_message(SPAN_DANGER("[target] slams into [T]!")) if(prob(50)) - target.set_dir(GLOB.reverse_dir[target.dir]) + target.set_dir(REVERSE_DIR(target.dir)) target.apply_effect(attack_damage * 0.4, WEAKEN, armor) if(BP_GROIN) if(pain_message) diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index 0c02418339b..2a76dd17266 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -267,13 +267,13 @@ if(holding_still) holding_still = max(holding_still - 1 - hungry, 0) else if(canmove && !pulledby && !length(grabbed_by) && isturf(loc) && prob(50)) - step(src, pick(GLOB.cardinal)) + step(src, pick(GLOB.cardinals)) else if(holding_still) holding_still = max(holding_still - 1, 0) else if(canmove && !pulledby && !length(grabbed_by) && isturf(loc) && prob(33)) - step(src, pick(GLOB.cardinal)) + step(src, pick(GLOB.cardinals)) /mob/living/carbon/slime/proc/handle_AI() // the master AI process if(victim?.stat & DEAD) diff --git a/code/modules/mob/living/simple_animal/bees.dm b/code/modules/mob/living/simple_animal/bees.dm index 9bbb6fbab65..d2f4a245158 100644 --- a/code/modules/mob/living/simple_animal/bees.dm +++ b/code/modules/mob/living/simple_animal/bees.dm @@ -187,7 +187,7 @@ if(strength <= 0) qdel(src) return - var/turf/simulated/floor/T = get_step(src, pick(GLOB.cardinal)) + var/turf/simulated/floor/T = get_step(src, pick(GLOB.cardinals)) if(istype(T)) Move(T) break diff --git a/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_beacon.dm b/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_beacon.dm index 249651bfdf2..a691f9dc5b9 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_beacon.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_beacon.dm @@ -294,7 +294,7 @@ latest_child = new /mob/living/simple_animal/hostile/hivebot/bomber(Destination, src) if(GUARDIAN) Destination = null - for(var/check_dir in GLOB.cardinal) + for(var/check_dir in GLOB.cardinals) var/turf/T = get_step(src, check_dir) if(turf_clear(T)) Destination = T diff --git a/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_harvester.dm b/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_harvester.dm index 90efd9535f6..202b3d1302b 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_harvester.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebots/hivebot_harvester.dm @@ -236,7 +236,7 @@ var/turf/T if((!last_prospect_target) || (last_prospect_loc != src.loc)) - destination = pick(GLOB.cardinal) + destination = pick(GLOB.cardinals) T = get_step(src, destination) last_prospect_target = T last_prospect_loc = src.loc @@ -297,7 +297,7 @@ if(istype(O, /obj/structure/window)) var/dir = get_dir(T,src.loc) var/obj/structure/window/W = O - if(W.dir == GLOB.reverse_dir[dir]) + if(W.dir == REVERSE_DIR(dir)) W.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext) else W.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 2213eda7cf4..5a4cee9e213 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -385,7 +385,7 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile) return FALSE if(prob(break_stuff_probability) || bypass_prob) //bypass_prob is used to make mob destroy things in the way to our target - for(var/card_dir in GLOB.cardinal) // North, South, East, West + for(var/card_dir in GLOB.cardinals) // North, South, East, West var/turf/target_turf = get_step(src, card_dir) var/obj/found_obj = locate(/obj/effect/energy_field) in target_turf @@ -401,7 +401,7 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile) found_obj = locate(/obj/structure/window) in target_turf if(found_obj) - if((found_obj.atom_flags & ATOM_FLAG_CHECKS_BORDER) && found_obj.dir != GLOB.reverse_dir[card_dir]) + if((found_obj.atom_flags & ATOM_FLAG_CHECKS_BORDER) && found_obj.dir != REVERSE_DIR(card_dir)) continue found_obj.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), attacktext, TRUE) hostile_last_attack = world.time diff --git a/code/modules/mob/living/simple_animal/hostile/toy/mech.dm b/code/modules/mob/living/simple_animal/hostile/toy/mech.dm index ea78d5caa79..a3d0d1e466f 100644 --- a/code/modules/mob/living/simple_animal/hostile/toy/mech.dm +++ b/code/modules/mob/living/simple_animal/hostile/toy/mech.dm @@ -60,7 +60,7 @@ if(1) rival.forceMove(loc) visible_message("[src] lifts \the [rival] over its head and slams them down into the ground behind them!") - rival.throw_at(get_step(src, GLOB.reverse_dir[dir]), 1, 3, src, TRUE) + rival.throw_at(get_step(src, REVERSE_DIR(dir)), 1, 3, src, TRUE) playsound(loc, 'sound/effects/bang.ogg', 50, 1) rival.apply_damage(2, DAMAGE_BRUTE) if(2) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index cb5bf7425ef..5feda553fa8 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -364,7 +364,7 @@ //Wander around aimlessly. This will help keep the loops from searches down //and possibly move the mob into a new are in view of something they can use if(prob(90)) - step(src, pick(GLOB.cardinal)) + step(src, pick(GLOB.cardinals)) return if(!held_item && !parrot_perch) //If we've got nothing to do.. look for something to do. diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index ed639f27c96..98a544da6e6 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -360,7 +360,7 @@ move_delay = (old_move_delay + world.tick_lag > world.time) ? old_move_delay : world.time //drunk driving if(mob.confused && prob(25)) - direct = pick(GLOB.cardinal) + direct = pick(GLOB.cardinals) return mob.buckled_to.relaymove(mob,direct) //TODO: Fuck wheelchairs. @@ -376,7 +376,7 @@ min_move_delay = driver.min_walk_delay //drunk wheelchair driving if(mob.confused && prob(25)) - direct = pick(GLOB.cardinal) + direct = pick(GLOB.cardinals) move_delay += max((mob.movement_delay() + GLOB.config.walk_speed) * GLOB.config.walk_delay_multiplier, min_move_delay) return mob.buckled_to.relaymove(mob,direct) @@ -432,13 +432,13 @@ step(G.affecting, get_dir(G.affecting.loc, mob.loc)) if(mob.confused && prob(25) && mob.m_intent == M_RUN) - step(mob, pick(GLOB.cardinal)) + step(mob, pick(GLOB.cardinals)) else . = mob.SelfMove(new_loc, direct) for (var/obj/item/grab/G in list(mob.l_hand, mob.r_hand)) if (G.state == GRAB_NECK) - mob.set_dir(GLOB.reverse_dir[direct]) + mob.set_dir(REVERSE_DIR(direct)) G.adjust_position() for (var/obj/item/grab/G in mob.grabbed_by) diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm index 5a1271ac783..10f393dc76e 100644 --- a/code/modules/multiz/pipes.dm +++ b/code/modules/multiz/pipes.dm @@ -156,7 +156,7 @@ normalize_dir() var/node1_dir - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction @@ -200,7 +200,7 @@ normalize_dir() var/node1_dir - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) if(direction&initialize_directions) if (!node1_dir) node1_dir = direction diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 2b9ed7e40a6..70f205bcf91 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -258,7 +258,7 @@ var/obj/structure/stairs/staircase = locate() in target var/target_dir = get_dir(mover, target) - if(!staircase && (target_dir != dir && target_dir != GLOB.reverse_dir[dir])) + if(!staircase && (target_dir != dir && target_dir != REVERSE_DIR(dir))) INVOKE_ASYNC(src, PROC_REF(mob_fall), mover) return ..() @@ -437,7 +437,7 @@ return TRUE if(mover.throwing) return TRUE - if(get_dir(mover, target) == GLOB.reverse_dir[dir]) + if(get_dir(mover, target) == REVERSE_DIR(dir)) return FALSE if(height && (mover.dir == dir)) return FALSE @@ -446,7 +446,7 @@ /obj/structure/platform/CheckExit(var/atom/movable/O, var/turf/target) if(istype(O) && CanPass(O, target)) return TRUE - if(get_dir(O, target) == GLOB.reverse_dir[dir]) + if(get_dir(O, target) == REVERSE_DIR(dir)) return FALSE return TRUE @@ -456,7 +456,7 @@ /// If the user is on the same turf as the platform, we're trying to go past it, so we need to use reverse_dir. /// Otherwise, use our own turf. var/same_turf = get_turf(user) == get_turf(src) - var/turf/next_turf = get_step(src, same_turf ? GLOB.reverse_dir[dir] : 0) + var/turf/next_turf = get_step(src, same_turf ? REVERSE_DIR(dir) : 0) if(istype(next_turf) && !next_turf.density && can_climb(user)) var/climb_text = same_turf ? "over" : "down" LAZYADD(climbers, user) diff --git a/code/modules/overmap/_defines.dm b/code/modules/overmap/_defines.dm index 68deea23e53..7522a8e5b14 100644 --- a/code/modules/overmap/_defines.dm +++ b/code/modules/overmap/_defines.dm @@ -78,6 +78,6 @@ var/list/moving_levels = list() T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]" for(var/atom/movable/AM in T) if (AM.simulated && !AM.anchored) - AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1) + AM.throw_at(get_step(T,REVERSE_DIR(direction)), 5, 1) CHECK_TICK CHECK_TICK diff --git a/code/modules/overmap/exoplanets/decor/_turfs.dm b/code/modules/overmap/exoplanets/decor/_turfs.dm index 469cf544017..ba788eb7ff2 100644 --- a/code/modules/overmap/exoplanets/decor/_turfs.dm +++ b/code/modules/overmap/exoplanets/decor/_turfs.dm @@ -80,7 +80,7 @@ AddOverlays(resource_indicator) if(LAZYLEN(decals)) AddOverlays(decals) - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) var/turf/turf_to_check = get_step(src,direction) if(!istype(turf_to_check, type)) var/image/rock_side = image(icon, "edge[pick(0,1,2)]", dir = turn(direction, 180)) diff --git a/code/modules/overmap/exoplanets/decor/flora/desert.dm b/code/modules/overmap/exoplanets/decor/flora/desert.dm index c267b74f5a2..a0cad5a4ab3 100644 --- a/code/modules/overmap/exoplanets/decor/flora/desert.dm +++ b/code/modules/overmap/exoplanets/decor/flora/desert.dm @@ -51,5 +51,5 @@ icon_state = "drift" /obj/effect/floor_decal/dune/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state) - supplied_dir = pick(GLOB.cardinal) + supplied_dir = pick(GLOB.cardinals) . = ..() diff --git a/code/modules/overmap/exoplanets/themes/_theme.dm b/code/modules/overmap/exoplanets/themes/_theme.dm index c7edfffa78f..402d5ad63df 100644 --- a/code/modules/overmap/exoplanets/themes/_theme.dm +++ b/code/modules/overmap/exoplanets/themes/_theme.dm @@ -270,7 +270,7 @@ gen_turf.resources[ORE_SAND] = rand(3, 5) gen_turf.resources[ORE_COAL] = rand(3, 5) if(ground_resources_roll) - var/image/resource_indicator = image('icons/obj/mining.dmi', null, "indicator_" + ground_resources_roll, gen_turf.layer, pick(GLOB.cardinal)) + var/image/resource_indicator = image('icons/obj/mining.dmi', null, "indicator_" + ground_resources_roll, gen_turf.layer, pick(GLOB.cardinals)) resource_indicator.alpha = rand(30, 60) gen_turf.resource_indicator = resource_indicator if(!gen_turf.density) diff --git a/code/modules/overmap/overmap_shuttle.dm b/code/modules/overmap/overmap_shuttle.dm index a5afbe883c2..42ae3ea0c8e 100644 --- a/code/modules/overmap/overmap_shuttle.dm +++ b/code/modules/overmap/overmap_shuttle.dm @@ -310,7 +310,7 @@ to_chat(user, SPAN_WARNING("You must be in the same area as the target location to attach \the [src]!")) return var/placement_dir = get_dir(user, A) - if (!(placement_dir in GLOB.cardinal)) + if (!(placement_dir in GLOB.cardinals)) to_chat(user, SPAN_WARNING("You must stand directly in front of the location you wish to place that on.")) return diff --git a/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm b/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm index b207c6da02c..b5bade22101 100644 --- a/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm +++ b/code/modules/overmap/ship_weaponry/projectiles/_overmap_projectiles.dm @@ -119,7 +119,7 @@ qdel(ammunition.original_projectile) //No longer needed. ammunition.original_projectile = widowmaker widowmaker.primed = TRUE - var/turf/entry_turf_initial = get_ranged_target_turf(entry_target, GLOB.reverse_dir[entry_target.dir], 20) + var/turf/entry_turf_initial = get_ranged_target_turf(entry_target, REVERSE_DIR(entry_target.dir), 20) var/entry_dir_choice = (dir & NORTH) || (dir & SOUTH) ? list(EAST, WEST) : list(NORTH, SOUTH) var/turf/entry_turf = get_ranged_target_turf(entry_turf_initial, entry_dir_choice, 5) widowmaker.forceMove(entry_turf) diff --git a/code/modules/overmap/ships/engines/gas_thruster.dm b/code/modules/overmap/ships/engines/gas_thruster.dm index da18d6621e2..139eede6429 100644 --- a/code/modules/overmap/ships/engines/gas_thruster.dm +++ b/code/modules/overmap/ships/engines/gas_thruster.dm @@ -197,7 +197,7 @@ /obj/machinery/atmospherics/unary/engine/proc/check_blockage() blockage = FALSE - var/exhaust_dir = reverse_direction(dir) + var/exhaust_dir = REVERSE_DIR(dir) var/turf/A = get_turf(src) for(var/i in 1 to exhaust_offset) A = get_step(A, exhaust_dir) @@ -235,7 +235,7 @@ if(network) network.update = 1 - var/exhaust_dir = reverse_direction(dir) + var/exhaust_dir = REVERSE_DIR(dir) var/turf/T = get_turf(src) for(var/i in 1 to exhaust_offset) T = get_step(T, exhaust_dir) diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index 2a52692d995..c2d510085d5 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -1,7 +1,7 @@ //like orange but only checks north/south/east/west for one step /proc/cardinalrange(var/center) var/list/things = list() - for(var/direction in GLOB.cardinal) + for(var/direction in GLOB.cardinals) var/turf/T = get_step(center, direction) if(!T) continue @@ -138,7 +138,7 @@ coredirs |= direction // Detect cores, shielding, and control boxen. - if(direction in GLOB.cardinal) + if(direction in GLOB.cardinals) if(istype(machine, /obj/machinery/am_shielding)) var/obj/machinery/am_shielding/AMS = machine if(AMS.control_unit == control_unit) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 92e11a2b567..108294606f5 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -397,7 +397,7 @@ By design, d1 is the smallest direction and d2 is the highest for(var/cable_dir in list(d1, d2)) if(cable_dir == 11 || cable_dir == 12 || cable_dir == 0) continue - var/reverse = GLOB.reverse_dir[cable_dir] + var/reverse = REVERSE_DIR(cable_dir) T = get_step(src, cable_dir) if(T) for(var/obj/structure/cable/C in T) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index cbed3b953a1..8b7cc465235 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -115,7 +115,7 @@ var/cdir var/turf/T - for(var/card in GLOB.cardinal) + for(var/card in GLOB.cardinals) T = get_step(loc,card) cdir = get_dir(T,loc) @@ -134,7 +134,7 @@ var/cdir var/turf/T - for(var/card in GLOB.cardinal) + for(var/card in GLOB.cardinals) T = get_step(loc,card) cdir = get_dir(T,loc) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index cd88fe50224..2e33dd21613 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -106,7 +106,7 @@ connect_to_network() dir_loop: - for(var/d in GLOB.cardinal) + for(var/d in GLOB.cardinals) var/turf/T = get_step(src, d) for(var/obj/machinery/power/terminal/term in T) if(term && term.dir == turn(d, 180)) @@ -314,7 +314,7 @@ tempDir = EAST if (NORTHWEST, SOUTHWEST) tempDir = WEST - var/turf/tempLoc = get_step(src, reverse_direction(tempDir)) + var/turf/tempLoc = get_step(src, REVERSE_DIR(tempDir)) if (istype(tempLoc, /turf/space)) to_chat(user, SPAN_WARNING("You can't build a terminal on space.")) return 1 diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index b4bd7a67621..20012905d24 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -505,7 +505,7 @@ if(H.mob_size <10) H.visible_message(SPAN_WARNING("\The [src] flies out of \the [H]'s' hand!"), SPAN_WARNING("\The [src] flies out of your hand!")) H.drop_item(src) - src.throw_at(get_edge_target_turf(src, GLOB.reverse_dir[H.dir]), 4, 4) + src.throw_at(get_edge_target_turf(src, REVERSE_DIR(H.dir)), 4, 4) var/obj/item/organ/external/LH = H.get_organ(BP_L_HAND) var/obj/item/organ/external/RH = H.get_organ(BP_R_HAND) diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 53dedf75828..2f07dd8224c 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -88,7 +88,7 @@ if(H.mob_size <10) H.visible_message(SPAN_WARNING("\The [src] flies out of \the [H]'s' hand!"), SPAN_WARNING("\The [src] flies out of your hand!")) H.drop_item(src) - src.throw_at(get_edge_target_turf(src, GLOB.reverse_dir[H.dir]), 2, 2) + src.throw_at(get_edge_target_turf(src, REVERSE_DIR(H.dir)), 2, 2) /obj/item/gun/projectile/revolver/detective name = "antique revolver" diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index c1975d7b4ab..d92774ba305 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -367,7 +367,7 @@ if(H.mob_size <10) H.visible_message(SPAN_WARNING("\The [src] flies out of \the [H]'s' hand!"), SPAN_WARNING("\The [src] flies out of your hand!")) H.drop_item(src) - src.throw_at(get_edge_target_turf(src, GLOB.reverse_dir[H.dir]), 4, 4) + src.throw_at(get_edge_target_turf(src, REVERSE_DIR(H.dir)), 4, 4) var/obj/item/organ/external/LH = H.get_organ(BP_L_HAND) var/obj/item/organ/external/RH = H.get_organ(BP_R_HAND) diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index 2323870da2c..97640024aed 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -129,7 +129,7 @@ if(H.mob_size < 10 && !has_online_rig) // smaller than an unathi H.visible_message(SPAN_WARNING("\The [src] goes flying out of \the [H]'s hand!"), SPAN_WARNING("\The [src] flies out of your hand!")) H.drop_item(src) - src.throw_at(get_edge_target_turf(src, GLOB.reverse_dir[H.dir]), 3, 3) + src.throw_at(get_edge_target_turf(src, REVERSE_DIR(H.dir)), 3, 3) var/obj/item/organ/external/LH = H.get_organ(BP_L_HAND) var/obj/item/organ/external/RH = H.get_organ(BP_R_HAND) diff --git a/code/modules/psionics/abilities/warp.dm b/code/modules/psionics/abilities/warp.dm index d1cf87ccf4d..aa380114ebc 100644 --- a/code/modules/psionics/abilities/warp.dm +++ b/code/modules/psionics/abilities/warp.dm @@ -39,7 +39,7 @@ visible_message(SPAN_NOTICE("[user] rests a hand on \the [hit_atom].")) busy = TRUE - spark(our_turf, 3, GLOB.cardinal) + spark(our_turf, 3, GLOB.cardinals) while(i) checked_turf = get_step(checked_turf, direction) //Advance in the given direction diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 1c945503971..f9e4f6d4524 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -341,7 +341,7 @@ ABSTRACT_TYPE(/singleton/reagent/alcohol) /singleton/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) if(M.canmove && !M.restrained() && !(istype(M.loc, /turf/space))) - step(M, pick(GLOB.cardinal)) + step(M, pick(GLOB.cardinals)) if(prob(5) && ishuman(M)) M.emote(pick("twitch", "drool", "moan")) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm index a37abea81fc..73be16b936b 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm @@ -65,7 +65,7 @@ if(power > 20) var/probmod = 5 + (power-20) if(prob(probmod) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) - step(M, pick(GLOB.cardinal)) + step(M, pick(GLOB.cardinals)) if(prob(7)) M.emote(pick("smile","giggle","moan","yawn","laugh","drool","twitch")) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index bcc05ed60ea..9263c348b58 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -319,7 +319,7 @@ if(!proximity || !istype(A, /turf/simulated/floor) || istype(A, /area/shuttle) || user.incapacitated()) return var/cdir = get_dir(A, user) - if(!(cdir in GLOB.cardinal) || A == user.loc) + if(!(cdir in GLOB.cardinals) || A == user.loc) return for(var/obj/machinery/conveyor/CB in A) if(CB.dir == cdir || CB.dir == turn(cdir,180)) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 2eaa608bb6a..ec7a6478e94 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -930,7 +930,7 @@ // remains : set to leave broken pipe pieces in place /obj/structure/disposalpipe/proc/broken(var/remains = 0) if(remains) - for(var/D in GLOB.cardinal) + for(var/D in GLOB.cardinals) if(D & dpdir) var/obj/structure/disposalpipe/broken/P = new(src.loc) P.set_dir(D) diff --git a/code/modules/shieldgen/shieldwallgen.dm b/code/modules/shieldgen/shieldwallgen.dm index c456b3a8b33..3f546f18ef9 100644 --- a/code/modules/shieldgen/shieldwallgen.dm +++ b/code/modules/shieldgen/shieldwallgen.dm @@ -117,7 +117,7 @@ if(!NSEW)//Make sure its ran right return - oNSEW = reverse_direction(NSEW) + oNSEW = REVERSE_DIR(NSEW) for(var/dist = 0, dist <= 9, dist++) // checks out to 8 tiles away for another generator T = get_step(T2, NSEW) diff --git a/code/modules/spell_system/artifacts/items/poppet.dm b/code/modules/spell_system/artifacts/items/poppet.dm index d30b764e8f1..3bba3855fcc 100644 --- a/code/modules/spell_system/artifacts/items/poppet.dm +++ b/code/modules/spell_system/artifacts/items/poppet.dm @@ -54,7 +54,7 @@ if(target_zone == BP_R_LEG || target_zone == BP_L_LEG) to_chat(user, SPAN_NOTICE("You move \the [src]'s legs around.")) if(H.canmove && !H.restrained() && !(istype(H.loc, /turf/space))) - step(H, pick(GLOB.cardinal)) + step(H, pick(GLOB.cardinals)) if(target_zone == BP_L_HAND || target_zone == BP_L_ARM) to_chat(user, SPAN_NOTICE("You twist \the [src]'s left arm.")) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index f1a7fa6e593..b9b48a3e4b7 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -373,7 +373,7 @@ for(var/D in list(NORTH, SOUTH, EAST, WEST) - blocked_dirs) var/turf/T = get_step(src, D) for(var/obj/structure/window/W in T) - if(W.is_fulltile() || W.dir == GLOB.reverse_dir[D]) + if(W.is_fulltile() || W.dir == REVERSE_DIR(D)) blocked_dirs |= D break else @@ -384,7 +384,7 @@ var/turf/T = get_step(src, D) for(var/obj/structure/window/W in T) - if(W.is_fulltile() || W.dir & GLOB.reverse_dir[D]) + if(W.is_fulltile() || W.dir & REVERSE_DIR(D)) blocked_dirs |= D break diff --git a/code/modules/turbolift/turbolift_door.dm b/code/modules/turbolift/turbolift_door.dm index 34461d209cd..ed09ce62326 100644 --- a/code/modules/turbolift/turbolift_door.dm +++ b/code/modules/turbolift/turbolift_door.dm @@ -33,7 +33,7 @@ for(var/mob/living/LM in turf) if(LM.mob_size <= MOB_TINY) var/moved = 0 - for(dir in shuffle(GLOB.cardinal.Copy())) + for(dir in shuffle(GLOB.cardinals.Copy())) var/dest = get_step(LM,dir) if(!(locate(/obj/machinery/door/airlock/lift) in dest)) if(LM.Move(dest)) diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 929b8e3645c..aad45dc7799 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -242,7 +242,7 @@ return 0 if(is_train_head()) - if(direction == reverse_direction(dir) && tow) + if(direction == REVERSE_DIR(dir) && tow) //Allow the engine to rotate, but only if there's not another piece in the new direction //Basically, to allow the first rotation at spawn to align with the rest of the convoy, without it being a CBT if(!(locate(/obj/vehicle/train) in get_step(src, direction))) diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index fa5e3d332bd..59114bfac3c 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -177,7 +177,7 @@ if(dir == T_dir) //if car is ahead src.attach_to(T, user) - else if(reverse_direction(dir) == T_dir) //else if car is behind + else if(REVERSE_DIR(dir) == T_dir) //else if car is behind T.attach_to(src, user) //returns 1 if this is the lead car of the train diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 4d6a385be69..056afc6d0d0 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -167,7 +167,7 @@ pulse2.icon_state = "empdisable" pulse2.name = "emp sparks" pulse2.anchored = 1 - pulse2.set_dir(pick(GLOB.cardinal)) + pulse2.set_dir(pick(GLOB.cardinals)) QDEL_IN(pulse2, 10) if(on) diff --git a/code/modules/weather/weather_effects.dm b/code/modules/weather/weather_effects.dm index 8261c3dc5c8..f1b934fde2f 100644 --- a/code/modules/weather/weather_effects.dm +++ b/code/modules/weather/weather_effects.dm @@ -12,7 +12,7 @@ return -(round(current_wind_strength * 0.5)) // Never spit into the wind. - var/reversed_wind = GLOB.reverse_dir[wind_direction] + var/reversed_wind = REVERSE_DIR(wind_direction) if(reversed_wind == travel_dir) return current_wind_strength if(travel_dir & reversed_wind) diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index f749e262624..32e7b00bb9a 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -235,7 +235,7 @@ next_turf: for(var/turf/T in world) - for(var/dir in GLOB.cardinal) + for(var/dir in GLOB.cardinals) var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0) for(var/obj/machinery/atmospherics/pipe in T) checks++ diff --git a/code/unit_tests/power_tests.dm b/code/unit_tests/power_tests.dm index f17277b8766..9185b3549a9 100644 --- a/code/unit_tests/power_tests.dm +++ b/code/unit_tests/power_tests.dm @@ -11,7 +11,7 @@ /datum/unit_test/roundstart_cable_connectivity/proc/get_connected_neighbours(var/obj/structure/cable/self, var/dir) var/turf/T = get_step(get_turf(self), dir) - var/reverse = GLOB.reverse_dir[dir] + var/reverse = REVERSE_DIR(dir) . = list() //can have multiple connected neighbours for a dir, e.g. Y-junctions for(var/obj/structure/cable/other in T) diff --git a/html/changelogs/fluffyghost-refactordirectionals.yml b/html/changelogs/fluffyghost-refactordirectionals.yml new file mode 100644 index 00000000000..1073d468750 --- /dev/null +++ b/html/changelogs/fluffyghost-refactordirectionals.yml @@ -0,0 +1,58 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - refactor: "Refactored directionals, ported lists of directions from TG, got rid of useless proc to get the reverse direction." diff --git a/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm b/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm index 6c83f6b56f0..6d3703b2665 100644 --- a/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm +++ b/maps/away/away_site/abandoned_industrial/abandoned_industrial_station.dmm @@ -7165,10 +7165,6 @@ d2 = 8; icon_state = "4-8" }, -/obj/structure/cable/green{ - d2 = 2; - icon_state = "0-2" - }, /obj/random/dirt_75, /obj/effect/decal/cleanable/floor_damage/random_tiled_broken, /turf/simulated/floor/airless, diff --git a/maps/away/away_site/idris_wreck/idris_wreck.dm b/maps/away/away_site/idris_wreck/idris_wreck.dm index de325275e19..f34b7c3d7a1 100644 --- a/maps/away/away_site/idris_wreck/idris_wreck.dm +++ b/maps/away/away_site/idris_wreck/idris_wreck.dm @@ -74,7 +74,7 @@ M.equip_to_slot_or_del(new /obj/item/tank/oxygen(M), slot_s_store) M.ChangeToHusk() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/effect/landmark/corpse/idris/robot name = "Idris Security Unit" @@ -88,7 +88,7 @@ /obj/effect/landmark/corpse/idris/robot/do_extra_customization(mob/living/carbon/human/M) M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) var/obj/item/organ/internal/ipc_tag/tag = M.internal_organs_by_name[BP_IPCTAG] if(istype(tag)) tag.serial_number = uppertext(dd_limittext(md5(M.real_name), 12)) @@ -106,7 +106,7 @@ /obj/effect/landmark/corpse/idris/captain/do_extra_customization(mob/living/carbon/human/M) M.ChangeToHusk() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/effect/landmark/corpse/izharshan name = "Izharshan Pirate" @@ -121,7 +121,7 @@ M.ChangeToHusk() M.equip_to_slot_or_del(new /obj/item/tank/oxygen(M), slot_s_store) M.adjustFireLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) //Areas /area/idris_wreck diff --git a/maps/away/ships/coc/gadpathur_patrol/gadpathur_patrol.dmm b/maps/away/ships/coc/gadpathur_patrol/gadpathur_patrol.dmm index 85a89bd4e81..aa9a4b06365 100644 --- a/maps/away/ships/coc/gadpathur_patrol/gadpathur_patrol.dmm +++ b/maps/away/ships/coc/gadpathur_patrol/gadpathur_patrol.dmm @@ -3757,9 +3757,6 @@ /turf/simulated/floor/carpet/rubber, /area/ship/gadpathur_patrol/ammo) "Dm" = ( -/obj/structure/cable{ - icon_state = "2-8" - }, /obj/structure/cable{ icon_state = "1-8" }, @@ -5402,7 +5399,6 @@ /obj/structure/cable/green{ icon_state = "2-8" }, -/obj/structure/cable, /turf/simulated/floor/tiled/dark/full, /area/ship/gadpathur_patrol/reactor) "QF" = ( diff --git a/maps/away/ships/konyang/konyang_wreck/konyang_wreck.dm b/maps/away/ships/konyang/konyang_wreck/konyang_wreck.dm index 9bf273f2b11..a97f5d152d3 100644 --- a/maps/away/ships/konyang/konyang_wreck/konyang_wreck.dm +++ b/maps/away/ships/konyang/konyang_wreck/konyang_wreck.dm @@ -95,7 +95,7 @@ /obj/effect/landmark/corpse/orionexpress/do_extra_customization(mob/living/carbon/human/M) M.adjustBruteLoss(rand(200,400)) M.change_skin_tone(rand(0, 100)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/effect/landmark/corpse/orionexpress/captain name = "Orion Express Captain" diff --git a/maps/away/ships/sadar_scout/sadar_scout.dmm b/maps/away/ships/sadar_scout/sadar_scout.dmm index 6ad51b8b07f..ed0c68a9fb5 100644 --- a/maps/away/ships/sadar_scout/sadar_scout.dmm +++ b/maps/away/ships/sadar_scout/sadar_scout.dmm @@ -293,21 +293,18 @@ /obj/machinery/atmospherics/pipe/simple/hidden{ dir = 4 }, -/obj/machinery/power/terminal{ - dir = 1 - }, /obj/structure/cable/yellow{ icon_state = "0-4" }, -/obj/structure/cable/yellow{ - icon_state = "1-4" - }, /obj/effect/floor_decal/industrial/loading/yellow{ dir = 4 }, /obj/structure/bed/handrail{ dir = 1 }, +/obj/machinery/power/terminal{ + dir = 1 + }, /turf/simulated/floor/tiled/dark, /area/ship/sadar_scout/solars) "cd" = ( @@ -419,19 +416,16 @@ /obj/structure/cable{ icon_state = "0-8" }, -/obj/structure/cable/yellow{ - icon_state = "1-2" - }, /obj/effect/floor_decal/industrial/warning{ dir = 10 }, -/obj/machinery/power/smes/buildable/main_engine{ - charge = 2.5e+006 - }, /obj/structure/sign/electricshock{ pixel_x = 32; pixel_y = 2 }, +/obj/machinery/power/smes/buildable/main_engine{ + charge = 2.5e+006 + }, /turf/simulated/floor/carpet/rubber, /area/ship/sadar_scout/solars) "cI" = ( @@ -632,9 +626,6 @@ /obj/machinery/atmospherics/unary/vent_scrubber/on{ dir = 8 }, -/obj/structure/cable/yellow{ - icon_state = "0-2" - }, /obj/effect/floor_decal/industrial/warning{ dir = 9 }, @@ -1429,19 +1420,16 @@ /obj/structure/cable{ icon_state = "0-4" }, -/obj/structure/cable/yellow{ - icon_state = "1-2" - }, /obj/effect/floor_decal/industrial/warning{ dir = 6 }, -/obj/machinery/power/smes/buildable/main_engine{ - charge = 2.5e+006 - }, /obj/structure/sign/electricshock{ pixel_x = -32; pixel_y = 2 }, +/obj/machinery/power/smes/buildable/main_engine{ + charge = 2.5e+006 + }, /turf/simulated/floor/carpet/rubber, /area/ship/sadar_scout/solars) "kt" = ( @@ -1559,15 +1547,9 @@ /obj/machinery/atmospherics/pipe/simple/hidden{ dir = 4 }, -/obj/machinery/power/terminal{ - dir = 1 - }, /obj/structure/cable/yellow{ icon_state = "0-8" }, -/obj/structure/cable/yellow{ - icon_state = "1-8" - }, /obj/effect/floor_decal/industrial/loading/yellow{ dir = 8 }, @@ -1575,6 +1557,9 @@ dir = 1 }, /obj/effect/decal/cleanable/dirt, +/obj/machinery/power/terminal{ + dir = 1 + }, /turf/simulated/floor/tiled/dark, /area/ship/sadar_scout/solars) "lV" = ( @@ -5629,9 +5614,6 @@ /obj/machinery/atmospherics/unary/vent_pump/on{ dir = 4 }, -/obj/structure/cable/yellow{ - icon_state = "0-2" - }, /obj/effect/floor_decal/industrial/warning{ dir = 5 }, diff --git a/maps/away/ships/sol/sol_merc/fsf_patrol_ship.dmm b/maps/away/ships/sol/sol_merc/fsf_patrol_ship.dmm index c7a3d46827c..eb71570319d 100644 --- a/maps/away/ships/sol/sol_merc/fsf_patrol_ship.dmm +++ b/maps/away/ships/sol/sol_merc/fsf_patrol_ship.dmm @@ -4665,11 +4665,13 @@ /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 4 }, -/obj/structure/cable/green, /obj/machinery/power/terminal, /obj/structure/cable/green{ icon_state = "4-8" }, +/obj/structure/cable/green{ + icon_state = "1-4" + }, /turf/simulated/floor/tiled/dark, /area/ship/fsf_patrol_ship/engineering) "qHA" = ( diff --git a/maps/random_ruins/exoplanets/adhomai/adhomai_battlefield.dm b/maps/random_ruins/exoplanets/adhomai/adhomai_battlefield.dm index 151c1dea927..4f37aae8cd5 100644 --- a/maps/random_ruins/exoplanets/adhomai/adhomai_battlefield.dm +++ b/maps/random_ruins/exoplanets/adhomai/adhomai_battlefield.dm @@ -38,7 +38,7 @@ M.change_skin_color(192, 192, 192) M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/item/photo/soldier name = "family photo" diff --git a/maps/random_ruins/exoplanets/haneunim/haneunim_crash.dm b/maps/random_ruins/exoplanets/haneunim/haneunim_crash.dm index a16c6102993..10b7f4d27a2 100644 --- a/maps/random_ruins/exoplanets/haneunim/haneunim_crash.dm +++ b/maps/random_ruins/exoplanets/haneunim/haneunim_crash.dm @@ -74,7 +74,7 @@ /obj/effect/landmark/corpse/league_smuggler/do_extra_customization(mob/living/carbon/human/M) M.change_skin_tone(rand(10, 200)) M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/item/paper/fluff/haneunim_crash name = "scrawled message" diff --git a/maps/random_ruins/exoplanets/haneunim/haneunim_refugees.dm b/maps/random_ruins/exoplanets/haneunim/haneunim_refugees.dm index 42bf430263b..7dec7c7e4b8 100644 --- a/maps/random_ruins/exoplanets/haneunim/haneunim_refugees.dm +++ b/maps/random_ruins/exoplanets/haneunim/haneunim_refugees.dm @@ -29,7 +29,7 @@ /obj/effect/landmark/corpse/ipc_refugee/do_extra_customization(mob/living/carbon/human/M) M.adjustBruteLoss(rand(200, 400)) M.adjustFireLoss(rand(100, 200)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/item/paper/fluff/haneunim_refugees name = "message" diff --git a/maps/random_ruins/exoplanets/konyang/abandoned/abandoned_village.dm b/maps/random_ruins/exoplanets/konyang/abandoned/abandoned_village.dm index 4485f8d97d0..06b4263dd0d 100644 --- a/maps/random_ruins/exoplanets/konyang/abandoned/abandoned_village.dm +++ b/maps/random_ruins/exoplanets/konyang/abandoned/abandoned_village.dm @@ -25,4 +25,4 @@ M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/hooded/wintercoat/konyang(M), slot_wear_suit) M.adjustBruteLoss(rand(200, 400)) M.change_skin_tone(rand(0, 100)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) diff --git a/maps/random_ruins/exoplanets/konyang/hivebot_burrows_1.dm b/maps/random_ruins/exoplanets/konyang/hivebot_burrows_1.dm index 21e8a15007b..2d34d137ef7 100644 --- a/maps/random_ruins/exoplanets/konyang/hivebot_burrows_1.dm +++ b/maps/random_ruins/exoplanets/konyang/hivebot_burrows_1.dm @@ -39,7 +39,7 @@ M.ChangeToHusk() M.ChangeToSkeleton() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) var/obj/item/clothing/under/U = M.w_uniform var/obj/item/clothing/accessory/storage/overalls/mining/overalls = new() diff --git a/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dm b/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dm index 09062214406..b040b57d2ac 100644 --- a/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dm +++ b/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dm @@ -49,7 +49,7 @@ M.ChangeToHusk() M.ChangeToSkeleton() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) var/obj/item/clothing/under/U = M.w_uniform var/obj/item/clothing/accessory/dressshirt/shirt = new() diff --git a/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dmm b/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dmm index dc3ae0312df..ffee71b229a 100644 --- a/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dmm +++ b/maps/random_ruins/exoplanets/konyang/hivebot_burrows_2.dmm @@ -1968,9 +1968,6 @@ /obj/machinery/power/portgen/basic{ anchored = 1 }, -/obj/structure/cable/green{ - icon_state = "4-8" - }, /obj/structure/cable{ icon_state = "0-2" }, @@ -1979,6 +1976,9 @@ /obj/machinery/light/small/emergency{ dir = 1 }, +/obj/structure/cable/green{ + icon_state = "0-4" + }, /turf/simulated/floor/tiled, /area/hivebot_burrows_2) "Ba" = ( @@ -3143,9 +3143,6 @@ /turf/simulated/floor/exoplanet/dirt_konyang/cave, /area/hivebot_burrows_2) "RE" = ( -/obj/structure/cable/green{ - icon_state = "0-4" - }, /obj/machinery/constructable_frame/temp_deco{ icon_state = "box_1" }, diff --git a/maps/random_ruins/exoplanets/moghes/moghes_dead_guwandi.dm b/maps/random_ruins/exoplanets/moghes/moghes_dead_guwandi.dm index 62a63883f7b..0706e59fecb 100644 --- a/maps/random_ruins/exoplanets/moghes/moghes_dead_guwandi.dm +++ b/maps/random_ruins/exoplanets/moghes/moghes_dead_guwandi.dm @@ -20,7 +20,7 @@ /obj/effect/landmark/corpse/moghes_dead_guwandi/do_extra_customization(mob/living/carbon/human/M) M.ChangeToHusk() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) if(M?.w_uniform) M.w_uniform.color = "#181a19" if(M?.wear_suit) @@ -48,7 +48,7 @@ /obj/effect/landmark/corpse/moghes_dead_raider/do_extra_customization(mob/living/carbon/human/M) M.ChangeToHusk() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) var/uniform_color = "[pick("#42330f", "#DBC684")]" if(M?.w_uniform) M.w_uniform.color = uniform_color diff --git a/maps/random_ruins/exoplanets/uueoaesa/kazhkz_crash.dm b/maps/random_ruins/exoplanets/uueoaesa/kazhkz_crash.dm index 639250fe5ba..1a34f0c1f72 100644 --- a/maps/random_ruins/exoplanets/uueoaesa/kazhkz_crash.dm +++ b/maps/random_ruins/exoplanets/uueoaesa/kazhkz_crash.dm @@ -74,7 +74,7 @@ /obj/effect/landmark/corpse/kazhkz_crash/do_extra_customization(mob/living/carbon/human/M) M.ChangeToHusk() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/effect/landmark/corpse/kazhkz_crash/captain corpsesuit = /obj/item/clothing/suit/space/void/mining diff --git a/maps/random_ruins/exoplanets/uueoaesa/sol_listening_post.dm b/maps/random_ruins/exoplanets/uueoaesa/sol_listening_post.dm index 775efedeb68..770131c418a 100644 --- a/maps/random_ruins/exoplanets/uueoaesa/sol_listening_post.dm +++ b/maps/random_ruins/exoplanets/uueoaesa/sol_listening_post.dm @@ -33,7 +33,7 @@ /obj/effect/landmark/corpse/sol_marine_husk/do_extra_customization(mob/living/carbon/human/M) M.ChangeToSkeleton() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/effect/landmark/corpse/sol_officer_husk name = "Decayed Solarian Officer" @@ -45,7 +45,7 @@ /obj/effect/landmark/corpse/sol_officer_husk/do_extra_customization(mob/living/carbon/human/M) M.ChangeToSkeleton() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) /obj/effect/landmark/corpse/unathi_pirate name = "Unathi Pirate" @@ -58,7 +58,7 @@ /obj/effect/landmark/corpse/unathi_pirate/do_extra_customization(mob/living/carbon/human/M) M.ChangeToSkeleton() M.adjustBruteLoss(rand(200,400)) - M.dir = pick(GLOB.cardinal) + M.dir = pick(GLOB.cardinals) if(prob(10)) M.equip_to_slot_or_del(new /obj/item/melee/energy/sword/pirate(M), slot_belt) diff --git a/maps/sccv_horizon/sccv_horizon.dmm b/maps/sccv_horizon/sccv_horizon.dmm index 95711f20489..3e5c049c703 100644 --- a/maps/sccv_horizon/sccv_horizon.dmm +++ b/maps/sccv_horizon/sccv_horizon.dmm @@ -164661,9 +164661,6 @@ /area/rnd/hallway/secondary) "ylZ" = ( /obj/machinery/door/firedoor, -/obj/structure/cable/green{ - icon_state = "4-8" - }, /obj/structure/grille, /obj/structure/window/shuttle/scc_space_ship/cardinal, /obj/structure/cable/green,