Fixes armour penetration not working against mechs in melee. (#21265)

A deprecated variable in the apply_damage chain fucked up the variable
order.

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2025-08-31 15:25:05 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 9595c784ee
commit a3a9a2ad4a
48 changed files with 115 additions and 63 deletions
@@ -72,7 +72,7 @@
if (health <= 0)
qdel(src)
/obj/item/storage/box/attack_generic(var/mob/user)
/obj/item/storage/box/attack_generic(mob/user, damage, attack_message, environment_smash, armor_penetration, attack_flags, damage_type)
if(!chewable)
return
if(istype(user, /mob/living))
@@ -82,11 +82,6 @@
if(contents.len && !locate(/obj/item/reagent_containers/food) in src) // you can tear open empty boxes for nesting material, or for food
to_chat(user, SPAN_WARNING("There's no food in that box!"))
return
var/damage
if (!L.mob_size)
damage = 3//A safety incase i forgot to set a mob_size on something
else
damage = L.mob_size//he bigger you are, the faster it tears
if (!damage || damage <= 0)
return