mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
Vox oxygen toxicity, vox breath mask, nitrogen tank for spawning.
This commit is contained in:
@@ -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 << "<span class='warning'>This clearly isn't designed for your species!</span>"
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user