mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
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:
co-authored by
Cody Brittain
parent
4b9303a1e9
commit
06601c9ec3
@@ -24,7 +24,7 @@
|
||||
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, ignore_blocked = FALSE, assisted_equip = FALSE)
|
||||
if(!istype(W))
|
||||
return FALSE
|
||||
if(W.item_flags & NOMOVE) //Cannot move NOMOVE items from one inventory slot to another. Cannot do canremove here because then BSTs spawn naked.
|
||||
if(W.item_flags & ITEM_FLAG_NO_MOVE) //Cannot move ITEM_FLAG_NO_MOVE items from one inventory slot to another. Cannot do canremove here because then BSTs spawn naked.
|
||||
return FALSE
|
||||
|
||||
if(!W.mob_can_equip(src, slot, disable_warning, ignore_blocked))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
if(!bypass_checks)
|
||||
|
||||
if(wear_mask && wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT) //Check if the gasmask blocks an effect
|
||||
if(wear_mask && wear_mask.item_flags & ITEM_FLAG_BLOCK_GAS_SMOKE_EFFECT) //Check if the gasmask blocks an effect
|
||||
return 0
|
||||
|
||||
if (internals && internals.icon_state == "internal1") //Check for internals
|
||||
@@ -51,7 +51,7 @@
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!(wear_mask && (wear_mask.item_flags & AIRTIGHT)))
|
||||
if (!(wear_mask && (wear_mask.item_flags & ITEM_FLAG_AIRTIGHT)))
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
@@ -86,7 +86,7 @@
|
||||
/mob/living/carbon/proc/handle_chemical_smoke(var/datum/gas_mixture/environment)
|
||||
if(species && environment.return_pressure() < species.breath_pressure/5)
|
||||
return //pressure is too low to even breathe in.
|
||||
if(wear_mask && (wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(wear_mask && (wear_mask.item_flags & ITEM_FLAG_BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/human/proc/get_covered_body_parts(var/thick)
|
||||
var/skipbody = 0
|
||||
for(var/obj/item/clothing/C in list(wear_suit, head, wear_mask, w_uniform, gloves, shoes))
|
||||
if(!thick || (C.item_flags & THICKMATERIAL))
|
||||
if(!thick || (C.item_flags & ITEM_FLAG_THICK_MATERIAL))
|
||||
skipbody |= C.body_parts_covered
|
||||
return skipbody
|
||||
|
||||
|
||||
@@ -1629,9 +1629,9 @@
|
||||
)
|
||||
for(var/obj/item/C in list(wear_suit, head, wear_mask, w_uniform, gloves, shoes))
|
||||
var/injection_modifier = BASE_INJECTION_MOD
|
||||
if(C.item_flags & INJECTIONPORT)
|
||||
if(C.item_flags & ITEM_FLAG_INJECTION_PORT)
|
||||
injection_modifier = SUIT_INJECTION_MOD
|
||||
else if(C.item_flags & THICKMATERIAL)
|
||||
else if(C.item_flags & ITEM_FLAG_THICK_MATERIAL)
|
||||
injection_modifier = INJECTION_FAIL
|
||||
if(. == SUIT_INJECTION_MOD && injection_modifier != INJECTION_FAIL) // don't reset it back to the base, unless it completely blocks
|
||||
continue
|
||||
@@ -1656,7 +1656,7 @@
|
||||
var/feet_exposed = 1
|
||||
|
||||
for(var/obj/item/clothing/C in equipment)
|
||||
if(C.item_flags & SHOWFLAVORTEXT)
|
||||
if(C.item_flags & ITEM_FLAG_SHOW_FLAVOR_TEXT)
|
||||
continue
|
||||
|
||||
if(C.body_parts_covered & HEAD)
|
||||
@@ -1711,7 +1711,7 @@
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/slip(var/slipped_on, stun_duration=8)
|
||||
if((species.flags & NO_SLIP) || (shoes && (shoes.item_flags & NOSLIP)))
|
||||
if((species.flags & NO_SLIP) || (shoes && (shoes.item_flags & ITEM_FLAG_NO_SLIP)))
|
||||
return 0
|
||||
. = ..(slipped_on,stun_duration)
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ emp_act
|
||||
/mob/living/carbon/human/proc/check_head_airtight_coverage()
|
||||
var/list/clothing = list(head, wear_mask, wear_suit)
|
||||
for(var/obj/item/clothing/C in clothing)
|
||||
if((C.body_parts_covered & HEAD) && (C.item_flags & (AIRTIGHT)))
|
||||
if((C.body_parts_covered & HEAD) && (C.item_flags & (ITEM_FLAG_AIRTIGHT)))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -157,7 +157,7 @@ emp_act
|
||||
/mob/living/carbon/human/proc/check_mouth_coverage()
|
||||
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform)
|
||||
for(var/obj/item/gear in protective_gear)
|
||||
if(istype(gear) && (gear.body_parts_covered & FACE) && !(gear.item_flags & FLEXIBLEMATERIAL))
|
||||
if(istype(gear) && (gear.body_parts_covered & FACE) && !(gear.item_flags & ITEM_FLAG_FLEXIBLE_MATERIAL))
|
||||
return gear
|
||||
return null
|
||||
|
||||
@@ -263,7 +263,7 @@ emp_act
|
||||
apply_effect(20, PARALYZE, blocked)
|
||||
|
||||
//Apply blood
|
||||
if(!(I.flags & NOBLOODY))
|
||||
if(!(I.atom_flags & ATOM_FLAG_NO_BLOOD))
|
||||
I.add_blood(src)
|
||||
|
||||
var/is_sharp_weapon = is_sharp(I)
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
/mob/living/carbon/human/get_hearing_protection()
|
||||
. = EAR_PROTECTION_NONE
|
||||
|
||||
if ((l_ear?.item_flags & SOUNDPROTECTION) || (r_ear?.item_flags & SOUNDPROTECTION) || (head?.item_flags & SOUNDPROTECTION))
|
||||
if ((l_ear?.item_flags & ITEM_FLAG_SOUND_PROTECTION) || (r_ear?.item_flags & ITEM_FLAG_SOUND_PROTECTION) || (head?.item_flags & ITEM_FLAG_SOUND_PROTECTION))
|
||||
return EAR_PROTECTION_MAJOR
|
||||
|
||||
if(istype(head, /obj/item/clothing/head/helmet) || HAS_FLAG(mutations, HULK))
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
return prob_slip
|
||||
|
||||
/mob/living/carbon/human/Check_Shoegrip(checkSpecies = TRUE)
|
||||
if(shoes && (shoes.item_flags & NOSLIP) && istype(shoes, /obj/item/clothing/shoes/magboots) && !lying && !buckled_to && !length(grabbed_by)) //magboots + dense_object = no floating. Doesn't work if lying. Grabbedby and buckled_to are for mob carrying, wheelchairs, roller beds, etc.
|
||||
if(shoes && (shoes.item_flags & ITEM_FLAG_NO_SLIP) && istype(shoes, /obj/item/clothing/shoes/magboots) && !lying && !buckled_to && !length(grabbed_by)) //magboots + dense_object = no floating. Doesn't work if lying. Grabbedby and buckled_to are for mob carrying, wheelchairs, roller beds, etc.
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -745,7 +745,7 @@
|
||||
var/turf/target = get_step(src, dir)
|
||||
|
||||
for(var/obj/obstacle in get_turf(src))
|
||||
if((obstacle.flags & ON_BORDER) && (src != obstacle))
|
||||
if((obstacle.atom_flags & ATOM_FLAG_CHECKS_BORDER) && (src != obstacle))
|
||||
if(!obstacle.CheckExit(src, target))
|
||||
brokesomething++
|
||||
if (!crash_into(obstacle))
|
||||
|
||||
@@ -268,11 +268,11 @@
|
||||
/** breathing **/
|
||||
|
||||
/mob/living/carbon/human/handle_chemical_smoke(var/datum/gas_mixture/environment)
|
||||
if(wear_mask && (wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(wear_mask && (wear_mask.item_flags & ITEM_FLAG_BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
if(glasses && (glasses.item_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(glasses && (glasses.item_flags & ITEM_FLAG_BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
if(head && (head.item_flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
if(head && (head.item_flags & ITEM_FLAG_BLOCK_GAS_SMOKE_EFFECT))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
if(!rig.offline && (rig.air_supply && internal == rig.air_supply))
|
||||
rig_supply = rig.air_supply
|
||||
|
||||
if (!rig_supply && (!contents.Find(internal) || !((wear_mask && (wear_mask.item_flags & AIRTIGHT)) || (head && (head.item_flags & AIRTIGHT)))))
|
||||
if (!rig_supply && (!contents.Find(internal) || !((wear_mask && (wear_mask.item_flags & ITEM_FLAG_AIRTIGHT)) || (head && (head.item_flags & ITEM_FLAG_AIRTIGHT)))))
|
||||
internal = null
|
||||
|
||||
if(internal)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
var/uses = 1 // uses before it goes inert
|
||||
var/enhanced = FALSE //has it been enhanced before?
|
||||
flags = OPENCONTAINER
|
||||
atom_flags = ATOM_FLAG_OPEN_CONTAINER
|
||||
|
||||
/obj/item/slime_extract/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O, /obj/item/extract_enhancer))
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
desc = "A set of specialized tools that functions as both the ordinary crowbar, but is additionally capable of brute forcing bolted doors without power."
|
||||
icon = 'icons/obj/item/tools/jawsoflife.dmi'
|
||||
icon_state = "jawspry"
|
||||
flags = NOBLUDGEON
|
||||
item_flags = ITEM_FLAG_NO_BLUDGEON
|
||||
force = 0
|
||||
sharp = FALSE
|
||||
edge = FALSE
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "robotanalyzer"
|
||||
item_state = "analyzer"
|
||||
desc = "A hand-held scanner able to diagnose robotic injuries."
|
||||
flags = CONDUCT
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gripper"
|
||||
|
||||
flags = NOBLUDGEON
|
||||
item_flags = ITEM_FLAG_NO_BLUDGEON
|
||||
|
||||
//Has a list of items that it can hold.
|
||||
var/list/can_hold = list(
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'icons/obj/item/tools/inductive_charger.dmi'
|
||||
icon_state = "inductive_charger"
|
||||
item_state = "inductive_charger"
|
||||
flags = HELDMAPTEXT
|
||||
item_flags = ITEM_FLAG_HELD_MAP_TEXT
|
||||
contained_sprite = TRUE
|
||||
var/is_in_use = FALSE
|
||||
var/ready_to_use = TRUE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/robot_parts.dmi'
|
||||
item_state = "buildpipe"
|
||||
icon_state = "blank"
|
||||
flags = CONDUCT
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
slot_flags = SLOT_BELT
|
||||
var/list/part = null // Order of args is important for installing robolimbs.
|
||||
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
|
||||
|
||||
@@ -16,7 +16,7 @@ var/global/list/robot_modules = list(
|
||||
icon_state = "std_mod"
|
||||
w_class = ITEMSIZE_IMMENSE
|
||||
item_state = "electronic"
|
||||
flags = CONDUCT
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
var/channels = list()
|
||||
var/networks = list()
|
||||
var/languages = list( // Any listed language will be understandable. Any set to TRUE will be speakable
|
||||
|
||||
@@ -87,12 +87,12 @@
|
||||
var/obj/item/clothing/worn_suit = M.wear_suit
|
||||
var/obj/item/clothing/worn_helmet = M.head
|
||||
if(worn_suit) // Are you wearing clothes?
|
||||
if ((worn_suit.flags & THICKMATERIAL))
|
||||
if ((worn_suit.item_flags & ITEM_FLAG_THICK_MATERIAL))
|
||||
prob_mult -= 0.7
|
||||
else
|
||||
prob_mult -= 0.01 * (min(LAZYACCESS(worn_suit.armor, "bio"), 70)) // Is it sealed? I can't get to 70% of your body.
|
||||
if(worn_helmet)
|
||||
if ((worn_helmet.flags & THICKMATERIAL))
|
||||
if ((worn_helmet.item_flags & ITEM_FLAG_THICK_MATERIAL))
|
||||
prob_mult -= 0.3
|
||||
else
|
||||
prob_mult -= 0.01 *(min(LAZYACCESS(worn_helmet.armor, "bio"), 30))// Is your helmet sealed? I can't get to 30% of your body.
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
|
||||
found_obj = locate(/obj/structure/window) in target_turf
|
||||
if(found_obj)
|
||||
if(HAS_FLAG(found_obj.flags, ON_BORDER) && found_obj.dir != reverse_dir[card_dir])
|
||||
if(HAS_FLAG(found_obj.atom_flags, ATOM_FLAG_CHECKS_BORDER) && found_obj.dir != reverse_dir[card_dir])
|
||||
continue
|
||||
found_obj.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), attacktext, TRUE)
|
||||
hostile_last_attack = world.time
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
density = 1
|
||||
layer = 4.0
|
||||
animate_movement = 2
|
||||
flags = PROXMOVE
|
||||
movable_flags = MOVABLE_FLAG_PROXMOVE
|
||||
sight = DEFAULT_SIGHT
|
||||
var/datum/mind/mind
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
name = "grab"
|
||||
icon = 'icons/mob/screen/generic.dmi'
|
||||
icon_state = "reinforce"
|
||||
flags = 0
|
||||
atom_flags = 0
|
||||
var/obj/screen/grab/hud = null
|
||||
var/mob/living/affecting = null
|
||||
var/mob/living/carbon/human/assailant = null
|
||||
@@ -151,7 +151,7 @@
|
||||
if(ishuman(affecting))
|
||||
var/mob/living/carbon/human/A = affecting
|
||||
var/obj/item/clothing/C = A.head
|
||||
if(C && (C.item_flags & THICKMATERIAL))
|
||||
if(C && (C.item_flags & ITEM_FLAG_THICK_MATERIAL))
|
||||
return
|
||||
if(!(A.species.flags & NO_BREATHE))
|
||||
A.losebreath = max(A.losebreath + 3, 5)
|
||||
@@ -301,7 +301,7 @@
|
||||
else if(state < GRAB_UPGRADING)
|
||||
if(ishuman(affecting))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
if(H.head && (H.head.item_flags & AIRTIGHT))
|
||||
if(H.head && (H.head.item_flags & ITEM_FLAG_AIRTIGHT))
|
||||
assailant.visible_message(SPAN_WARNING("[affecting]'s headgear prevents [assailant] from choking them out!"), SPAN_WARNING("[affecting]'s headgear prevents you from choking them out!"))
|
||||
return
|
||||
hud.icon_state = "kill1"
|
||||
|
||||
Reference in New Issue
Block a user