Renames GLOB.cardinal to GLOB.cardinals to match GLOB.diagonals and GLOB.alldirs (#1970)
This commit is contained in:
committed by
kevinz000
parent
5cdd069136
commit
1b70c06474
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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++
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"))
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user