Skip to content

Commit

Permalink
More iterations replaced with just length
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicacrov committed Feb 29, 2024
1 parent f5fec9c commit 8d91b9c
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions code/modules/mob/living/carbon/xenomorph/hive_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -831,11 +831,7 @@
return TRUE

/datum/hive_status/proc/update_hugger_limit()
var/countable_xeno_iterator = 0
for(var/mob/living/carbon/xenomorph/cycled_xeno as anything in total_living_xenos_advanced)
countable_xeno_iterator++

playable_hugger_limit = max(Floor(countable_xeno_iterator / playable_hugger_max_divisor), playable_hugger_minimum)
playable_hugger_limit = max(Floor(length(total_living_xenos_advanced) / playable_hugger_max_divisor), playable_hugger_minimum)

/datum/hive_status/proc/can_spawn_as_hugger(mob/dead/observer/user)
if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber])
Expand Down Expand Up @@ -886,11 +882,7 @@
hugger.timeofdeath = user.timeofdeath // Keep old death time

/datum/hive_status/proc/update_lesser_drone_limit()
var/countable_xeno_iterator = 0
for(var/mob/living/carbon/xenomorph/cycled_xeno as anything in total_living_xenos_advanced)
countable_xeno_iterator++

lesser_drone_limit = max(Floor(countable_xeno_iterator / playable_lesser_drones_max_divisor), lesser_drone_minimum)
lesser_drone_limit = max(Floor(length(total_living_xenos_advanced) / playable_lesser_drones_max_divisor), lesser_drone_minimum)

/datum/hive_status/proc/can_spawn_as_lesser_drone(mob/dead/observer/user, obj/effect/alien/resin/special/pylon/spawning_pylon)
if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber])
Expand Down

0 comments on commit 8d91b9c

Please sign in to comment.