diff --git a/aurorastation.dme b/aurorastation.dme index 975cc1e88c8..87b09b2bbfc 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1425,6 +1425,7 @@ #include "code\modules\clothing\rings\rings.dm" #include "code\modules\clothing\sets\acting_captain.dm" #include "code\modules\clothing\sets\captain.dm" +#include "code\modules\clothing\sets\infiltrator.dm" #include "code\modules\clothing\sets\laser_tag.dm" #include "code\modules\clothing\shoes\colour.dm" #include "code\modules\clothing\shoes\jobs.dm" diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 3e3176bbea5..6639cb065cb 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -34,14 +34,13 @@ //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) -#define FLEXIBLEMATERIAL 0x20 // At the moment, masks with this flag will not prevent eating even if they are covering your face. -#define SOUNDPROTECTION 0x40 // whether wearing this item will protect you from loud noises such as flashbangs | this only works for ear slots or the head slot -#define LIGHTSTEP 0x80 // When applied to footwear, this makes it so that they don't trigger things like landmines and mouse traps -#define INJECTIONPORT 0x100 // Allows syringes and hyposprays to inject, even if the material is thick +#define AIRTIGHT 0x2 // Functions with internals. +#define NOSLIP 0x4 // Prevents from slipping on wet floors, in space, etc. +#define BLOCK_GAS_SMOKE_EFFECT 0x8 // Blocks the effect that chemical clouds would have on a mob -- glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) +#define FLEXIBLEMATERIAL 0x10 // At the moment, masks with this flag will not prevent eating even if they are covering your face. +#define SOUNDPROTECTION 0x20 // whether wearing this item will protect you from loud noises such as flashbangs | this only works for ear slots or the head slot +#define LIGHTSTEP 0x40 // When applied to footwear, this makes it so that they don't trigger things like landmines and mouse traps +#define INJECTIONPORT 0x80 // Allows syringes and hyposprays to inject, even if the material is thick // Flags for pass_flags. #define PASSTABLE 0x1 @@ -171,6 +170,13 @@ #define WARNING_LOW_PRESSURE 50 // This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE) #define HAZARD_LOW_PRESSURE 20 // This is when the black ultra-low pressure icon is displayed. (This one is set as a constant) +#define FIRESUIT_MAX_PRESSURE 20 * ONE_ATMOSPHERE // Firesuits and atmos voidsuits +#define RIG_MAX_PRESSURE 10 * ONE_ATMOSPHERE // Rigs +#define LIGHT_RIG_MAX_PRESSURE 5 * ONE_ATMOSPHERE // Rigs +#define ENG_VOIDSUIT_MAX_PRESSURE 10 * ONE_ATMOSPHERE +#define VOIDSUIT_MAX_PRESSURE 5 * ONE_ATMOSPHERE +#define SPACE_SUIT_MAX_PRESSURE 2 * ONE_ATMOSPHERE + #define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 // This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount. #define BODYTEMP_AUTORECOVERY_DIVISOR 12 // This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive. #define BODYTEMP_AUTORECOVERY_MINIMUM 1 // Minimum amount of kelvin moved toward 310.15K per tick. So long as abs(310.15 - bodytemp) is more than 50. diff --git a/code/datums/uplink/devices and tools.dm b/code/datums/uplink/devices and tools.dm index 0fb04b8f0ad..0d9731a93c8 100644 --- a/code/datums/uplink/devices and tools.dm +++ b/code/datums/uplink/devices and tools.dm @@ -87,6 +87,12 @@ item_cost = 2 path = /obj/item/storage/box/syndie_kit/space +/datum/uplink_item/item/tools/infiltration_kit + name = "Infiltration Kit" + desc = "A large infiltration case containing an undersuit, a mask, gloves, and shoes. It will protect you against the vacuum of space and two atmospheres of overpressure." + item_cost = 2 + path = /obj/item/storage/toolbox/infiltration + /datum/uplink_item/item/tools/thermal name = "Thermal Imaging Glasses" item_cost = 2 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 47c8d508711..cb4de247051 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -22,6 +22,8 @@ var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags + var/max_pressure_protection // Set this variable if the item protects its wearer against high pressures below an upper bound. Keep at null to disable protection. + var/min_pressure_protection // Set this variable if the item protects its wearer against low pressures above a lower bound. Keep at null to disable protection. 0 represents protection against hard vacuum. var/datum/action/item_action/action 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. @@ -920,3 +922,18 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. if(isFlameSource()) return TRUE return FALSE + +/obj/item/proc/get_pressure_weakness(pressure, zone) + . = 1 + if(pressure > ONE_ATMOSPHERE) + if(max_pressure_protection != null) + if(max_pressure_protection < pressure) + return min(1, round((pressure - max_pressure_protection) / max_pressure_protection, 0.01)) + else + return 0 + if(pressure < ONE_ATMOSPHERE) + if(min_pressure_protection != null) + if(min_pressure_protection > pressure) + return min(1, round((min_pressure_protection - pressure) / min_pressure_protection, 0.01)) + else + return 0 diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 24d1c0df1f3..4a856b14528 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -17,6 +17,7 @@ flags_inv = 0 w_class = ITEMSIZE_NORMAL siemens_coefficient = 0.9 + max_pressure_protection = FIRESUIT_MAX_PRESSURE light_wedge = LIGHT_WIDE drop_sound = 'sound/items/drop/helm.ogg' pickup_sound = 'sound/items/pickup/helm.ogg' diff --git a/code/modules/clothing/sets/infiltrator.dm b/code/modules/clothing/sets/infiltrator.dm new file mode 100644 index 00000000000..8a37caad2a5 --- /dev/null +++ b/code/modules/clothing/sets/infiltrator.dm @@ -0,0 +1,75 @@ +/obj/item/clothing/mask/breath/infiltrator + name = "infiltration balaclava" + desc = "A close-fitting airtight balaclava that can be connected to an air supply." + icon = 'icons/clothing/kit/infiltrator.dmi' + icon_state = "mask" + item_state = "mask" + icon_auto_adapt = TRUE + icon_supported_species_tags = list("una", "taj") + contained_sprite = TRUE + adjustable = FALSE + item_flags = THICKMATERIAL | INJECTIONPORT | AIRTIGHT + flags_inv = HIDEFACE|BLOCKHAIR + body_parts_covered = HEAD|FACE|EYES + max_pressure_protection = SPACE_SUIT_MAX_PRESSURE + min_pressure_protection = 0 + +/obj/item/clothing/under/infiltrator + name = "infiltration suit" + desc = "A tight undersuit with thin pieces of armor bolted to it. It's airtight." + icon = 'icons/clothing/kit/infiltrator.dmi' + icon_state = "uniform" + item_state = "uniform" + contained_sprite = TRUE + item_flags = THICKMATERIAL | INJECTIONPORT | AIRTIGHT + armor = list( + melee = ARMOR_MELEE_SMALL, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL + ) + max_pressure_protection = SPACE_SUIT_MAX_PRESSURE + min_pressure_protection = 0 + +/obj/item/clothing/gloves/infiltrator + name = "infiltration gloves" + desc = "Tight insulated gloves with interwoven self-cleaning material. It's airtight." + icon = 'icons/clothing/kit/infiltrator.dmi' + icon_state = "gloves" + item_state = "gloves" + contained_sprite = TRUE + siemens_coefficient = 0 + permeability_coefficient = 0.05 + germ_level = 0 + fingerprint_chance = 0 + item_flags = THICKMATERIAL | INJECTIONPORT | AIRTIGHT + max_pressure_protection = SPACE_SUIT_MAX_PRESSURE + min_pressure_protection = 0 + species_restricted = null + +/obj/item/clothing/shoes/infiltrator + name = "infiltration shoes" + desc = "Tight shoes with in-built Silent-Soles. It's airtight." + icon = 'icons/clothing/kit/infiltrator.dmi' + icon_state = "shoes" + item_state = "shoes" + contained_sprite = TRUE + silent = TRUE + item_flags = THICKMATERIAL | INJECTIONPORT | AIRTIGHT + max_pressure_protection = SPACE_SUIT_MAX_PRESSURE + min_pressure_protection = 0 + species_restricted = null + +/obj/item/storage/toolbox/infiltration + name = "infiltration case" + desc = "A case with an ominous red \"S\" painted on it. It seems pretty hefty." + icon = 'icons/clothing/kit/infiltrator.dmi' + icon_state = "case" + item_state = "case" + contained_sprite = TRUE + item_icons = null + starts_with = list( + /obj/item/clothing/mask/breath/infiltrator = 1, + /obj/item/clothing/under/infiltrator = 1, + /obj/item/clothing/gloves/infiltrator = 1, + /obj/item/clothing/shoes/infiltrator = 1 + ) \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index 75dec914f42..2f9e6c3eb88 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -228,3 +228,8 @@ var/global/list/breach_burn_descriptors = list( if(can_breach && breaches && breaches.len) for(var/datum/breach/B in breaches) to_chat(user, "It has \a [B.descriptor].") + +/obj/item/clothing/suit/space/get_pressure_weakness(pressure) + . = ..() + if(can_breach && damage) + . = min(1, . + damage * 0.1) \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 550291d0d1a..bdfcb04f46c 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -17,7 +17,8 @@ bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_RESISTANT ) - item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL + max_pressure_protection = FIRESUIT_MAX_PRESSURE + min_pressure_protection = 0 flags_inv = BLOCKHAIR siemens_coefficient = 0.6 @@ -34,7 +35,6 @@ bullet = ARMOR_BALLISTIC_MINOR, laser = ARMOR_LASER_MINOR ) - item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR siemens_coefficient = 0.9 @@ -44,7 +44,6 @@ desc = "Ho ho ho. Merrry X-mas!" icon_state = "santahat" item_state = "santahat" - item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR body_parts_covered = HEAD @@ -54,7 +53,6 @@ icon_state = "santa" item_state = "santa" slowdown = 0 - item_flags = STOPPRESSUREDAMAGE allowed = list(/obj/item) //for stuffing exta special presents //Space pirate outfit @@ -72,7 +70,6 @@ bio = ARMOR_BIO_SMALL, rad = ARMOR_RAD_MINOR ) - item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR body_parts_covered = 0 siemens_coefficient = 0.4 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 210b221e697..835f09b985d 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -27,6 +27,9 @@ ) min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE + max_pressure_protection = RIG_MAX_PRESSURE + min_pressure_protection = 0 + siemens_coefficient = 0.35 permeability_coefficient = 0.1 unacidable = 1 @@ -86,7 +89,7 @@ var/offline_slowdown = 3 // If the suit is deployed and unpowered, it sets slowdown to this. var/vision_restriction = TINT_NONE var/offline_vision_restriction = TINT_HEAVY - var/airtight = 1 //If set, will adjust AIRTIGHT and STOPPRESSUREDAMAGE flags on components. Otherwise it should leave them untouched. + var/airtight = 1 //If set, will adjust the AIRTIGHT flag on components. Otherwise it should leave them untouched. var/emp_protection = 0 @@ -210,7 +213,9 @@ if(!piece) continue piece.icon_state = "[initial(icon_state)]" if(airtight) - piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT) + piece.max_pressure_protection = initial(piece.max_pressure_protection) + piece.min_pressure_protection = initial(piece.min_pressure_protection) + piece.item_flags &= ~AIRTIGHT update_icon(1) /obj/item/rig/proc/toggle_seals(var/mob/initiator,var/instant) @@ -341,9 +346,13 @@ /obj/item/rig/proc/update_component_sealed() for(var/obj/item/piece in list(helmet,boots,gloves,chest)) if(canremove) - piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT) + piece.max_pressure_protection = initial(piece.max_pressure_protection) + piece.min_pressure_protection = initial(piece.min_pressure_protection) + piece.item_flags &= ~AIRTIGHT else - piece.item_flags |= (STOPPRESSUREDAMAGE|AIRTIGHT) + piece.max_pressure_protection = max_pressure_protection + piece.min_pressure_protection = min_pressure_protection + piece.item_flags |= AIRTIGHT update_icon(1) /obj/item/rig/process() diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index 77ac4d5d91e..eb95e3895bf 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -57,7 +57,7 @@ heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS flags_inv = HIDEJUMPSUIT|HIDETAIL - item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT + item_flags = 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 c8c9071f20e..7cd9efeb591 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -14,9 +14,11 @@ ) emp_protection = 10 slowdown = 0 - item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL + item_flags = THICKMATERIAL offline_slowdown = 0 offline_vision_restriction = 0 + max_pressure_protection = LIGHT_RIG_MAX_PRESSURE + min_pressure_protection = 0 chest_type = /obj/item/clothing/suit/space/rig/light helm_type = /obj/item/clothing/head/helmet/space/rig/light @@ -240,7 +242,6 @@ bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_SHIELDED ) - item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL slowdown = -1 offline_slowdown = 0 airtight = 1 diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index 7a7fd7b9311..da7841deaed 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -79,6 +79,8 @@ offline_slowdown = 7 offline_vision_restriction = TINT_HEAVY emp_protection = -20 + max_pressure_protection = FIRESUIT_MAX_PRESSURE + min_pressure_protection = 0 helm_type = /obj/item/clothing/head/helmet/space/rig/industrial chest_type = /obj/item/clothing/suit/space/rig/industrial @@ -173,6 +175,8 @@ offline_slowdown = 3 offline_vision_restriction = 0 max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE / 1.5 // Good against fires, but not as good as a proper firesuit / atmos voidsuit + max_pressure_protection = FIRESUIT_MAX_PRESSURE + min_pressure_protection = 0 helm_type = /obj/item/clothing/head/helmet/space/rig/ce glove_type = /obj/item/clothing/gloves/rig/ce diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index ce7e2273b9b..cfeb344b6fb 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -6,7 +6,7 @@ name = "space helmet" icon_state = "space" desc = "A special helmet designed for work in a hazardous, low-pressure environment." - item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | INJECTIONPORT | AIRTIGHT + item_flags = THICKMATERIAL | INJECTIONPORT | AIRTIGHT item_state_slots = list( slot_l_hand_str = "s_helmet", slot_r_hand_str = "s_helmet" @@ -20,6 +20,8 @@ body_parts_covered = HEAD|FACE|EYES cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE + min_pressure_protection = 0 + max_pressure_protection = SPACE_SUIT_MAX_PRESSURE siemens_coefficient = 0.5 species_restricted = list("exclude",BODYTYPE_DIONA,BODYTYPE_GOLEM) flash_protection = FLASH_PROTECTION_MAJOR @@ -40,7 +42,7 @@ w_class = ITEMSIZE_LARGE//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - item_flags = STOPPRESSUREDAMAGE|THICKMATERIAL|INJECTIONPORT + item_flags = THICKMATERIAL|INJECTIONPORT body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit) slowdown = 3 @@ -51,6 +53,8 @@ flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE + min_pressure_protection = 0 + max_pressure_protection = SPACE_SUIT_MAX_PRESSURE siemens_coefficient = 0.5 species_restricted = list("exclude",BODYTYPE_DIONA,BODYTYPE_GOLEM) diff --git a/code/modules/clothing/spacesuits/void/station.dm b/code/modules/clothing/spacesuits/void/station.dm index 8538f7eee0f..e363728e30f 100644 --- a/code/modules/clothing/spacesuits/void/station.dm +++ b/code/modules/clothing/spacesuits/void/station.dm @@ -16,6 +16,7 @@ bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_RESISTANT ) + max_pressure_protection = ENG_VOIDSUIT_MAX_PRESSURE light_overlay = "helmet_light_dual_low" brightness_on = 6 @@ -37,6 +38,7 @@ bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_RESISTANT ) + max_pressure_protection = ENG_VOIDSUIT_MAX_PRESSURE allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/pickaxe,/obj/item/material/twohanded/fireaxe,/obj/item/rfd/construction,/obj/item/storage/bag/inflatable) //Mining rig @@ -172,6 +174,7 @@ rad = ARMOR_RAD_SMALL ) max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE + 10000 // It is a suit designed for fire, enclosed + max_pressure_protection = FIRESUIT_MAX_PRESSURE light_overlay = "helmet_light_dual_low" brightness_on = 6 @@ -192,6 +195,7 @@ bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_SMALL ) + max_pressure_protection = FIRESUIT_MAX_PRESSURE allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/pickaxe,/obj/item/material/twohanded/fireaxe,/obj/item/rfd/construction,/obj/item/storage/bag/inflatable) max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE + 10000 // It is a suit designed for fire, enclosed @@ -259,4 +263,4 @@ bomb = ARMOR_BOMB_PADDED, bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_RESISTANT - ) \ No newline at end of file + ) diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 638ade5ea5d..c53bff8310d 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -15,6 +15,8 @@ rad = ARMOR_RAD_MINOR ) max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE + max_pressure_protection = VOIDSUIT_MAX_PRESSURE + min_pressure_protection = 0 siemens_coefficient = 0.5 //Species-specific stuff. diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 71af76981a9..0ebdbbb1f97 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -106,7 +106,7 @@ item_state = "swat_suit" gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL + item_flags = THICKMATERIAL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS allowed = list(/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/tank/emergency_oxygen) slowdown = 1 @@ -119,6 +119,8 @@ bio = ARMOR_BIO_SHIELDED, rad = ARMOR_RAD_SMALL ) + max_pressure_protection = FIRESUIT_MAX_PRESSURE + min_pressure_protection = 0 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 7daa634b93f..7087ddc81f4 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -22,6 +22,7 @@ allowed = list(/obj/item/device/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/extinguisher) slowdown = 1.0 flags_inv = HIDEWRISTS|HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL + max_pressure_protection = FIRESUIT_MAX_PRESSURE 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 @@ -58,7 +59,7 @@ desc = "Use in case of bomb." icon_state = "bombsuit" w_class = ITEMSIZE_HUGE//Too large to fit in a backpack - item_flags = STOPPRESSUREDAMAGE|THICKMATERIAL|BLOCK_GAS_SMOKE_EFFECT + item_flags = THICKMATERIAL|BLOCK_GAS_SMOKE_EFFECT armor = list( melee = ARMOR_MELEE_VERY_HIGH, bullet = ARMOR_BALLISTIC_MINOR, @@ -66,6 +67,7 @@ energy = ARMOR_ENERGY_RESISTANT, bomb = ARMOR_BOMB_SHIELDED ) + max_pressure_protection = FIRESUIT_MAX_PRESSURE siemens_coefficient = 0.1 flags_inv = HIDEMASK|HIDEEARS|HIDEEYES body_parts_covered = HEAD|FACE|EYES @@ -95,12 +97,13 @@ bomb = ARMOR_BOMB_SHIELDED ) siemens_coefficient = 0.1 - item_flags = STOPPRESSUREDAMAGE|THICKMATERIAL + item_flags = THICKMATERIAL flags_inv = HIDEJUMPSUIT|HIDETAIL heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE + max_pressure_protection = FIRESUIT_MAX_PRESSURE siemens_coefficient = 0 var/mob/living/carbon/human/wearer = null var/suit_temp = T20C diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index ae9123dfbce..cc181becf5d 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -399,6 +399,12 @@ var/list/slot_equipment_priority = list( \ drop_from_inventory(entry) qdel(entry) +/mob/proc/get_covering_equipped_items(var/body_parts) + . = list() + for(var/entry in get_equipped_items()) + var/obj/item/I = entry + if(I.body_parts_covered & body_parts) + . += I /mob/living/carbon/human/proc/equipOutfit(outfit, visualsOnly = FALSE) var/datum/outfit/O = null diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 514316f5c89..12e394b3f55 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -145,7 +145,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.min_pressure_protection == 0)) var/datum/component/armor/armor_component = helmet.GetComponent(/datum/component/armor) if(armor_component) damage_mod -= armor_component.get_blocked(BRUTE, damage_flags, W.armor_penetration, W.force*1.5) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index c830abcc55a..ca99e8fe2d0 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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|STOPPRESSUREDAMAGE))) + if((C.body_parts_covered & HEAD) && (C.item_flags & (AIRTIGHT))) return TRUE return FALSE diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 0856ba1f678..32fc04e570e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -104,22 +104,21 @@ if(!InStasis()) ..() -// Calculate how vulnerable the human is to under- and overpressure. -// Returns 0 (equals 0 %) if sealed in an undamaged suit, 1 if unprotected (equals 100%). +// Calculate how vulnerable the human is to the current pressure. +// Returns 0 (equals 0 %) if sealed in an undamaged suit that's rated for the pressure, 1 if unprotected (equals 100%). // Suitdamage can modifiy this in 10% steps. -/mob/living/carbon/human/get_pressure_weakness() - var/pressure_adjustment_coefficient = 1 // Assume no protection at first. - - 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. - if(istype(wear_suit,/obj/item/clothing/suit/space)) - var/obj/item/clothing/suit/space/S = wear_suit - if(S.can_breach && S.damage) - pressure_adjustment_coefficient += S.damage * 0.1 - - pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) // So it isn't less than 0 or larger than 1. +/mob/living/carbon/human/get_pressure_weakness(pressure) + var/pressure_adjustment_coefficient = 0 + var/list/zones = list(HEAD, UPPER_TORSO, LOWER_TORSO, LEGS, FEET, ARMS, HANDS) + for(var/zone in zones) + var/list/covers = get_covering_equipped_items(zone) + var/zone_exposure = 1 + for(var/obj/item/clothing/C in covers) + zone_exposure = min(zone_exposure, C.get_pressure_weakness(pressure,zone)) + if(zone_exposure >= 1) + return 1 + pressure_adjustment_coefficient = max(pressure_adjustment_coefficient, zone_exposure) + pressure_adjustment_coefficient = Clamp(pressure_adjustment_coefficient, 0, 1) // So it isn't less than 0 or larger than 1. return pressure_adjustment_coefficient diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 307be9f0f0e..ff57939d5e3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1089,6 +1089,7 @@ /mob/proc/get_pressure_weakness() return 1 + /mob/living/proc/flash_strong_pain() return diff --git a/html/changelogs/geeves-infiltration_slipsuit.yml b/html/changelogs/geeves-infiltration_slipsuit.yml new file mode 100644 index 00000000000..2addfbe4738 --- /dev/null +++ b/html/changelogs/geeves-infiltration_slipsuit.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added an infiltration kit to the Devices and Tools uplink. It spawns a case containing a mask, a uniform, gloves, and shoes, capable of protecting you from the vacuum of space, as well as two atmospheres of overpressure." + - rscadd: "Ported max and min pressure tolerances for items and clothing, meaning that certain gear will now protect better from overpressure, such as atmos voidsuits, firesuits, bomb suits, and to a lesser extent, engineering voidsuits." \ No newline at end of file diff --git a/icons/clothing/kit/infiltrator.dmi b/icons/clothing/kit/infiltrator.dmi new file mode 100644 index 00000000000..56ca57c101f Binary files /dev/null and b/icons/clothing/kit/infiltrator.dmi differ