Files
Bubberstation/code/modules/mob
Ryll Ryll 822748afe1 Proper-ish fix (#65075)
This PR sets out to do what #65043 (Fixes projectiles ignoring armor) does with a little more thoroughness. I specifically avoided adding a new argument to bullet_act in #64683 (50b97b7056) because having different arguments in different levels of a proc depending on what it's being called on isn't very intuitive, and also the varname armor is already defined on /atom and shouldn't be used as local varnames because (clearly, as shown here) it causes confusion. 

This PR just adds a second, silent armor check to /mob/living/bullet_act() that's actually used to reduce the damage in apply_damage(). The armor check in the base /atom/bullet_act() stays as it is used for the projectile's on_hit(). I've tested and retested that this solves the armor problem, without introducing any other strange behaviors like causing double logging.

(The core issue here was the armor var not having the expected value. Because armor is a var on atom, when we defined it as a proc level var we merely locally overrode it. When we removed it the second use of the overriden var name was missed, and so defaulted to the object value, or a list of armor types and their levels, rather then what we expected, a string describing what's happen. Good fix. -Lemon)

Fixes #65034 (Armor doesn't work VS projectiles)
Closes #65043 (Fixes projectiles ignoring armor)
2022-02-24 19:49:28 -08:00
..
2022-02-24 19:49:28 -08:00
2022-01-24 11:56:57 -08:00