Merges HEADBANGPROTECT and EARBANGPROTECT into new secondary flag (#24881)

Unless we get a clothing item that can be worn on the head, and the
ears, and only protects from loud noises in one of the configurations,
this isn't going to be an issue.

Frees up another flag slot, all hail the secondary flags.
This commit is contained in:
coiax
2017-03-13 22:00:43 +13:00
committed by oranges
parent f1d1e6f5e9
commit cb38468e0c
6 changed files with 35 additions and 21 deletions
@@ -10,7 +10,7 @@
return number
/mob/living/carbon/get_ear_protection()
if(head && (head.flags & HEADBANGPROTECT))
if(head && HAS_SECONDARY_FLAG(head, BANG_PROTECT))
return 1
/mob/living/carbon/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
@@ -47,7 +47,7 @@
return number
/mob/living/carbon/human/get_ear_protection()
if((ears && (ears.flags & EARBANGPROTECT)) || (head && (head.flags & HEADBANGPROTECT)))
if((ears && HAS_SECONDARY_FLAG(ears, BANG_PROTECT)) || (head && HAS_SECONDARY_FLAG(head, BANG_PROTECT)))
return 1
/mob/living/carbon/human/on_hit(obj/item/projectile/P)