Optimize a couple things

This commit is contained in:
Chompstation Bot
2021-07-20 21:30:20 +00:00
parent 4a6c523aa6
commit 15cafbe65b
262 changed files with 9437 additions and 934 deletions

View File

@@ -74,8 +74,7 @@
plant.layer = layer + 0.1
if(has_buckled_mobs())
for(var/A in buckled_mobs)
var/mob/living/L = A
for(var/mob/living/L as anything in buckled_mobs)
seed.do_sting(L,src)
if(seed.get_trait(TRAIT_CARNIVOROUS))
seed.do_thorns(L,src)

View File

@@ -49,8 +49,7 @@
/obj/effect/plant/proc/unbuckle()
if(has_buckled_mobs())
for(var/A in buckled_mobs)
var/mob/living/L = A
for(var/mob/living/L as anything in buckled_mobs)
if(L.buckled == src)
L.buckled = null
L.anchored = initial(L.anchored)
@@ -64,8 +63,7 @@
if(seed)
chance = round(100/(20*seed.get_trait(TRAIT_POTENCY)/100))
if(prob(chance))
for(var/A in buckled_mobs)
var/mob/living/L = A
for(var/mob/living/L as anything in buckled_mobs)
if(!(user in buckled_mobs))
L.visible_message(\
"<b>\The [user]</b> frees \the [L] from \the [src].",\