mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 01:52:29 +00:00
Removes *COVERSEYES
Removes (HEAD|MASK|GLASSES)COVERSEYES flags, in favour of using body_parts_covered.
This commit is contained in:
@@ -418,14 +418,12 @@ var/list/global/slot_flags_enumeration = list(
|
||||
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && ( \
|
||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
||||
))
|
||||
// you can't stab someone in the eyes wearing a mask!
|
||||
user << "<span class='warning'>You're going to need to remove the eye covering first.</span>"
|
||||
return
|
||||
if(istype(H))
|
||||
for(var/obj/item/protection in list(H.head, H.wear_mask, H.glasses))
|
||||
if(protection && (protection.body_parts_covered & EYES))
|
||||
// you can't stab someone in the eyes wearing a mask!
|
||||
user << "<span class='warning'>You're going to need to remove the eye covering first.</span>"
|
||||
return
|
||||
|
||||
if(!M.has_eyes())
|
||||
user << "<span class='warning'>You cannot locate any eyes on [M]!</span>"
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
var/mob/living/carbon/human/H = M //mob has protective eyewear
|
||||
if(istype(H))
|
||||
for(var/obj/item/clothing/C in list(H.head,H.wear_mask,H.glasses))
|
||||
if(istype(C) && C.flags & (HEADCOVERSEYES|MASKCOVERSEYES|GLASSESCOVERSEYES))
|
||||
if(istype(C) && (C.body_parts_covered & EYES))
|
||||
user << "<span class='warning'>You're going to need to remove [C.name] first.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -73,7 +73,14 @@
|
||||
return
|
||||
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
|
||||
var/protected = 0
|
||||
for(var/slot in list(slot_head, slot_wear_mask, slot_glasses))
|
||||
var/obj/item/protection = M.get_equipped_item(slot)
|
||||
if(istype(protection) && (protection.body_parts_covered & FACE))
|
||||
protected = 1
|
||||
break
|
||||
|
||||
if(protected)
|
||||
M << "<span class='warning'>You get slammed in the face with the tray, against your mask!</span>"
|
||||
if(prob(33))
|
||||
src.add_blood(H)
|
||||
|
||||
Reference in New Issue
Block a user