From 8df0f8cc75db628dc7c377aa950b3ca35bcd29dd Mon Sep 17 00:00:00 2001 From: atermonera Date: Thu, 20 Dec 2018 21:38:34 -0800 Subject: [PATCH] Tweaks values, reduces oxyloss while in soft vacuum or protection --- code/modules/clothing/head/hardhat.dm | 8 +++---- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- .../clothing/spacesuits/rig/suits/light.dm | 2 ++ .../clothing/spacesuits/rig/suits/station.dm | 5 ++++- .../modules/clothing/spacesuits/spacesuits.dm | 4 ++-- .../clothing/spacesuits/void/station.dm | 12 +++++++---- code/modules/clothing/spacesuits/void/void.dm | 4 ++++ code/modules/clothing/suits/utility.dm | 4 ++-- code/modules/mob/living/carbon/human/life.dm | 21 ++++++++++++++----- .../xenoarcheaology/tools/equipment.dm | 4 ++-- polaris.dme | 2 +- 11 files changed, 46 insertions(+), 22 deletions(-) diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 200e087ec2..558f30fbd9 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -20,8 +20,8 @@ name = "firefighter helmet" heat_protection = HEAD max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE - min_pressure_protection = 0.8* ONE_ATMOSPHERE - max_pressure_protection = 50 * ONE_ATMOSPHERE + min_pressure_protection = 0.2* ONE_ATMOSPHERE + max_pressure_protection = 20 * ONE_ATMOSPHERE /obj/item/clothing/head/hardhat/white @@ -29,8 +29,8 @@ name = "sleek hard hat" heat_protection = HEAD max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE - min_pressure_protection = 0.8* ONE_ATMOSPHERE - max_pressure_protection = 50 * ONE_ATMOSPHERE + min_pressure_protection = 0.2* ONE_ATMOSPHERE + max_pressure_protection = 20 * ONE_ATMOSPHERE /obj/item/clothing/head/hardhat/dblue name = "blue hard hat" diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 2102b40c92..075870490e 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -84,7 +84,7 @@ var/vision_restriction var/offline_vision_restriction = 1 // 0 - none, 1 - welder vision, 2 - blind. Maybe move this to helmets. var/airtight = 1 //If set, will adjust AIRTIGHT flag and pressure protections on components. Otherwise it should leave them untouched. - var/rigsuit_max_pressure = 20 * ONE_ATMOSPHERE // Max pressure the rig protects against when sealed + var/rigsuit_max_pressure = 10 * ONE_ATMOSPHERE // Max pressure the rig protects against when sealed var/rigsuit_min_pressure = 0 // Min pressure the rig protects against when sealed var/emp_protection = 0 diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 31e6e9c771..9febceb5aa 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -16,6 +16,8 @@ helm_type = /obj/item/clothing/head/helmet/space/rig/light boot_type = /obj/item/clothing/shoes/magboots/rig/light glove_type = /obj/item/clothing/gloves/gauntlets/rig/light + rigsuit_max_pressure = 5 * ONE_ATMOSPHERE // Max pressure the rig protects against when sealed + rigsuit_min_pressure = 0 // Min pressure the rig protects against when sealed /obj/item/clothing/suit/space/rig/light name = "suit" diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index e883e12f52..84dfb2bf16 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -74,6 +74,8 @@ offline_vision_restriction = 2 emp_protection = -20 siemens_coefficient= 0.75 + rigsuit_max_pressure = 15 * ONE_ATMOSPHERE // Max pressure the rig protects against when sealed + rigsuit_min_pressure = 0 // Min pressure the rig protects against when sealed helm_type = /obj/item/clothing/head/helmet/space/rig/industrial @@ -155,7 +157,8 @@ offline_slowdown = 0 offline_vision_restriction = 0 siemens_coefficient= 0.75 - rigsuit_max_pressure = 100 * ONE_ATMOSPHERE // Comparable to atmos suit + rigsuit_max_pressure = 20 * ONE_ATMOSPHERE // Max pressure the rig protects against when sealed + rigsuit_min_pressure = 0 // Min pressure the rig protects against when sealed helm_type = /obj/item/clothing/head/helmet/space/rig/ce glove_type = /obj/item/clothing/gloves/gauntlets/rig/ce diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 98aa9d5490..78f4967779 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -15,7 +15,7 @@ cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE min_pressure_protection = 0 * ONE_ATMOSPHERE - max_pressure_protection = 20* ONE_ATMOSPHERE + max_pressure_protection = 2 * ONE_ATMOSPHERE siemens_coefficient = 0.9 species_restricted = list("exclude",SPECIES_DIONA) preserve_item = 1 @@ -67,7 +67,7 @@ cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE min_pressure_protection = 0 * ONE_ATMOSPHERE - max_pressure_protection = 20* ONE_ATMOSPHERE + max_pressure_protection = 2 * ONE_ATMOSPHERE siemens_coefficient = 0.9 species_restricted = list("exclude",SPECIES_DIONA) preserve_item = 1 diff --git a/code/modules/clothing/spacesuits/void/station.dm b/code/modules/clothing/spacesuits/void/station.dm index 71e60f6dc8..2168fbb1b5 100644 --- a/code/modules/clothing/spacesuits/void/station.dm +++ b/code/modules/clothing/spacesuits/void/station.dm @@ -6,6 +6,8 @@ icon_state = "rig0-engineering" item_state_slots = list(slot_r_hand_str = "eng_helm", slot_l_hand_str = "eng_helm") armor = list(melee = 40, bullet = 5, laser = 20, energy = 5, bomb = 35, bio = 100, rad = 80) + min_pressure_protection = 0 * ONE_ATMOSPHERE + max_pressure_protection = 15 * ONE_ATMOSPHERE /obj/item/clothing/suit/space/void/engineering name = "engineering voidsuit" @@ -15,6 +17,8 @@ slowdown = 1 armor = list(melee = 40, bullet = 5, laser = 20, energy = 5, bomb = 35, bio = 100, rad = 80) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd) + min_pressure_protection = 0 * ONE_ATMOSPHERE + max_pressure_protection = 15 * ONE_ATMOSPHERE //Engineering HAZMAT Voidsuit @@ -219,8 +223,8 @@ armor = list(melee = 40, bullet = 5, laser = 20, energy = 5, bomb = 35, bio = 100, rad = 50) max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE light_overlay = "helmet_light_dual" - min_pressure_protection = 0 * ONE_ATMOSPHERE - max_pressure_protection = 100* ONE_ATMOSPHERE + min_pressure_protection = 0 * ONE_ATMOSPHERE + max_pressure_protection = 20* ONE_ATMOSPHERE /obj/item/clothing/suit/space/void/atmos name = "atmos voidsuit" @@ -229,8 +233,8 @@ item_state_slots = list(slot_r_hand_str = "atmos_voidsuit", slot_l_hand_str = "atmos_voidsuit") armor = list(melee = 40, bullet = 5, laser = 20, energy = 5, bomb = 35, bio = 100, rad = 50) max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE - min_pressure_protection = 0 * ONE_ATMOSPHERE - max_pressure_protection = 100* ONE_ATMOSPHERE + min_pressure_protection = 0 * ONE_ATMOSPHERE + max_pressure_protection = 20* ONE_ATMOSPHERE //Atmospherics Surplus Voidsuit diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index d755540b91..4dd21ad3bb 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -7,6 +7,8 @@ heat_protection = HEAD armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20) max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE + min_pressure_protection = 0 * ONE_ATMOSPHERE + max_pressure_protection = 10 * ONE_ATMOSPHERE // flags_inv = HIDEEARS|BLOCKHAIR @@ -37,6 +39,8 @@ allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE + min_pressure_protection = 0 * ONE_ATMOSPHERE + max_pressure_protection = 10 * ONE_ATMOSPHERE species_restricted = list("Human", SPECIES_SKRELL, "Promethean") sprite_sheets_refit = list( diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 93434ce403..0ecbe0390d 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -24,8 +24,8 @@ 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 - min_pressure_protection = 0.8 * ONE_ATMOSPHERE - max_pressure_protection = 50 * ONE_ATMOSPHERE + min_pressure_protection = 0.2 * ONE_ATMOSPHERE + max_pressure_protection = 20 * ONE_ATMOSPHERE /obj/item/clothing/suit/fire/firefighter diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index dc8e1f768c..9a1235524b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -139,12 +139,12 @@ if(head && head.max_pressure_protection != null && head.min_pressure_protection != null) // Pressure is too high if(head.max_pressure_protection < pressure) - // Protection scales down from 100% at the boundary to 0% at 10% in excess of the boundary - pressure_adjustment_coefficient += round((pressure - head.max_pressure_protection) / (head.max_pressure_protection/10)) + // Protection scales down from 100% at the boundary to 0% at 20% in excess of the boundary + pressure_adjustment_coefficient += round((pressure - head.max_pressure_protection) / (head.max_pressure_protection/20)) // Pressure is too low if(head.min_pressure_protection > pressure) - pressure_adjustment_coefficient += round((head.min_pressure_protection - pressure) / (head.min_pressure_protection/10)) + pressure_adjustment_coefficient += round((head.min_pressure_protection - pressure) / (head.min_pressure_protection/20)) else // Missing key protection @@ -720,8 +720,19 @@ else if( !(COLD_RESISTANCE in mutations)) take_overall_damage(brute=LOW_PRESSURE_DAMAGE, used_weapon = "Low Pressure") - if(getOxyLoss() < 55) // 11 OxyLoss per 4 ticks when wearing internals; unconsciousness in 16 ticks, roughly half a minute - adjustOxyLoss(4) // 16 OxyLoss per 4 ticks when no internals present; unconsciousness in 13 ticks, roughly twenty seconds + if(getOxyLoss() < 55) // 12 OxyLoss per 4 ticks when wearing internals; unconsciousness in 16 ticks, roughly half a minute + var/pressure_dam = 3 // 16 OxyLoss per 4 ticks when no internals present; unconsciousness in 13 ticks, roughly twenty seconds + // (Extra 1 oxyloss from failed breath) + // Being in higher pressure decreases the damage taken, down to a minimum of (species.hazard_low_pressure / ONE_ATMOSPHERE) at species.hazard_low_pressure + pressure_dam *= (ONE_ATMOSPHERE - adjusted_pressure) / ONE_ATMOSPHERE + + if(wear_suit && wear_suit.min_pressure_protection && head && head.min_pressure_protection) + var/protection = max(wear_suit.min_pressure_protection, head.min_pressure_protection) // Take the weakest protection + pressure_dam *= (protection) / (ONE_ATMOSPHERE) // Divide by ONE_ATMOSPHERE to get a fractional protection + // Stronger protection (Closer to 0) results in a smaller fraction + // Firesuits (Min protection = 0.2 atmospheres) decrease oxyloss to 1/5 + + adjustOxyLoss(pressure_dam) pressure_alert = -2 else pressure_alert = -1 diff --git a/code/modules/xenoarcheaology/tools/equipment.dm b/code/modules/xenoarcheaology/tools/equipment.dm index c20660e7d1..a2f21199a4 100644 --- a/code/modules/xenoarcheaology/tools/equipment.dm +++ b/code/modules/xenoarcheaology/tools/equipment.dm @@ -7,7 +7,7 @@ update_icon_define = "icons/mob/spacesuit.dmi" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100) max_pressure_protection = 5 * ONE_ATMOSPHERE // Not very good protection, but if an anomaly starts doing gas stuff you're not screwed - min_pressure_protection = 0.7 * ONE_ATMOSPHERE + min_pressure_protection = 0.4 * ONE_ATMOSPHERE /obj/item/clothing/head/bio_hood/anomaly name = "Anomaly hood" @@ -16,7 +16,7 @@ item_state = "engspace_helmet" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100) max_pressure_protection = 5 * ONE_ATMOSPHERE // Not very good protection, but if an anomaly starts doing gas stuff you're not screwed - min_pressure_protection = 0.7 * ONE_ATMOSPHERE + min_pressure_protection = 0.4 * ONE_ATMOSPHERE /obj/item/clothing/suit/space/anomaly name = "Excavation suit" diff --git a/polaris.dme b/polaris.dme index 4124ce6f02..896242683f 100644 --- a/polaris.dme +++ b/polaris.dme @@ -2585,7 +2585,7 @@ #include "code\ZAS\Zone.dm" #include "interface\interface.dm" #include "interface\skin.dmf" -#include "maps\southern_cross\southern_cross.dm" +#include "maps\example\example.dm" #include "maps\submaps\space_submaps\space.dm" #include "maps\submaps\surface_submaps\mountains\mountains.dm" #include "maps\submaps\surface_submaps\mountains\mountains_areas.dm"