diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index ec738232081..9189c498a44 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -892,7 +892,7 @@ return //don't do an animation if attacking self var/pixel_x_diff = 0 var/pixel_y_diff = 0 - var/turn_dir = 1 + var/turn_dir = NORTH var/direction = get_dir(src, A) if(direction & NORTH) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 47e9ff18f34..98d88f18c0d 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -566,13 +566,13 @@ occupant_overlay.dir = dir occupant_overlay.layer = layer + 0.01 var/matrix/MA = matrix(transform) - if(dir == 1) + if(dir == NORTH) MA.TurnTo(0, 180) - occupant_overlay.dir = 2 // trust me - if(dir == 4) + occupant_overlay.dir = SOUTH // trust me + if(dir == EAST) MA.TurnTo(0, 270) occupant_overlay.pixel_y = -8 - if(dir == 8) + if(dir == WEST) MA.TurnTo(0 , 90) occupant_overlay.pixel_y = -8 MA.Scale(0.66, 0.66) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index e803ffa7cde..bef8145a184 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -242,13 +242,13 @@ occupant_overlay.dir = dir occupant_overlay.layer = layer + 0.01 var/matrix/MA = matrix(transform) - if(dir == 1) + if(dir == NORTH) MA.TurnTo(0, 180) - occupant_overlay.dir = 2 // trust me - if(dir == 4) + occupant_overlay.dir = SOUTH // trust me + if(dir == EAST) MA.TurnTo(0, 270) occupant_overlay.pixel_y = -8 - if(dir == 8) + if(dir == WEST) MA.TurnTo(0 , 90) occupant_overlay.pixel_y = -8 MA.Scale(0.66, 0.66) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 38a5cb014d4..aa5e4f6253f 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -639,13 +639,13 @@ occupant_overlay.dir = dir occupant_overlay.layer = layer + 0.01 var/matrix/MA = matrix(transform) - if(dir == 1) + if(dir == NORTH) MA.TurnTo(0, 180) - occupant_overlay.dir = 2 // trust me - if(dir == 4) + occupant_overlay.dir = SOUTH // trust me + if(dir == EAST) MA.TurnTo(0, 270) occupant_overlay.pixel_y = -8 - if(dir == 8) + if(dir == WEST) MA.TurnTo(0 , 90) occupant_overlay.pixel_y = -8 MA.Scale(0.66, 0.66) diff --git a/code/game/machinery/pipe/pipe_construction.dm b/code/game/machinery/pipe/pipe_construction.dm index 91afbe2e4ca..b198f30a748 100644 --- a/code/game/machinery/pipe/pipe_construction.dm +++ b/code/game/machinery/pipe/pipe_construction.dm @@ -228,11 +228,11 @@ GLOBAL_LIST_INIT(pipe_path2type, list( dir = dir | turn(dir, 90) else if(pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE)) - if(dir == 2) - dir = 1 + if(dir == SOUTH) + dir = NORTH - else if(dir == 8) - dir = 4 + else if(dir == WEST) + dir = EAST // returns all pipe's endpoints @@ -288,14 +288,14 @@ GLOBAL_LIST_INIT(pipe_path2type, list( //Helper to clean up dir /obj/item/pipe/proc/fixdir() if(pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE)) - if(dir == 2) - dir = 1 + if(dir == SOUTH) + dir = NORTH - else if(dir == 8) - dir = 4 + else if(dir == WEST) + dir = EAST else if(pipe_type in list(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W)) - dir = 2 + dir = SOUTH /obj/item/pipe/attack_self__legacy__attackchain(mob/user as mob) return rotate() diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index d6b17f43e65..ada824d0a35 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -96,7 +96,7 @@ var/newDir = pick(dirList) if(newDir == 16) floor = 1 - newDir = 1 + newDir = NORTH return newDir floor = 1 diff --git a/code/game/objects/items/storage/bible.dm b/code/game/objects/items/storage/bible.dm index cacdea1704d..8f06a4c54cb 100644 --- a/code/game/objects/items/storage/bible.dm +++ b/code/game/objects/items/storage/bible.dm @@ -154,11 +154,11 @@ /*var/carpet_dir switch(choice) if("Bible") - carpet_dir = 2 + carpet_dir = SOUTH if("Koran") - carpet_dir = 4 + carpet_dir = EAST if("Scientology") - carpet_dir = 8 + carpet_dir = WEST if(carpet_dir) for(var/area/station/service/chapel/main/A in world) for(var/turf/T in A.contents) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 6fcf11bb1e8..90a333a5229 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -172,13 +172,13 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama user.drop_item() if(P.is_bent_pipe()) // bent pipe rotation fix see construction.dm - P.dir = 5 - if(user.dir == 1) - P.dir = 6 - else if(user.dir == 2) - P.dir = 9 - else if(user.dir == 4) - P.dir = 10 + P.dir = NORTHEAST + if(user.dir == NORTH) + P.dir = SOUTHEAST + else if(user.dir == SOUTH) + P.dir = NORTHWEST + else if(user.dir == EAST) + P.dir = SOUTHWEST else P.setDir(user.dir) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index b41fffb8e8c..bd290989d0a 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -480,11 +480,11 @@ user.drop_item() if(P.is_bent_pipe()) // bent pipe rotation fix see construction.dm P.setDir(5) - if(user.dir == 1) + if(user.dir == NORTH) P.setDir(6) - else if(user.dir == 2) + else if(user.dir == SOUTH) P.setDir(9) - else if(user.dir == 4) + else if(user.dir == EAST) P.setDir(10) else P.setDir(user.dir) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 67c805b3be0..34d71a60ab9 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2850,7 +2850,7 @@ var/tmp_dir = href_list["object_dir"] var/obj_dir = tmp_dir ? text2num(tmp_dir) : 2 if(!obj_dir || !(obj_dir in list(1,2,4,8,5,6,9,10))) - obj_dir = 2 + obj_dir = SOUTH var/obj_name = sanitize(href_list["object_name"]) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 06f038f7eb3..dc6ec079f39 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -1,7 +1,7 @@ // Examples /* -- Will call the proc for all computers in the world, thats dir is 2. - CALL ex_act(1) ON /obj/machinery/computer IN world WHERE dir == 2 + CALL ex_act(1) ON /obj/machinery/computer IN world WHERE dir == SOUTH -- Will open a window with a list of all the closets in the world, with a link to VV them. SELECT /obj/structure/closet/secure_closet/security/cargo IN world WHERE icon_off == "secoff" -- Will change all the tube lights to green diff --git a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm index 3df02a323dc..d999f4d0c50 100644 --- a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm @@ -77,9 +77,9 @@ /obj/machinery/atmospherics/pipe/simple/proc/normalize_dir() if(dir==3) - dir = 1 + dir = NORTH else if(dir==12) - dir = 4 + dir = EAST /obj/machinery/atmospherics/pipe/simple/Destroy() . = ..() diff --git a/code/modules/awaymissions/mission_code/ruins/freegolems.dm b/code/modules/awaymissions/mission_code/ruins/freegolems.dm index 0b1bb84004b..cb3c58cee27 100644 --- a/code/modules/awaymissions/mission_code/ruins/freegolems.dm +++ b/code/modules/awaymissions/mission_code/ruins/freegolems.dm @@ -140,7 +140,7 @@ /obj/docking_port/mobile/free_golem name = "Free Golem Ship" - dir = 8 + dir = WEST id = "freegolem" dwidth = FREE_GOLEM_SHIP_WIDTH / 2 height = FREE_GOLEM_SHIP_HEIGHT @@ -149,7 +149,7 @@ port_direction = SOUTH /obj/docking_port/stationary/golem - dir = 8 + dir = WEST height = FREE_GOLEM_SHIP_HEIGHT width = FREE_GOLEM_SHIP_WIDTH dwidth = FREE_GOLEM_SHIP_WIDTH / 2 diff --git a/code/modules/awaymissions/mission_code/shuttle_shadow.dm b/code/modules/awaymissions/mission_code/shuttle_shadow.dm index 7202d8ba027..90117dca227 100644 --- a/code/modules/awaymissions/mission_code/shuttle_shadow.dm +++ b/code/modules/awaymissions/mission_code/shuttle_shadow.dm @@ -12,7 +12,7 @@ /obj/machinery/atmospherics/trinary/filter/shadow name = "gas filter (Co2 Outlet)" - dir = 1 + dir = NORTH filter_type = 3 target_pressure = 99999 diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 75b333a951c..5277d4dc670 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -681,9 +681,9 @@ else newdir = newdir | dir if(newdir == 3) - newdir = 1 + newdir = NORTH else if(newdir == 12) - newdir = 4 + newdir = EAST B.setDir(newdir) B.update_icon() bloodiness-- diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm b/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm index 5bc8b1275c1..440f029d36b 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate_mobs.dm @@ -407,7 +407,7 @@ return var/pixel_x_diff = 0 var/pixel_y_diff = 0 - var/turn_dir = 1 + var/turn_dir = NORTH var/direction = get_dir(src, A) if(direction & NORTH) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 551b5948ad1..fee8438f7ca 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -287,7 +287,7 @@ affecting.forceMove(assailant.loc) if(GRAB_KILL) shift = 0 - adir = 1 + adir = NORTH affecting.setDir(SOUTH)//face up affecting.forceMove(assailant.loc) diff --git a/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm b/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm index 401e7b169df..d5a814fe22d 100644 --- a/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm @@ -13,7 +13,7 @@ icon_state = "control_box" reference = "control_box" idle_power_consumption = 500 - dir = 1 + dir = NORTH var/strength_upper_limit = 2 var/interface_control = 1 var/list/obj/structure/particle_accelerator/connected_parts diff --git a/code/modules/research/xenobiology/xenobiology_organs.dm b/code/modules/research/xenobiology/xenobiology_organs.dm index 89e30ef4f99..7a577af5485 100644 --- a/code/modules/research/xenobiology/xenobiology_organs.dm +++ b/code/modules/research/xenobiology/xenobiology_organs.dm @@ -1215,7 +1215,7 @@ unbuckle_mob(M, force = TRUE) M.move_resist = INFINITY M.Stun(10 SECONDS) - M.dir = 2 + M.dir = SOUTH animate(M, pixel_y = 64, time = 2 SECONDS) addtimer(CALLBACK(src, PROC_REF(finalize_death), M), 2 SECONDS) to_chat(owner, "THE JOY! THE POWER! YOU CAN FEEL THE HONKMOTHERS SMILE! YOU CAN FEEL- oh no") diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm index 3d1604ad96a..fa0db41a167 100644 --- a/code/modules/shuttle/assault_pod.dm +++ b/code/modules/shuttle/assault_pod.dm @@ -30,7 +30,7 @@ var/dheight = 0 var/width = 7 var/height = 7 - var/lz_dir = 1 + var/lz_dir = NORTH /obj/item/assault_pod/attack_self__legacy__attackchain(mob/living/user) var/target_area diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index aa8709d884a..e8326fe610a 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -276,7 +276,7 @@ dwidth = 9 width = 22 height = 11 - dir = 4 + dir = EAST port_direction = WEST var/sound_played = 0 //If the launch sound has been sent to all players on the shuttle itself diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 08c215617c2..3d6d4cd4ff3 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -825,7 +825,7 @@ // MARK: Shuttle Ports /obj/docking_port/mobile/labour - dir = 8 + dir = WEST dwidth = 2 height = 5 id = "laborcamp" @@ -836,7 +836,7 @@ port_direction = EAST /obj/docking_port/mobile/mining - dir = 8 + dir = WEST dwidth = 3 height = 5 id = "mining" @@ -847,7 +847,7 @@ port_direction = EAST /obj/docking_port/mobile/specops - dir = 8 + dir = WEST dwidth = 2 height = 11 id = "specops" @@ -856,7 +856,7 @@ preferred_direction = EAST /obj/docking_port/mobile/sit - dir = 8 + dir = WEST dwidth = 3 height = 5 id = "sit" @@ -866,7 +866,7 @@ port_direction = WEST /obj/docking_port/mobile/sst - dir = 4 + dir = EAST dwidth = 7 height = 5 id = "sst" @@ -876,7 +876,7 @@ port_direction = EAST /obj/docking_port/mobile/admin - dir = 2 + dir = SOUTH dwidth = 8 height = 15 id = "admin" @@ -912,7 +912,7 @@ return TRUE /obj/docking_port/mobile/ferry - dir = 8 + dir = WEST dwidth = 2 height = 12 id = "ferry" @@ -930,10 +930,10 @@ /obj/docking_port/stationary/trader/centcom id = "trader_away" name = "Docking bay at trade hub" - dir = 8 + dir = WEST /obj/docking_port/mobile/trader - dir = 8 + dir = WEST dwidth = 11 height = 30 id = "trader" @@ -944,7 +944,7 @@ /obj/docking_port/mobile/nuke_ops dheight = 9 - dir = 2 + dir = SOUTH dwidth = 5 height = 22 id = "syndicate" @@ -957,7 +957,7 @@ width = 12 /obj/docking_port/mobile/whiteship - dir = 8 + dir = WEST id = "whiteship" name = "NEV Cherub" dwidth = 6 diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 49ba4100c6b..c0273af46ca 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -11,7 +11,7 @@ name = "supply shuttle" id = "supply" callTime = 2 MINUTES - dir = 8 + dir = WEST width = 12 dwidth = 5 height = 7