Renames GLOB.cardinal to GLOB.cardinals to match GLOB.diagonals and GLOB.alldirs (#1970)

This commit is contained in:
CitadelStationBot
2017-07-10 18:10:42 -05:00
committed by kevinz000
parent 5cdd069136
commit 1b70c06474
74 changed files with 113 additions and 114 deletions

View File

@@ -155,7 +155,7 @@ Actual Adjacent procs :
var/list/L = new()
var/turf/T
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
T = get_step(src,dir)
if(simulated_only && !istype(T))
continue

View File

@@ -302,7 +302,7 @@
/proc/try_move_adjacent(atom/movable/AM)
var/turf/T = get_turf(AM)
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
if(AM.Move(get_step(T, direction)))
break

View File

@@ -66,7 +66,7 @@
if(AM.can_be_unanchored && !AM.anchored)
return 0
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
AM = find_type_in_direction(A, direction)
if(AM == NULLTURF_BORDER)
if((A.smooth & SMOOTH_BORDER))

View File

@@ -3,7 +3,7 @@
#define Z_SOUTH 3
#define Z_WEST 4
GLOBAL_LIST_INIT(cardinal, list( NORTH, SOUTH, EAST, WEST ))
GLOBAL_LIST_INIT(cardinals, list(NORTH, SOUTH, EAST, WEST))
GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))

View File

@@ -89,7 +89,7 @@
A.can_be_carded = FALSE
A.requires_power = POWER_REQ_CLOCKCULT
var/list/AI_frame = list(mutable_appearance('icons/mob/clockwork_mobs.dmi', "aiframe")) //make the AI's cool frame
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
AI_frame += image('icons/mob/clockwork_mobs.dmi', A, "eye[rand(1, 10)]", dir = d) //the eyes are randomly fast or slow
A.add_overlay(AI_frame)
if(!A.lacks_power())

View File

@@ -267,7 +267,7 @@
var/list/diagonalblobs = list()
for(var/I in possibleblobs)
var/obj/structure/blob/IB = I
if(get_dir(IB, T) in GLOB.cardinal)
if(get_dir(IB, T) in GLOB.cardinals)
cardinalblobs += IB
else
diagonalblobs += IB

View File

@@ -25,7 +25,7 @@
if(Ablob.blob_allowed) //Is this area allowed for winning as blob?
GLOB.blobs_legit += src
GLOB.blobs += src //Keep track of the blob in the normal list either way
setDir(pick(GLOB.cardinal))
setDir(pick(GLOB.cardinals))
update_icon()
.= ..()
ConsumeTile()

View File

@@ -101,7 +101,7 @@
if(prob(50))
visible_message("<span class='notice'>[src][pick(idle_messages)]</span>")
else
setDir(pick(GLOB.cardinal))//Random rotation
setDir(pick(GLOB.cardinals))//Random rotation
/obj/structure/destructible/clockwork/ocular_warden/proc/acquire_nearby_targets()
. = list()

View File

@@ -64,7 +64,7 @@
for(var/I in circleviewturfs(src, round(convert_range * 0.5)))
var/turf/T = I
T.ratvar_act(TRUE)
var/dir_to_step_in = pick(GLOB.cardinal)
var/dir_to_step_in = pick(GLOB.cardinals)
var/list/meals = list()
for(var/mob/living/L in GLOB.living_mob_list) //we want to know who's alive so we don't lose and retarget a single person
if(L.z == z && !is_servant_of_ratvar(L) && L.mind)

View File

@@ -25,7 +25,7 @@
for(var/obj/structure/destructible/clockwork/taunting_trail/TT in loc)
if(TT != src)
qdel(TT)
setDir(pick(GLOB.cardinal))
setDir(pick(GLOB.cardinals))
transform = matrix()*1.3
animate(src, alpha = 100, time = 15)

View File

@@ -30,7 +30,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
var/turf/pickedgoal
var/max_i = 10//number of tries to spawn meteor.
while(!isspaceturf(pickedstart))
var/startSide = pick(GLOB.cardinal)
var/startSide = pick(GLOB.cardinals)
pickedstart = spaceDebrisStartLoc(startSide, ZLEVEL_STATION)
pickedgoal = spaceDebrisFinishLoc(startSide, ZLEVEL_STATION)
max_i--

View File

@@ -517,7 +517,7 @@
user.unset_machine()
if("r_leg","l_leg")
to_chat(user, "<span class='notice'>You move the doll's legs around.</span>")
var/turf/T = get_step(target,pick(GLOB.cardinal))
var/turf/T = get_step(target,pick(GLOB.cardinals))
target.Move(T)
if("r_arm","l_arm")
target.click_random_mob()

View File

@@ -14,7 +14,7 @@
find_table()
/obj/machinery/computer/operating/proc/find_table()
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, dir))
if(table)
table.computer = src

View File

@@ -135,7 +135,7 @@
/obj/machinery/computer/gulag_teleporter_computer/proc/findteleporter()
var/obj/machinery/gulag_teleporter/teleporterf = null
for(dir in GLOB.cardinal)
for(dir in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, dir))
if(teleporterf && teleporterf.is_operational())
return teleporterf

View File

@@ -392,7 +392,7 @@
while(time)
sleep(speed)
for(var/i in 1 to speed)
M.setDir(pick(GLOB.cardinal))
M.setDir(pick(GLOB.cardinals))
M.lay_down(TRUE)
time--

View File

@@ -234,7 +234,7 @@
req_access = list(GLOB.access_xenobiology)
/obj/machinery/shieldwallgen/Destroy()
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
cleanup_field(d)
return ..()
@@ -271,7 +271,7 @@
icon_state = "Shield_Gen +a"
if(active == ACTIVE_SETUPFIELDS)
var/fields = 0
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
if(setup_field(d))
fields++
if(fields)
@@ -281,11 +281,11 @@
"<span class='italics'>You hear heavy droning fade out.</span>")
icon_state = "Shield_Gen"
active = FALSE
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
cleanup_field(d)
else
icon_state = "Shield_Gen"
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
cleanup_field(d)
/obj/machinery/shieldwallgen/proc/setup_field(direction)

View File

@@ -130,7 +130,7 @@
return
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in range(1)
if(!recharge_port )
for(var/D in GLOB.cardinal)
for(var/D in GLOB.cardinals)
var/turf/A = get_step(src, D)
A = get_step(A, D)
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in A

View File

@@ -159,7 +159,7 @@
/obj/effect/decal/cleanable/blood/footprints/update_icon()
cut_overlays()
for(var/Ddir in GLOB.cardinal)
for(var/Ddir in GLOB.cardinals)
if(entered_dirs & Ddir)
var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"]
if(!bloodstep_overlay)

View File

@@ -60,7 +60,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
total_effects++
var/direction
if(cardinals)
direction = pick(GLOB.cardinal)
direction = pick(GLOB.cardinals)
else
direction = pick(GLOB.alldirs)
var/steps_amt = pick(1,2,3)

View File

@@ -84,7 +84,7 @@
smoke_mob(L)
var/obj/effect/particle_effect/smoke/S = new type(T)
reagents.copy_to(S, reagents.total_volume)
S.setDir(pick(GLOB.cardinal))
S.setDir(pick(GLOB.cardinals))
S.amount = amount-1
S.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
S.lifetime = lifetime

View File

@@ -108,7 +108,7 @@
var/placeCount = 1
for(var/obj/structure/glowshroom/shroom in newLoc)
shroomCount++
for(var/wallDir in GLOB.cardinal)
for(var/wallDir in GLOB.cardinals)
var/turf/isWall = get_step(newLoc,wallDir)
if(isWall.density)
placeCount++
@@ -129,7 +129,7 @@
/obj/structure/glowshroom/proc/CalcDir(turf/location = loc)
var/direction = 16
for(var/wallDir in GLOB.cardinal)
for(var/wallDir in GLOB.cardinals)
var/turf/newTurf = get_step(location,wallDir)
if(newTurf.density)
direction |= wallDir

View File

@@ -11,7 +11,7 @@
/obj/effect/temp_visual/Initialize()
. = ..()
if(randomdir)
setDir(pick(GLOB.cardinal))
setDir(pick(GLOB.cardinals))
timerid = QDEL_IN(src, duration)

View File

@@ -13,7 +13,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)
var/area/A = get_area(T)

View File

@@ -309,7 +309,7 @@
return ROOM_ERR_TOOLARGE
var/turf/T = pending[1] //why byond havent list::pop()?
pending -= T
for (var/dir in GLOB.cardinal)
for (var/dir in GLOB.cardinals)
var/skip = 0
for (var/obj/structure/window/W in T)
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
@@ -343,7 +343,7 @@
for(var/V in border) //lazy but works
var/turf/F = V
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
if(direction == border[F])
continue //don't want to grab turfs from outside the border
var/turf/U = get_step(F, direction)

View File

@@ -107,7 +107,7 @@
spawn(100)
shock_cooldown = 0
var/mob/living/L = loc
step(L, pick(GLOB.cardinal))
step(L, pick(GLOB.cardinals))
to_chat(L, "<span class='danger'>You feel a sharp shock!</span>")
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread

View File

@@ -534,7 +534,7 @@ obj/item/weapon/construction
var/list/candidates = list()
var/turf/open/winner = null
var/winning_dist = null
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
var/turf/C = get_step(W, direction)
var/list/dupes = checkdupes(C)
if(start.CanAtmosPass(C) && !dupes.len)

View File

@@ -369,7 +369,7 @@
/obj/structure/table/optable/New()
..()
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
computer = locate(/obj/machinery/computer/operating, get_step(src, dir))
if(computer)
computer.table = src

View File

@@ -72,7 +72,7 @@
//cache some vars
var/list/atmos_adjacent_turfs = src.atmos_adjacent_turfs
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
var/turf/open/enemy_tile = get_step(src, direction)
if(!istype(enemy_tile))
if (atmos_adjacent_turfs)

View File

@@ -32,7 +32,7 @@
icon = smooth_icon
..()
if (mineralType && mineralAmt && spread && spreadChance)
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
if(prob(spreadChance))
var/turf/T = get_step(src, dir)
if(istype(T, /turf/closed/mineral/random))

View File

@@ -78,7 +78,7 @@
var/turf/closed/mineral/M = T
logged_turf_type = M.turf_type
if(get_dir(src, F) in GLOB.cardinal)
if(get_dir(src, F) in GLOB.cardinals)
cardinal_turfs += F
else
diagonal_turfs += F

View File

@@ -61,7 +61,7 @@
..()
SSair.hotspots += src
perform_exposure()
setDir(pick(GLOB.cardinal))
setDir(pick(GLOB.cardinals))
air_update_turf()
/obj/effect/hotspot/make_frozen_visual()

View File

@@ -39,7 +39,7 @@
/turf/proc/CalculateAdjacentTurfs()
var/list/atmos_adjacent_turfs = src.atmos_adjacent_turfs
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
var/turf/T = get_step(src, direction)
if(!T)
continue
@@ -76,7 +76,7 @@
var/matchingDirections = 0
var/turf/S = get_step(curloc, direction)
for (var/checkDirection in GLOB.cardinal)
for (var/checkDirection in GLOB.cardinals)
var/turf/checkTurf = get_step(S, checkDirection)
if(!S.atmos_adjacent_turfs || !S.atmos_adjacent_turfs[checkTurf])
continue

View File

@@ -364,7 +364,7 @@
/turf/open/conductivity_directions()
if(blocks_air)
return ..()
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
var/turf/T = get_step(src, direction)
if(!(T in atmos_adjacent_turfs) && !(atmos_supeconductivity & direction))
. |= direction
@@ -393,7 +393,7 @@
if(conductivity_directions)
//Conduct with tiles around me
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
if(conductivity_directions & direction)
var/turf/neighbor = get_step(src,direction)

View File

@@ -67,7 +67,7 @@ Pipelines + Other Objects -> Pipe network
node_connects.len = device_type
for(DEVICE_TYPE_LOOP)
for(var/D in GLOB.cardinal)
for(var/D in GLOB.cardinals)
if(D & GetInitDirections())
if(D in node_connects)
continue
@@ -177,7 +177,7 @@ Pipelines + Other Objects -> Pipe network
var/fuck_you_dir = get_dir(src, user) // Because fuck you...
if(!fuck_you_dir)
fuck_you_dir = pick(GLOB.cardinal)
fuck_you_dir = pick(GLOB.cardinals)
var/turf/target = get_edge_target_turf(user, fuck_you_dir)
var/range = pressures/250
var/speed = range/5
@@ -308,7 +308,7 @@ Pipelines + Other Objects -> Pipe network
if(src.nodes[I])
var/obj/machinery/atmospherics/node = src.nodes[I]
var/connected = FALSE
for(var/D in GLOB.cardinal)
for(var/D in GLOB.cardinals)
if(node in get_step(src, D))
connected = TRUE
break

View File

@@ -31,7 +31,7 @@ Iconnery
/obj/machinery/atmospherics/components/proc/icon_addbroken(var/connected = 0)
var/unconnected = (~connected) & initialize_directions
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
if(unconnected & direction)
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)

View File

@@ -12,12 +12,12 @@
/obj/machinery/atmospherics/components/trinary/filter/flipped
icon_state = "filter_off_f"
flipped = 1
// These two filter types have critical_machine flagged to on and thus causes the area they are in to be exempt from the Grid Check event.
/obj/machinery/atmospherics/components/trinary/filter/critical
critical_machine = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/critical
critical_machine = TRUE
@@ -34,7 +34,7 @@
/obj/machinery/atmospherics/components/trinary/filter/update_icon()
cut_overlays()
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
if(direction & initialize_directions)
var/obj/machinery/atmospherics/node = findConnecting(direction)
if(node)

View File

@@ -19,7 +19,7 @@
/obj/machinery/atmospherics/components/trinary/mixer/update_icon()
cut_overlays()
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
if(direction & initialize_directions)
var/obj/machinery/atmospherics/node = findConnecting(direction)
if(node)

View File

@@ -180,7 +180,7 @@
//Throw
user.Stun(60)
user.adjustBruteLoss(50)
var/throw_dir = pick(GLOB.cardinal)
var/throw_dir = pick(GLOB.cardinals)
var/atom/throw_target = get_edge_target_turf(user, throw_dir)
user.throw_at(throw_target, 200, 4)
if(8)

View File

@@ -616,7 +616,7 @@
if(move)
while(momentum_x != 0 || momentum_y != 0)
sleep(2)
step(wearer, pick(GLOB.cardinal))
step(wearer, pick(GLOB.cardinals))
momentum_decay()
adjust_momentum(0, 0, 10)
wearer.visible_message("<span class='warning'>[wearer]'s flight suit crashes into the ground!</span>")

View File

@@ -20,7 +20,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
priority_announce("What the fuck was that?!", "General Alert")
/datum/round_event/immovable_rod/start()
var/startside = pick(GLOB.cardinal)
var/startside = pick(GLOB.cardinals)
var/turf/startT = spaceDebrisStartLoc(startside, ZLEVEL_STATION)
var/turf/endT = spaceDebrisFinishLoc(startside, ZLEVEL_STATION)
new /obj/effect/immovablerod(startT, endT)

View File

@@ -553,7 +553,7 @@
buckle_mob(V, 1)
/obj/structure/spacevine/proc/spread()
var/direction = pick(GLOB.cardinal)
var/direction = pick(GLOB.cardinals)
var/turf/stepturf = get_step(src,direction)
for(var/datum/spacevine_mutation/SM in mutations)
SM.on_spread(src, stepturf)

View File

@@ -143,7 +143,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/fake_flood/proc/Expand()
for(var/turf/FT in flood_turfs)
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
var/turf/T = get_step(FT, dir)
if((T in flood_turfs) || !FT.CanAtmosPass(T))
continue

View File

@@ -21,7 +21,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() in get_step(loc, i)
if(input_obj)
if(isturf(input_obj.loc))

View File

@@ -240,7 +240,7 @@
return FALSE
var/count = 0
var/maxcount = 1
for(var/tempdir in GLOB.cardinal)
for(var/tempdir in GLOB.cardinals)
var/turf/closed/wall = get_step(user.loc, tempdir)
if(istype(wall))
maxcount++

View File

@@ -95,7 +95,7 @@
while(processing_atoms.len)
var/atom/a = processing_atoms[1]
for(var/step_dir in GLOB.cardinal)
for(var/step_dir in GLOB.cardinals)
var/obj/machinery/hydroponics/h = locate() in get_step(a, step_dir)
// Soil plots aren't dense
if(h && h.using_irrigation && h.density && !(h in connected) && !(h in processing_atoms))
@@ -281,7 +281,7 @@
/obj/machinery/hydroponics/proc/update_icon_hoses()
var/n = 0
for(var/Dir in GLOB.cardinal)
for(var/Dir in GLOB.cardinals)
var/obj/machinery/hydroponics/t = locate() in get_step(src,Dir)
if(t && t.using_irrigation && using_irrigation)
n += Dir

View File

@@ -1209,7 +1209,7 @@
playsound(T,'sound/effects/bin_close.ogg', 200, 1)
sleep(2)
new /obj/effect/temp_visual/hierophant/blast(T, user, friendly_fire_check)
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
INVOKE_ASYNC(src, .proc/blast_wall, T, d, user)
/obj/item/weapon/hierophant_club/proc/blast_wall(turf/T, dir, mob/living/user) //make a wall of blasts blast_range tiles long

View File

@@ -16,7 +16,7 @@
if(stat == CONSCIOUS)
if(!handle_combat())
if(prob(33) && canmove && isturf(loc) && !pulledby)
step(src, pick(GLOB.cardinal))
step(src, pick(GLOB.cardinals))
if(prob(1))
emote(pick("scratch","jump","roll","tail"))
else

View File

@@ -490,7 +490,7 @@
newdir = NORTH
else if(newdir == 12) //E + W
newdir = EAST
if((newdir in GLOB.cardinal) && (prob(50)))
if((newdir in GLOB.cardinals) && (prob(50)))
newdir = turn(get_dir(T, src.loc), 180)
if(!blood_exists)
new /obj/effect/decal/cleanable/trail_holder(src.loc)

View File

@@ -22,7 +22,7 @@
/mob/living/simple_animal/hostile/guardian/protector/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(. > 0 && toggle)
var/image/I = new('icons/effects/effects.dmi', src, "shield-flash", MOB_LAYER+0.01, dir = pick(GLOB.cardinal))
var/image/I = new('icons/effects/effects.dmi', src, "shield-flash", MOB_LAYER+0.01, dir = pick(GLOB.cardinals))
if(namedatum)
I.color = namedatum.colour
flick_overlay_view(I, src, 5)

View File

@@ -41,7 +41,7 @@
/mob/living/simple_animal/hostile/stickman,
/mob/living/simple_animal/hostile/stickman/ranged,
/mob/living/simple_animal/hostile/stickman/dog)
var/list/directions = GLOB.cardinal.Copy()
var/list/directions = GLOB.cardinals.Copy()
for(var/i in 1 to 3)
var/minions_chosen = pick_n_take(minions)
new minions_chosen (get_step(boss,pick_n_take(directions)), 1)
@@ -71,7 +71,7 @@
target = pick(threats)
if(target)
var/mob/living/simple_animal/hostile/boss/paper_wizard/wiz = boss
var/directions = GLOB.cardinal.Copy()
var/directions = GLOB.cardinals.Copy()
for(var/i in 1 to 3)
var/mob/living/simple_animal/hostile/boss/paper_wizard/copy/C = new (get_step(target,pick_n_take(directions)))
wiz.copies += C

View File

@@ -361,7 +361,7 @@
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
if(environment_smash)
EscapeConfinement()
for(var/dir in GLOB.cardinal)
for(var/dir in GLOB.cardinals)
var/turf/T = get_step(targets_from, dir)
if(iswallturf(T) || ismineralturf(T))
if(T.Adjacent(targets_from))

View File

@@ -535,7 +535,7 @@
var/mob/living/simple_animal/hostile/jungle/mook/M = ML
if(!M.stat)
mook_under_us = TRUE
var/anydir = pick(GLOB.cardinal)
var/anydir = pick(GLOB.cardinals)
Move(get_step(src, anydir), anydir)
continue

View File

@@ -64,9 +64,9 @@ Difficulty: Hard
if(. > 0 && prob(25))
var/obj/effect/decal/cleanable/blood/gibs/bubblegum/B = new /obj/effect/decal/cleanable/blood/gibs/bubblegum(loc)
if(prob(40))
step(B, pick(GLOB.cardinal))
step(B, pick(GLOB.cardinals))
else
B.setDir(pick(GLOB.cardinal))
B.setDir(pick(GLOB.cardinals))
/obj/effect/decal/cleanable/blood/gibs/bubblegum
name = "thick blood"

View File

@@ -131,11 +131,11 @@ Difficulty: Very Hard
/mob/living/simple_animal/hostile/megafauna/colossus/proc/alternating_dir_shots()
dir_shots(GLOB.diagonals)
sleep(10)
dir_shots(GLOB.cardinal)
dir_shots(GLOB.cardinals)
sleep(10)
dir_shots(GLOB.diagonals)
sleep(10)
dir_shots(GLOB.cardinal)
dir_shots(GLOB.cardinals)
/mob/living/simple_animal/hostile/megafauna/colossus/proc/double_spiral()
visible_message("<span class='colossus'>\"<b>Die.</b>\"</span>")

View File

@@ -130,7 +130,7 @@ Difficulty: Medium
/mob/living/simple_animal/hostile/megafauna/dragon/proc/fire_walls()
playsound(get_turf(src),'sound/magic/fireball.ogg', 200, 1)
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
INVOKE_ASYNC(src, .proc/fire_wall, d)
/mob/living/simple_animal/hostile/megafauna/dragon/proc/fire_wall(dir)

View File

@@ -255,7 +255,7 @@ Difficulty: Hard
animate(src, color = "#660099", time = 6)
sleep(6)
var/list/targets = ListTargets()
var/list/cardinal_copy = GLOB.cardinal.Copy()
var/list/cardinal_copy = GLOB.cardinals.Copy()
while(health && targets.len && cardinal_copy.len)
var/mob/living/pickedtarget = pick(targets)
if(targets.len >= cardinal_copy.len)
@@ -281,7 +281,7 @@ Difficulty: Hard
if((prob(anger_modifier) || target.Adjacent(src)) && target != src)
var/obj/effect/temp_visual/hierophant/chaser/OC = new /obj/effect/temp_visual/hierophant/chaser(loc, src, target, chaser_speed * 1.5, FALSE)
OC.moving = 4
OC.moving_dir = pick(GLOB.cardinal - C.moving_dir)
OC.moving_dir = pick(GLOB.cardinals - C.moving_dir)
else if(prob(10 + (anger_modifier * 0.5)) && get_dist(src, target) > 2)
blink(target)
@@ -315,7 +315,7 @@ Difficulty: Hard
playsound(T,'sound/effects/bin_close.ogg', 200, 1)
sleep(2)
new /obj/effect/temp_visual/hierophant/blast(T, src, FALSE)
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
INVOKE_ASYNC(src, .proc/blast_wall, T, d)
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/alldir_blasts(mob/victim) //fire alldir cross blasts with a delay
@@ -345,7 +345,7 @@ Difficulty: Hard
if((istype(get_area(T), /area/ruin/unpowered/hierophant) || istype(get_area(src), /area/ruin/unpowered/hierophant)) && victim != src)
return
arena_cooldown = world.time + initial(arena_cooldown)
for(var/d in GLOB.cardinal)
for(var/d in GLOB.cardinals)
INVOKE_ASYNC(src, .proc/arena_squares, T, d)
for(var/t in RANGE_TURFS(11, T))
if(t && get_dist(t, T) == 11)
@@ -507,7 +507,7 @@ Difficulty: Hard
/obj/effect/temp_visual/hierophant/chaser/proc/get_target_dir()
. = get_cardinal_dir(src, targetturf)
if((. != previous_moving_dir && . == more_previouser_moving_dir) || . == 0) //we're alternating, recalculate
var/list/cardinal_copy = GLOB.cardinal.Copy()
var/list/cardinal_copy = GLOB.cardinals.Copy()
cardinal_copy -= more_previouser_moving_dir
. = pick(cardinal_copy)

View File

@@ -69,7 +69,7 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa
. = ..()
swarmer_caps = GLOB.AISwarmerCapsByType //for admin-edits
internal = new/obj/item/device/gps/internal/swarmer_beacon(src)
for(var/ddir in GLOB.cardinal)
for(var/ddir in GLOB.cardinals)
new /obj/structure/swarmer/blockade (get_step(src, ddir))
var/mob/living/simple_animal/hostile/swarmer/ai/resource/R = new(loc)
step(R, ddir) //Step the swarmers, instead of spawning them there, incase the turf is solid

View File

@@ -114,10 +114,9 @@
for(var/obj/effect/goliath_tentacle/original/O in loc)//No more GG NO RE from 2+ goliaths simultaneously tentacling you
if(O != src)
qdel(src)
var/list/directions = GLOB.cardinal.Copy()
var/list/directions = GLOB.cardinals.Copy()
for(var/i in 1 to 3)
var/spawndir = pick(directions)
directions -= spawndir
var/spawndir = pick_n_take(directions)
var/turf/T = get_step(src,spawndir)
if(T)
new /obj/effect/goliath_tentacle(T)

View File

@@ -456,7 +456,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.

View File

@@ -134,7 +134,7 @@
turns_since_move++
if(turns_since_move >= turns_per_move)
if(!(stop_automated_movement_when_pulled && pulledby)) //Some animals don't move when pulled
var/anydir = pick(GLOB.cardinal)
var/anydir = pick(GLOB.cardinals)
if(Process_Spacemove(anydir))
Move(get_step(src, anydir), anydir)
turns_since_move = 0

View File

@@ -383,7 +383,7 @@
if (holding_still)
holding_still = max(holding_still - hungry, 0)
else if(canmove && isturf(loc) && prob(50))
step(src, pick(GLOB.cardinal))
step(src, pick(GLOB.cardinals))
else
if(holding_still)
@@ -391,7 +391,7 @@
else if (docile && pulledby)
holding_still = 10
else if(canmove && isturf(loc) && prob(33))
step(src, pick(GLOB.cardinal))
step(src, pick(GLOB.cardinals))
else if(!AIproc)
INVOKE_ASYNC(src, .proc/AIprocess)

View File

@@ -169,7 +169,7 @@
if(mob.confused)
if(mob.confused > 40)
step(mob, pick(GLOB.cardinal))
step(mob, pick(GLOB.cardinals))
else if(prob(mob.confused * 1.5))
step(mob, angle2dir(dir2angle(direct) + pick(90, -90)))
else if(prob(mob.confused * 3))

View File

@@ -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
things += T.contents
@@ -50,7 +50,7 @@
break
if(!control_unit)//No other guys nearby look for a control unit
for(var/direction in GLOB.cardinal)
for(var/direction in GLOB.cardinals)
for(var/obj/machinery/power/am_control_unit/AMC in cardinalrange(src))
if(AMC.add_shielding(src))
break
@@ -114,11 +114,11 @@
if(shield.control_unit == control_unit)
if(shield.processing)
coredirs |= direction
if(direction in GLOB.cardinal)
if(direction in GLOB.cardinals)
dirs |= direction
else
if(istype(machine, /obj/machinery/power/am_control_unit) && (direction in GLOB.cardinal))
if(istype(machine, /obj/machinery/power/am_control_unit) && (direction in GLOB.cardinals))
var/obj/machinery/power/am_control_unit/control = machine
if(control == control_unit)
dirs |= direction

View File

@@ -139,7 +139,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)
@@ -159,7 +159,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)

View File

@@ -50,7 +50,7 @@
spawn(5)
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))

View File

@@ -329,7 +329,7 @@
for(var/atom/movable/A in range(T, power))
if(A == src|| (firer && A == src.firer) || A.anchored || thrown_items[A])
continue
A.throw_at(get_edge_target_turf(A, pick(GLOB.cardinal)), power+1, 1)
A.throw_at(get_edge_target_turf(A, pick(GLOB.cardinals)), power+1, 1)
thrown_items[A] = A
for(var/turf/Z in range(T,power))
new /obj/effect/temp_visual/gravpush(Z)

View File

@@ -42,7 +42,7 @@
for(var/turf/T in (orange(i, epicenter) - orange(i-1, epicenter)))
turflist |= T
for(var/turf/T in turflist)
if( !(get_dir(T,epicenter) in GLOB.cardinal) && (abs(T.x - epicenter.x) == abs(T.y - epicenter.y) ))
if(!(get_dir(T,epicenter) in GLOB.cardinals) && (abs(T.x - epicenter.x) == abs(T.y - epicenter.y) ))
turflist.Remove(T)
turflist.Add(T) // we move the purely diagonal turfs to the end of the list.
for(var/turf/T in turflist)
@@ -52,7 +52,7 @@
var/turf/NT = thing
if(!(NT in accessible))
continue
if(!(get_dir(T,NT) in GLOB.cardinal))
if(!(get_dir(T,NT) in GLOB.cardinals))
continue
accessible[T] = 1
break

View File

@@ -15,7 +15,7 @@
M.set_drugginess(15)
if(isturf(M.loc) && !isspaceturf(M.loc))
if(M.canmove)
if(prob(10)) step(M, pick(GLOB.cardinal))
if(prob(10)) step(M, pick(GLOB.cardinals))
if(prob(7))
M.emote(pick("twitch","drool","moan","giggle"))
..()
@@ -184,7 +184,7 @@
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
if(M.canmove && !ismovableatom(M.loc))
for(var/i in 1 to 4)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
if(prob(20))
M.emote("laugh")
if(prob(33))
@@ -213,7 +213,7 @@
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
if(M.canmove && !ismovableatom(M.loc))
for(var/i = 0, i < 4, i++)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
M.Jitter(15)
M.Dizzy(15)
if(prob(40))
@@ -223,7 +223,7 @@
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
if(M.canmove && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
M.Jitter(20)
M.Dizzy(20)
M.adjustToxLoss(5, 0)
@@ -255,8 +255,8 @@
M.adjustToxLoss(0.1, 0)
M.hallucination += 10
if(M.canmove && !ismovableatom(M.loc))
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
step(M, pick(GLOB.cardinals))
..()
. = 1
@@ -264,7 +264,7 @@
M.hallucination += 10
if(M.canmove && !ismovableatom(M.loc))
for(var/i in 1 to 8)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
if(prob(20))
M.emote(pick("twitch","drool","moan"))
if(prob(33))
@@ -277,7 +277,7 @@
M.hallucination += 10
if(M.canmove && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
M.Jitter(5)
M.adjustBrainLoss(10)
if(prob(20))
@@ -288,7 +288,7 @@
M.hallucination += 20
if(M.canmove && !ismovableatom(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
M.Jitter(10)
M.Dizzy(10)
M.adjustBrainLoss(10)
@@ -300,7 +300,7 @@
M.hallucination += 30
if(M.canmove && !ismovableatom(M.loc))
for(var/i = 0, i < 12, i++)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
M.Jitter(15)
M.Dizzy(15)
M.adjustBrainLoss(10)
@@ -312,7 +312,7 @@
M.hallucination += 40
if(M.canmove && !ismovableatom(M.loc))
for(var/i = 0, i < 16, i++)
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
M.Jitter(50)
M.Dizzy(50)
M.adjustToxLoss(5, 0)

View File

@@ -669,7 +669,7 @@
/datum/reagent/mercury/on_mob_life(mob/living/M)
if(M.canmove && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
M.adjustBrainLoss(2)
@@ -749,7 +749,7 @@
/datum/reagent/lithium/on_mob_life(mob/living/M)
if(M.canmove && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinal))
step(M, pick(GLOB.cardinals))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
..()

View File

@@ -327,7 +327,7 @@
stored.anchored = 1
stored.update_icon()
else
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.setDir(D)
@@ -342,7 +342,7 @@
/obj/structure/disposalpipe/shuttleRotate(rotation)
..()
var/new_dpdir = 0
for(var/D in GLOB.cardinal)
for(var/D in GLOB.cardinals)
if(dpdir & D)
new_dpdir = new_dpdir | angle2dir(rotation+dir2angle(D))
dpdir = new_dpdir

View File

@@ -76,7 +76,7 @@
/obj/effect/cross_action/spacetime_dist/Initialize(mapload)
. = ..()
sound = "sound/guitar/[safepick(GLOB.guitar_notes)]"
dir = pick(GLOB.cardinal)
dir = pick(GLOB.cardinals)
/obj/effect/cross_action/spacetime_dist/proc/walk_link(atom/movable/AM)
if(linked_dist && walks_left > 0)

View File

@@ -30,7 +30,7 @@
var/turf/location = C.loc
if(istype(location))
C.add_splatter_floor(location)
var/direction = pick(GLOB.cardinal)
var/direction = pick(GLOB.cardinals)
var/t_range = rand(2,max(throw_range/2, 2))
var/turf/target_turf = get_turf(src)
for(var/i in 1 to t_range-1)

View File

@@ -407,7 +407,7 @@
for(var/i=1, i<=(5*power_multiplier), i++)
for(var/V in listeners)
var/mob/living/L = V
step(L, direction ? direction : pick(GLOB.cardinal))
step(L, direction ? direction : pick(GLOB.cardinals))
sleep(10)
//WALK

View File

@@ -52,7 +52,7 @@
..()
if(A.density && has_buckled_mobs())
var/mob/living/carbon/H = buckled_mobs[1]
var/atom/throw_target = get_edge_target_turf(H, pick(GLOB.cardinal))
var/atom/throw_target = get_edge_target_turf(H, pick(GLOB.cardinals))
unbuckle_mob(H)
H.throw_at(throw_target, 4, 3)
H.Knockdown(100)