Cleans up eye/mouth protection checks

This commit is contained in:
ShizCalev
2018-10-30 06:55:25 -04:00
parent 00fd8ff18e
commit ddeb5c5af2
6 changed files with 16 additions and 54 deletions
+2 -8
View File
@@ -103,14 +103,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
if(..() || !ishuman(hit_atom))
return
var/mob/living/carbon/human/C = hit_atom
if(C.head && C.head.flags_cover & HEADCOVERSEYES)
visible_message("<span class='danger'>[C]'s headgear blocks the sand!</span>")
return
if(C.wear_mask && C.wear_mask.flags_cover & MASKCOVERSEYES)
visible_message("<span class='danger'>[C]'s mask blocks the sand!</span>")
return
if(C.glasses && C.glasses.flags_cover & GLASSESCOVERSEYES)
visible_message("<span class='danger'>[C]'s glasses block the sand!</span>")
if(C.is_eyes_covered())
C.visible_message("<span class='danger'>[C]'s eye protection blocks the sand!</span>", "<span class='warning'>Your eye protection blocks the sand!</span>")
return
C.adjust_blurriness(6)
C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage