Split up and rename var/flags (#17794)

* Split up and rename `var/flags`

* Various fixes

* CL

* Don't rename Phoron Guard phoron preset

---------

Co-authored-by: Cody Brittain <cbrittain10@live.com>
This commit is contained in:
Cody Brittain
2023-11-22 16:27:51 +00:00
committed by GitHub
co-authored by Cody Brittain
parent 4b9303a1e9
commit 06601c9ec3
335 changed files with 763 additions and 674 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ Contains helper procs for airflow, handled in /connection_group.
/mob/living/carbon/human/airflow_stun()
if(shoes)
if(shoes.item_flags & NOSLIP) return 0
if(shoes.item_flags & ITEM_FLAG_NO_SLIP) return 0
..()
/atom/movable/proc/check_airflow_movable(n)
@@ -74,7 +74,7 @@ Contains helper procs for airflow, handled in /connection_group.
if(buckled_to)
return 0
var/obj/item/shoes = get_equipped_item(slot_shoes)
if(istype(shoes) && (shoes.item_flags & NOSLIP))
if(istype(shoes) && (shoes.item_flags & ITEM_FLAG_NO_SLIP))
return 0
return 1
+6 -6
View File
@@ -41,7 +41,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
/obj/var/contaminated = 0
/obj/item/proc/can_contaminate()
if(flags & PHORONGUARD)
if(item_flags & ITEM_FLAG_PHORON_GUARD)
return FALSE
return TRUE
@@ -99,15 +99,15 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
var/burn_eyes = 1
//Check for protective glasses
if(glasses && (glasses.body_parts_covered & EYES) && (glasses.item_flags & AIRTIGHT))
if(glasses && (glasses.body_parts_covered & EYES) && (glasses.item_flags & ITEM_FLAG_AIRTIGHT))
burn_eyes = 0
//Check for protective maskwear
if(burn_eyes && wear_mask && (wear_mask.body_parts_covered & EYES) && (wear_mask.item_flags & AIRTIGHT))
if(burn_eyes && wear_mask && (wear_mask.body_parts_covered & EYES) && (wear_mask.item_flags & ITEM_FLAG_AIRTIGHT))
burn_eyes = 0
//Check for protective helmets
if(burn_eyes && head && (head.body_parts_covered & EYES) && (head.item_flags & AIRTIGHT))
if(burn_eyes && head && (head.body_parts_covered & EYES) && (head.item_flags & ITEM_FLAG_AIRTIGHT))
burn_eyes = 0
//If we still need to, burn their eyes
@@ -141,7 +141,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
//Checks if the head is adequately sealed.
if(head)
if(vsc.plc.PHORONGUARD_ONLY)
if(head.flags & PHORONGUARD)
if(head.item_flags & ITEM_FLAG_PHORON_GUARD)
return 1
else if(head.body_parts_covered & EYES)
return 1
@@ -153,7 +153,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
for(var/obj/item/protection in list(wear_suit, gloves, shoes))
if(!protection)
continue
if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD))
if(vsc.plc.PHORONGUARD_ONLY && !(protection.item_flags & ITEM_FLAG_PHORON_GUARD))
return 0
coverage |= protection.body_parts_covered