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
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user