mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
ce424e240a
* Adds arms/legs coverage to armored gloves/shoes, adds a unit test to check for former (#85667) ## About The Pull Request Turns out HANDS and FEET coverage doesn't actually apply armor to the body, at all, making it entirely useless. Despite this, a lot of clothing still does it! So I added ARMS and LEGS flags to gloves/shoes that do it respectively and wrote a unit test for it that will yell out a list of all items missing coverage while having non acid/bio/fire armor (three snowflake types) as discusses with melbert on discord ## Why It's Good For The Game ...features working as intended? ## Changelog 🆑 balance: Multiple gloves/shoes that had armor values but failed to apply them got fixed /🆑 * Adds arms/legs coverage to armored gloves/shoes, adds a unit test to check for former * Fix methinks * Leg parts --------- Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Waterpig <wtryoutube@seznam.cz> Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>
26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
/// Checks if any gloves or shoes that have non bio/fire/acid armor haven't been marked with ARMS or LEGS coverage respectively
|
|
/datum/unit_test/gloves_and_shoes_armor
|
|
|
|
/datum/unit_test/gloves_and_shoes_armor/Run()
|
|
for (var/obj/item/clothing/gloves/gloves as anything in subtypesof(/obj/item/clothing/gloves))
|
|
var/datum/armor/armor = gloves::armor_type
|
|
if (!armor)
|
|
continue
|
|
|
|
if (gloves::body_parts_covered != HANDS)
|
|
continue
|
|
|
|
if (armor::melee || armor::bomb || armor::energy || armor::laser || armor::bullet || armor::wound)
|
|
TEST_FAIL("[gloves] has non-bio/acid/fire armor but doesn't cover non-hand bodyparts.")
|
|
|
|
for (var/obj/item/clothing/shoes/shoes as anything in subtypesof(/obj/item/clothing/shoes))
|
|
var/datum/armor/armor = shoes::armor_type
|
|
if (!armor)
|
|
continue
|
|
|
|
if (shoes::body_parts_covered != FEET)
|
|
continue
|
|
|
|
if (armor::melee || armor::bomb || armor::energy || armor::laser || armor::bullet || armor::wound)
|
|
TEST_FAIL("[shoes] has non-bio/acid/fire armor but doesn't cover non-feet bodyparts.")
|