diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index 1651769f80c..e5c9af7f736 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -24,7 +24,7 @@ mob/living/carbon/slime/airflow_stun() mob/living/carbon/human/airflow_stun() if(shoes) - if(shoes.flags & NOSLIP) return 0 + if(shoes.item_flags & NOSLIP) return 0 ..() atom/movable/proc/check_airflow_movable(n) @@ -78,7 +78,7 @@ obj/item/check_airflow_movable(n) if(istype(src, /mob/living/carbon/human)) if(src:buckled) return - if(src:shoes && src:shoes.flags & NOSLIP) + if(src:shoes && src:shoes.item_flags & NOSLIP) return src << "You are sucked away by airflow!" var/airflow_falloff = 9 - sqrt((x - airflow_dest.x) ** 2 + (y - airflow_dest.y) ** 2) @@ -142,7 +142,7 @@ obj/item/check_airflow_movable(n) return if(src:shoes) if(istype(src:shoes, /obj/item/clothing/shoes/magboots)) - if(src:shoes.flags & NOSLIP) + if(src:shoes.item_flags & NOSLIP) return src << "You are pushed away by airflow!" last_airflow = world.time diff --git a/code/__defines/admin.dm b/code/__defines/admin.dm index 4783018fcbe..1e64ed8a1b5 100644 --- a/code/__defines/admin.dm +++ b/code/__defines/admin.dm @@ -5,7 +5,7 @@ #define MUTE_OOC 0x2 #define MUTE_PRAY 0x4 #define MUTE_ADMINHELP 0x8 -#define MUTE_DEADCHAT 0x16 +#define MUTE_DEADCHAT 0x10 #define MUTE_ALL 0xFFFF // Number of identical messages required to get the spam-prevention auto-mute thing to trigger warnings and automutes. diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 400e88b66cf..bfc8969dc05 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -23,28 +23,29 @@ #define SLOT_HOLSTER 0x8000 //16th bit - higher than this will overflow // Flags bitmasks. -#define STOPPRESSUREDAMAGE 0x1 // This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere - // To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. -#define NOBLUDGEON 0x2 // When an item has this it produces no "X has been hit by Y with Z" message with the default handler. -#define AIRTIGHT 0x4 // Functions with internals. -#define USEDELAY 0x8 // 1 second extra delay on use. (Can be used once every 2s) -#define CONDUCT 0x10 // Conducts electricity. (metal etc.) -#define ON_BORDER 0x20 // Item has priority to check when entering or leaving. -#define NOBLOODY 0x40 // Used for items if they don't want to get a blood overlay. -#define NODELAY 0x80 // 1 second attack-by delay skipped (Can be used once every 0.2s). Most objects have a 1s attack-by delay, which doesn't require a flag. -#define PROXMOVE 0x8000 // Does this object require proximity checking in Enter()? +#define NOBLUDGEON 0x1 // When an item has this it produces no "X has been hit by Y with Z" message with the default handler. +#define USEDELAY 0x2 // 1 second extra delay on use. (Can be used once every 2s) +#define CONDUCT 0x4 // Conducts electricity. (metal etc.) +#define ON_BORDER 0x8 // Item has priority to check when entering or leaving. +#define NOBLOODY 0x10 // Used for items if they don't want to get a blood overlay. +#define NODELAY 0x20 // 1 second attack-by delay skipped (Can be used once every 0.2s). Most objects have a 1s attack-by delay, which doesn't require a flag. +#define PROXMOVE 0x200 // Does this object require proximity checking in Enter()? //Use these flags to indicate if an item obscures the specified slots from view, whereas body_parts_covered seems to be used to indicate what body parts the item protects. #define MASKCOVERSMOUTH 0x100 // On other items, these are just for mask/head. #define HEADCOVERSMOUTH 0x100 -#define THICKMATERIAL 0x200 // From /tg/station: prevents syringes, parapens and hyposprays if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with NOSLIP for shoes) -#define NOSLIP 0x400 // Prevents from slipping on wet floors, in space, etc. #define OPENCONTAINER 0x800 // Is an open container for chemistry purposes. -#define BLOCK_GAS_SMOKE_EFFECT 0x1000 // Blocks the effect that chemical clouds would have on a mob -- glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) #define PHORONGUARD 0x2000 // Does not get contaminated by phoron. #define NOREACT 0x4000 // Reagents don't react inside this container. +//Flags for items (equipment) +#define THICKMATERIAL 0x1 // Prevents syringes, parapens and hyposprays if equiped to slot_suit or slot_head. +#define STOPPRESSUREDAMAGE 0x2 // Counts towards pressure protection. Note that like temperature protection, body_parts_covered is considered here as well. +#define AIRTIGHT 0x4 // Functions with internals. +#define NOSLIP 0x8 // Prevents from slipping on wet floors, in space, etc. +#define BLOCK_GAS_SMOKE_EFFECT 0x10 // Blocks the effect that chemical clouds would have on a mob -- glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) + // Flags for pass_flags. #define PASSTABLE 0x1 #define PASSGLASS 0x2 diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 9d6d65f9890..d4f323e323d 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -278,7 +278,7 @@ var/no_mask if(!(C.wear_mask && C.wear_mask.flags & AIRTIGHT)) var/mob/living/carbon/human/H = C - if(!(H.head && H.head.flags & AIRTIGHT)) + if(!(H.head && H.head.item_flags & AIRTIGHT)) no_mask = 1 if(no_mask) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 67fdd6bb343..527b4dea61f 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -266,8 +266,8 @@ var/list/mob/living/forced_ambiance_list = new for(var/mob/M in A) if(has_gravity) - thunk(M) - M.update_floating( M.Check_Dense_Object() ) + thunk(M) + M.update_floating( M.Check_Dense_Object() ) /area/proc/thunk(mob) if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing. @@ -275,7 +275,7 @@ var/list/mob/living/forced_ambiance_list = new if(istype(mob,/mob/living/carbon/human/)) var/mob/living/carbon/human/H = mob - if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) + if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.item_flags & NOSLIP)) return if(H.m_intent == "run") diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index ec3881cdbe6..75697cefdcf 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -198,11 +198,11 @@ steam.start() -- spawns the effect if (istype(M)) return 0 if (M.internal != null) - if(M.wear_mask && (M.wear_mask.flags & AIRTIGHT)) + if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT)) return 0 if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M - if(H.head && (H.head.flags & AIRTIGHT)) + if(H.head && (H.head.item_flags & AIRTIGHT)) return 0 return 0 return 1 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 70b03a977c0..34625759e33 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -25,9 +25,13 @@ var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button. var/action_button_is_hands_free = 0 //If 1, bypass the restrained, lying, and stunned checks action buttons normally test for - //Since any item can now be a piece of clothing, this has to be put here so all items share it. - var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc. + //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc. + //It should be used purely for appearance. For gameplay effects caused by items covering body parts, use body_parts_covered. + var/flags_inv = 0 var/body_parts_covered = 0 //see setup.dm for appropriate bit flags + + var/item_flags = 0 //Miscellaneous flags pertaining to equippable objects. + //var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets) var/permeability_coefficient = 1 // for chemicals/diseases diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 049d179846f..8746b5142ab 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -144,11 +144,11 @@ mask_check = 1 if(mask_check) - if(location.wear_mask && (location.wear_mask.flags & AIRTIGHT)) + if(location.wear_mask && (location.wear_mask.item_flags & AIRTIGHT)) data["maskConnected"] = 1 else if(istype(location, /mob/living/carbon/human)) var/mob/living/carbon/human/H = location - if(H.head && (H.head.flags & AIRTIGHT)) + if(H.head && (H.head.item_flags & AIRTIGHT)) data["maskConnected"] = 1 // update the ui if it exists, returns null if no ui is passed/found @@ -192,11 +192,11 @@ else var/can_open_valve - if(location.wear_mask && (location.wear_mask.flags & AIRTIGHT)) + if(location.wear_mask && (location.wear_mask.item_flags & AIRTIGHT)) can_open_valve = 1 else if(istype(location,/mob/living/carbon/human)) var/mob/living/carbon/human/H = location - if(H.head && (H.head.flags & AIRTIGHT)) + if(H.head && (H.head.item_flags & AIRTIGHT)) can_open_valve = 1 if(can_open_valve) diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index a98d747bfd4..d344d3b34c3 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -14,13 +14,13 @@ /obj/item/clothing/head/hardhat/red icon_state = "hardhat0_red" name = "firefighter helmet" - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE heat_protection = HEAD max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE /obj/item/clothing/head/hardhat/white icon_state = "hardhat0_white" - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE heat_protection = HEAD max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index e9bf5befef5..e51b6a28525 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -6,7 +6,7 @@ slot_l_hand_str = "helmet", slot_r_hand_str = "helmet", ) - flags = THICKMATERIAL + item_flags = THICKMATERIAL body_parts_covered = HEAD armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0) flags_inv = HIDEEARS|HIDEEYES diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 4fdaae19f36..6d38d3f79fc 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -3,7 +3,8 @@ name = "breath mask" icon_state = "breath" item_state = "breath" - flags = MASKCOVERSMOUTH | AIRTIGHT + flags = MASKCOVERSMOUTH + item_flags = AIRTIGHT body_parts_covered = 0 w_class = 2 gas_transfer_coefficient = 0.10 @@ -20,7 +21,8 @@ if(!src.hanging) src.hanging = !src.hanging gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa - flags &= ~(MASKCOVERSMOUTH | AIRTIGHT) + flags &= ~(MASKCOVERSMOUTH) + item_flags &= ~(AIRTIGHT) body_parts_covered = 0 icon_state = "breathdown" user << "Your mask is now hanging on your neck." @@ -28,7 +30,8 @@ else src.hanging = !src.hanging gas_transfer_coefficient = initial(gas_transfer_coefficient) - flags |= MASKCOVERSMOUTH | AIRTIGHT + flags |= MASKCOVERSMOUTH + item_flags |= AIRTIGHT body_parts_covered = initial(body_parts_covered) icon_state = "breath" user << "You pull the mask up to cover your face." diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 6111668f91f..4ceceb590dc 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -2,7 +2,8 @@ name = "gas mask" desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air." icon_state = "gas_alt" - flags = MASKCOVERSMOUTH | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT + flags = MASKCOVERSMOUTH + item_flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT flags_inv = HIDEEARS|HIDEEYES|HIDEFACE body_parts_covered = FACE|EYES w_class = 3.0 diff --git a/code/modules/clothing/shoes/jobs.dm b/code/modules/clothing/shoes/jobs.dm index 001634b96ea..21d138cc0ce 100644 --- a/code/modules/clothing/shoes/jobs.dm +++ b/code/modules/clothing/shoes/jobs.dm @@ -3,7 +3,7 @@ name = "galoshes" icon_state = "galoshes" permeability_coefficient = 0.05 - flags = NOSLIP + item_flags = NOSLIP slowdown = SHOES_SLOWDOWN+1 species_restricted = null diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index d1c896f1f40..c8aed12907d 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -18,14 +18,14 @@ /obj/item/clothing/shoes/magboots/attack_self(mob/user) if(magpulse) - flags &= ~NOSLIP + item_flags &= ~NOSLIP magpulse = 0 set_slowdown() force = 3 if(icon_base) icon_state = "[icon_base]0" user << "You disable the mag-pulse traction system." else - flags |= NOSLIP + item_flags |= NOSLIP magpulse = 1 set_slowdown() force = 5 @@ -70,6 +70,6 @@ /obj/item/clothing/shoes/magboots/examine(mob/user) ..(user) var/state = "disabled" - if(src.flags&NOSLIP) + if(item_flags & NOSLIP) state = "enabled" user << "Its mag-pulse traction system appears to be [state]." \ No newline at end of file diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 22526a208c0..415c3debf09 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -4,7 +4,7 @@ icon_state = "brown" item_state = "brown" permeability_coefficient = 0.05 - flags = NOSLIP + item_flags = NOSLIP origin_tech = list(TECH_ILLEGAL = 3) var/list/clothing_choices = list() siemens_coefficient = 0.8 @@ -20,7 +20,7 @@ icon_state = "swat" force = 3 armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) - flags = NOSLIP + item_flags = NOSLIP siemens_coefficient = 0.6 /obj/item/clothing/shoes/combat //Basically SWAT shoes combined with galoshes. @@ -29,7 +29,7 @@ icon_state = "swat" force = 5 armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) - flags = NOSLIP + item_flags = NOSLIP siemens_coefficient = 0.6 cold_protection = FEET @@ -120,6 +120,6 @@ desc = "Help you swim good." name = "swimming fins" icon_state = "flippers" - flags = NOSLIP + item_flags = NOSLIP slowdown = SHOES_SLOWDOWN+1 species_restricted = null diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index 0dc5f91abad..9d1156da9fc 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -45,7 +45,7 @@ /obj/item/clothing/head/helmet/space/vox armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.6 - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE species_restricted = list("Vox") sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi') @@ -135,7 +135,7 @@ /obj/item/clothing/shoes/magboots/vox/attack_self(mob/user) if(src.magpulse) - flags &= ~NOSLIP + item_flags &= ~NOSLIP magpulse = 0 canremove = 1 user << "You relax your deathgrip on the flooring." @@ -148,7 +148,7 @@ user << "You will have to put on the [src] before you can do that." return - flags |= NOSLIP + item_flags |= NOSLIP magpulse = 1 canremove = 0 //kinda hard to take off magclaws when you are gripping them tightly. user << "You dig your claws deeply into the flooring, bracing yourself." @@ -160,7 +160,7 @@ ..() if(src.magpulse) user.visible_message("The [src] go limp as they are removed from [usr]'s feet.", "The [src] go limp as they are removed from your feet.") - flags &= ~NOSLIP + item_flags &= ~NOSLIP magpulse = 0 canremove = 1 diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index b1dc5596ae0..91185ccfce4 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -4,7 +4,7 @@ icon_state = "capspace" item_state = "capspace" desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads." - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE flags_inv = HIDEFACE|BLOCKHAIR permeability_coefficient = 0.01 armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50) @@ -18,7 +18,7 @@ w_class = 4 gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) slowdown = 1.5 diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 9c3ae9d5d39..5c70616c1bf 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -17,7 +17,7 @@ w_class = 4 gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) slowdown = 1.5 @@ -37,7 +37,8 @@ slot_r_hand_str = "syndicate-helm-black-red", ) armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 100, rad = 60) - flags = HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL + flags = HEADCOVERSMOUTH + item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL flags_inv = BLOCKHAIR siemens_coefficient = 0.6 @@ -47,7 +48,7 @@ desc = "An armored beret commonly used by special operations officers." icon_state = "beret_badge" armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30) - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR siemens_coefficient = 0.9 @@ -57,7 +58,7 @@ desc = "Ho ho ho. Merrry X-mas!" icon_state = "santahat" item_state = "santahat" - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR body_parts_covered = HEAD @@ -67,7 +68,7 @@ icon_state = "santa" item_state = "santa" slowdown = 0 - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE allowed = list(/obj/item) //for stuffing exta special presents //Space pirate outfit @@ -77,7 +78,7 @@ icon_state = "pirate" item_state = "pirate" armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR body_parts_covered = 0 siemens_coefficient = 0.9 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 60197daef79..519770a6cea 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -179,9 +179,8 @@ for(var/obj/item/piece in list(helmet,boots,gloves,chest)) if(!piece) continue piece.icon_state = "[initial(icon_state)]" - if(airtight) - piece.flags &= ~STOPPRESSUREDAMAGE - piece.flags &= ~AIRTIGHT + if(airtight) + piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT) update_icon(1) /obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant) @@ -269,9 +268,9 @@ for(var/obj/item/piece in list(helmet,boots,gloves,chest)) if(!piece) continue piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]" - canremove = !seal_target + canremove = !seal_target if(airtight) - update_component_sealed() + update_component_sealed() update_icon(1) return 0 @@ -289,11 +288,10 @@ /obj/item/weapon/rig/proc/update_component_sealed() for(var/obj/item/piece in list(helmet,boots,gloves,chest)) if(canremove) - piece.flags &= ~STOPPRESSUREDAMAGE - piece.flags &= ~AIRTIGHT - else - piece.flags |= STOPPRESSUREDAMAGE - piece.flags |= AIRTIGHT + piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT) + else + piece.item_flags |= (STOPPRESSUREDAMAGE|AIRTIGHT) + update_icon(1) /obj/item/weapon/rig/process() diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index 9440993e6a6..d7f8b3f38f9 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -4,7 +4,8 @@ /obj/item/clothing/head/helmet/space/rig name = "helmet" - flags = HEADCOVERSMOUTH | THICKMATERIAL + flags = HEADCOVERSMOUTH + item_flags = THICKMATERIAL flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES heat_protection = HEAD|FACE|EYES @@ -15,7 +16,7 @@ /obj/item/clothing/gloves/rig name = "gauntlets" - flags = THICKMATERIAL + item_flags = THICKMATERIAL body_parts_covered = HANDS heat_protection = HANDS cold_protection = HANDS @@ -38,7 +39,7 @@ heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS flags_inv = HIDEJUMPSUIT|HIDETAIL - flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT + item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT slowdown = 0 //will reach 10 breach damage after 25 laser carbine blasts, 3 revolver hits, or ~1 PTR hit. Completely immune to smg or sts hits. breach_threshold = 38 diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 270e7a37613..cf941f678e7 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -8,7 +8,7 @@ armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) emp_protection = 10 slowdown = 0 - flags = STOPPRESSUREDAMAGE | THICKMATERIAL + item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL offline_slowdown = 0 offline_vision_restriction = 0 diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index d08c4fab1a3..262015d4a1d 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -6,7 +6,8 @@ name = "Space helmet" icon_state = "space" desc = "A special helmet designed for work in a hazardous, low-pressure environment." - flags = HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT + flags = HEADCOVERSMOUTH + item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT flags_inv = BLOCKHAIR item_state_slots = list( slot_l_hand_str = "s_helmet", @@ -55,7 +56,7 @@ w_class = 4//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags = STOPPRESSUREDAMAGE | THICKMATERIAL + item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit) slowdown = 3 diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 9f4f0c78df9..0c3d93ff203 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -2,7 +2,7 @@ /obj/item/clothing/suit/armor allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) body_parts_covered = UPPER_TORSO|LOWER_TORSO - flags = THICKMATERIAL + item_flags = THICKMATERIAL cold_protection = UPPER_TORSO|LOWER_TORSO min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE @@ -70,7 +70,7 @@ item_state = "swat_suit" gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - flags = STOPPRESSUREDAMAGE | THICKMATERIAL + item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) slowdown = 1 diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 74f1cc4d511..859b7d57a9d 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -21,7 +21,7 @@ allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/extinguisher) slowdown = 1.0 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL - flags = STOPPRESSUREDAMAGE + item_flags = STOPPRESSUREDAMAGE heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 977059ab958..2ba0e6b509a 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -153,7 +153,7 @@ if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M - if(H.shoes && H.shoes.flags & NOSLIP) + if(H.shoes && H.shoes.item_flags & NOSLIP) return M.stop_pulling() diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index 9d99a212f64..c9ed2ee79ef 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -73,7 +73,7 @@ var/can_grab = 1 if(istype(victim, /mob/living/carbon/human)) var/mob/living/carbon/human/H = victim - if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) + if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.item_flags & NOSLIP)) can_grab = 0 if(can_grab) src.visible_message("Tendrils lash out from \the [src] and drag \the [victim] in!") diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index dc23b570942..d1cd0ca2ad7 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -32,7 +32,7 @@ if(internal) if (!contents.Find(internal)) internal = null - if (!(wear_mask && (wear_mask.flags & AIRTIGHT))) + if (!(wear_mask && (wear_mask.item_flags & AIRTIGHT))) internal = null if(internal) if (internals) @@ -65,7 +65,7 @@ //Handle possble chem smoke effect /mob/living/carbon/proc/handle_chemical_smoke(var/datum/gas_mixture/environment) - if(wear_mask && (wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)) + if(wear_mask && (wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT)) return for(var/obj/effect/effect/smoke/chem/smoke in view(1, src)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 59a8f2c8128..310225d7364 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1225,10 +1225,10 @@ else switch(target_zone) if("head") - if(head && head.flags & THICKMATERIAL) + if(head && head.item_flags & THICKMATERIAL) . = 0 else - if(wear_suit && wear_suit.flags & THICKMATERIAL) + if(wear_suit && wear_suit.item_flags & THICKMATERIAL) . = 0 if(!. && error_msg && user) if(!fail_msg) @@ -1301,7 +1301,7 @@ return 0 /mob/living/carbon/human/slip(var/slipped_on, stun_duration=8) - if((species.flags & NO_SLIP) || (shoes && (shoes.flags & NOSLIP))) + if((species.flags & NO_SLIP) || (shoes && (shoes.item_flags & NOSLIP))) return 0 ..(slipped_on,stun_duration) @@ -1369,6 +1369,6 @@ handle_regular_hud_updates() /mob/living/carbon/human/Check_Shoegrip() - if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.flags & NOSLIP)) //magboots + dense_object = no floating + if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.item_flags & NOSLIP)) //magboots + dense_object = no floating return 1 return 0 diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index f4b28d2b6b0..29eff929dce 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -97,7 +97,7 @@ prob_slip = 0 // Changing this to zero to make it line up with the comment, and also, make more sense. //Do we have magboots or such on if so no slip - if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.flags & NOSLIP)) + if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.item_flags & NOSLIP)) prob_slip = 0 //Check hands and mod slip diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index ac8848dcb1c..05ca35ac145 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -108,7 +108,7 @@ var/pressure_adjustment_coefficient = 1 // Assume no protection at first. - if(wear_suit && (wear_suit.flags & STOPPRESSUREDAMAGE) && head && (head.flags & STOPPRESSUREDAMAGE)) // Complete set of pressure-proof suit worn, assume fully sealed. + if(wear_suit && (wear_suit.item_flags & STOPPRESSUREDAMAGE) && head && (head.item_flags & STOPPRESSUREDAMAGE)) // Complete set of pressure-proof suit worn, assume fully sealed. pressure_adjustment_coefficient = 0 // Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure protection. @@ -303,11 +303,11 @@ /** breathing **/ /mob/living/carbon/human/handle_chemical_smoke(var/datum/gas_mixture/environment) - if(wear_mask && (wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)) + if(wear_mask && (wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT)) return - if(glasses && (glasses.flags & BLOCK_GAS_SMOKE_EFFECT)) + if(glasses && (glasses.item_flags & BLOCK_GAS_SMOKE_EFFECT)) return - if(head && (head.flags & BLOCK_GAS_SMOKE_EFFECT)) + if(head && (head.item_flags & BLOCK_GAS_SMOKE_EFFECT)) return ..() @@ -328,7 +328,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.flags & AIRTIGHT)) || (head && (head.flags & AIRTIGHT))))) + if (!rig_supply && (!contents.Find(internal) || !((wear_mask && (wear_mask.item_flags & AIRTIGHT)) || (head && (head.item_flags & AIRTIGHT))))) internal = null if(internal) diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm index b21f5b5d6c4..187894f4471 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm @@ -15,7 +15,7 @@ var/const/MAX_ACTIVE_TIME = 400 icon_state = "facehugger" item_state = "facehugger" w_class = 3 //note: can be picked up by aliens unlike most other items of w_class below 4 - flags = MASKCOVERSMOUTH | AIRTIGHT | PROXMOVE + flags = MASKCOVERSMOUTH | PROXMOVE body_parts_covered = FACE|EYES throw_range = 5 diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 009d7d191c9..fd6d71150a1 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -346,7 +346,7 @@ var/damage_mod = 1 //presumably, if they are wearing a helmet that stops pressure effects, then it probably covers the throat as well var/obj/item/clothing/head/helmet = get_equipped_item(slot_head) - if(istype(helmet) && (helmet.body_parts_covered & HEAD) && (helmet.flags & STOPPRESSUREDAMAGE)) + if(istype(helmet) && (helmet.body_parts_covered & HEAD) && (helmet.item_flags & STOPPRESSUREDAMAGE)) //we don't do an armor_check here because this is not an impact effect like a weapon swung with momentum, that either penetrates or glances off. damage_mod = 1.0 - (helmet.armor["melee"]/100) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index bb333b82c54..eb3540f9d01 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -451,8 +451,8 @@ if(!Check_Dense_Object()) //Nothing to push off of so end here update_floating(0) return 0 - - update_floating(1) + + update_floating(1) if(restrained()) //Check to see if we can do things return 0 @@ -478,10 +478,10 @@ if(istype(turf,/turf/simulated/floor)) // Floors don't count if they don't have gravity var/area/A = turf.loc - if(istype(A) && A.has_gravity == 0) + if(istype(A) && A.has_gravity == 0) if(shoegrip == null) shoegrip = Check_Shoegrip() //Shoegrip is only ever checked when a zero-gravity floor is encountered to reduce load - if(!shoegrip) + if(!shoegrip) continue dense_object++ diff --git a/code/modules/power/singularity/act.dm b/code/modules/power/singularity/act.dm index 01e74305412..157f0c5b480 100644 --- a/code/modules/power/singularity/act.dm +++ b/code/modules/power/singularity/act.dm @@ -34,7 +34,7 @@ src << "The [S] pulls \the [hand] from your grip!" apply_effect(current_size * 3, IRRADIATE) if(shoes) - if(shoes.flags & NOSLIP) return 0 + if(shoes.item_flags & NOSLIP) return 0 ..() /obj/singularity_act()