diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 3d785619255..1c6c667a89c 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -162,3 +162,28 @@ name = "double emergency oxygen tank" icon_state = "emergency_double" volume = 10 + +/* + * Nitrogen + */ +/obj/item/weapon/tank/nitrogen + name = "nitrogen tank" + desc = "A tank of nitrogen." + icon_state = "oxygen_fr" + distribute_pressure = ONE_ATMOSPHERE*O2STANDARD + + +/obj/item/weapon/tank/nitrogen/New() + ..() + + src.air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) + // + src.air_contents.update_values() + return + +/obj/item/weapon/tank/nitrogen/examine() + set src in usr + ..() + if(air_contents.nitrogen < 10) + usr << text("\red The meter on the [src.name] indicates you are almost out of air!") + playsound(usr, 'sound/effects/alert.ogg', 50, 1) \ No newline at end of file diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 195a0be95b2..e8ba6c49137 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -35,4 +35,26 @@ name = "medical mask" icon_state = "medical" item_state = "medical" - permeability_coefficient = 0.01 + permeability_coefficient = 0.01 + +/obj/item/clothing/mask/breath/vox + desc = "A weirdly-shaped breath mask." + name = "vox breath mask" + icon_state = "voxmask" + item_state = "voxmask" + permeability_coefficient = 0.01 + + toggle() + set category = "Object" + set name = "Adjust mask" + set src in usr + + usr << "You can't really adjust this mask - it's moulded to your beak!" + +/obj/item/clothing/mask/breath/vox/mob_can_equip(M as mob, slot) + var/mob/living/carbon/human/V = M + if(V.dna.mutantrace != "vox") + V << "This clearly isn't designed for your species!" + return 0 + + return ..() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index be07fcba530..9909d523c08 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -394,6 +394,7 @@ var/oxygen_used = 0 var/nitrogen_used = 0 var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME + var/safe_oxygen_max = 1 // For vox. //Partial pressure of the O2 in our breath var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure @@ -436,6 +437,12 @@ adjustOxyLoss(HUMAN_MAX_OXYLOSS) failed_last_breath = 1 oxygen_alert = max(oxygen_alert, 1) + + if(O2_pp > safe_oxygen_max) //Oxygen is toxic to vox. + var/ratio = (breath.oxygen/safe_oxygen_max) * 10 + adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) + toxins_alert = max(toxins_alert, 1) + else // We're in safe limits failed_last_breath = 0 adjustOxyLoss(-5) diff --git a/icons/mob/mask.dmi b/icons/mob/mask.dmi index 4b002767f33..4f236bc2db6 100644 Binary files a/icons/mob/mask.dmi and b/icons/mob/mask.dmi differ diff --git a/icons/obj/clothing/masks.dmi b/icons/obj/clothing/masks.dmi index 110ef9c2b54..797163e50fe 100644 Binary files a/icons/obj/clothing/masks.dmi and b/icons/obj/clothing/masks.dmi differ