mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 15:02:29 +00:00
* Limb-based damage descriptions fixes and code improvement (#72236) ## About The Pull Request The limb-based damage descriptions added by #71635 didn't work properly, as get_majority_bodypart_damage_desc() didn't return the correct values. I rewrote the proc altogether and changed the format of the damage description vars (formerly burn_damage_desc and brute_damage_desc). They are now a single associative list with each description being indexed by it's respective damage type DEFINE The proc now returns the correct description, avoids the duplicated code between the brute and burn sections and can support any number of damage types. To that end I also added Clone damage support, although no limbs use a special description for the moment. Oh, I also gave the robotic damage descriptions to all the robotic limbs, for some reason only the left robot arm had it. ## Why It's Good For The Game It makes the system function properly and correctly labels robotic limbs. On the side of the proc, it's more flexible this way and avoids the redundancy. I am aware, however, that I'm using a lot of associative lists. I'll rewrite it to reduce them if memory is deemed significant concern in this context. It's, admittedly, probably a bit overengineered for what it is. ## Changelog 🆑 fix: the examine text for damage now properly uses the most common examine text out of all the mob's limbs fix: all robotic limbs now have the robotic damage descriptions (charring, denting) code: improved the get_majority_bodypart_damage_desc() proc to reduce redundancies and add support for limb-based cellular damage /🆑 Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com> * Limb-based damage descriptions fixes and code improvement Co-authored-by: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com> Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>