Skip to content

Commit

Permalink
Removes a sleep from broodmother code (tgstation#86580)
Browse files Browse the repository at this point in the history
## About The Pull Request

We're calling spiral turfs which (the thing it does) is returns turfs in
a spiral pattern order, and then RANDOMLY PICKING FROM THAT LIST

So this is just a waste

Also cleaned up the proc some
  • Loading branch information
LemonInTheDark authored Sep 10, 2024
1 parent a46b54b commit 21da683
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/datum/action/innate/elite_attack/rage,
/datum/action/innate/elite_attack/call_children)

var/rand_tent = 0
COOLDOWN_DECLARE(random_tentacle)
var/list/mob/living/simple_animal/hostile/asteroid/elite/broodmother_child/children_list = list()

/mob/living/simple_animal/hostile/asteroid/elite/broodmother/Initialize(mapload)
Expand Down Expand Up @@ -108,15 +108,16 @@
. = ..()
if(!.) //Checks if they are dead as a rock.
return
if(health < maxHealth * 0.5 && rand_tent < world.time)
rand_tent = world.time + 30
var/tentacle_amount = 5
if(health < maxHealth * 0.25)
tentacle_amount = 10
var/tentacle_loc = spiral_range_turfs(5, get_turf(src))
for(var/i in 1 to tentacle_amount)
var/turf/t = pick_n_take(tentacle_loc)
new /obj/effect/goliath_tentacle/broodmother(t, src)
if(health >= maxHealth * 0.5 || !COOLDOWN_FINISHED(src, random_tentacle))
return
COOLDOWN_START(src, random_tentacle, 3 SECONDS)
var/tentacle_amount = 5
if(health < maxHealth * 0.25)
tentacle_amount = 10
var/list/possible_turfs = RANGE_TURFS(5, get_turf(src))
for(var/i in 1 to tentacle_amount)
var/turf/innsmouth = pick_n_take(possible_turfs)
new /obj/effect/goliath_tentacle/broodmother(innsmouth, src)

/mob/living/simple_animal/hostile/asteroid/elite/broodmother/proc/tentacle_patch(target)
ranged_cooldown = world.time + 15
Expand Down

0 comments on commit 21da683

Please sign in to comment.