Merge pull request #8159 from Poojawa/lizard-hyperoxia
Carbon Oxygen Toxicity
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||||
|
|
||||||
var/co2overloadtime = null
|
var/co2overloadtime = null
|
||||||
|
var/o2overloadtime = null //for Ash walker's weaker lungs, and future atmosia hazards
|
||||||
var/temperature_resistance = T0C+75
|
var/temperature_resistance = T0C+75
|
||||||
var/obj/item/reagent_containers/food/snacks/meat/slab/type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab
|
var/obj/item/reagent_containers/food/snacks/meat/slab/type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
id = "ashlizard"
|
id = "ashlizard"
|
||||||
limbs_id = "lizard"
|
limbs_id = "lizard"
|
||||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,DIGITIGRADE)
|
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,DIGITIGRADE)
|
||||||
inherent_traits = list(TRAIT_NOGUNS,TRAIT_NOBREATH)
|
inherent_traits = list(TRAIT_NOGUNS)
|
||||||
|
mutantlungs = /obj/item/organ/lungs/ashwalker
|
||||||
burnmod = 0.9
|
burnmod = 0.9
|
||||||
brutemod = 0.9
|
brutemod = 0.9
|
||||||
@@ -141,6 +141,7 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/safe_oxy_min = 16
|
var/safe_oxy_min = 16
|
||||||
|
var/safe_oxy_max = 50
|
||||||
var/safe_co2_max = 10
|
var/safe_co2_max = 10
|
||||||
var/safe_tox_max = 0.05
|
var/safe_tox_max = 0.05
|
||||||
var/SA_para_min = 1
|
var/SA_para_min = 1
|
||||||
@@ -156,6 +157,19 @@
|
|||||||
|
|
||||||
|
|
||||||
//OXYGEN
|
//OXYGEN
|
||||||
|
if(O2_partialpressure > safe_oxy_max) // Too much Oxygen - blatant CO2 effect copy/pasta
|
||||||
|
if(!o2overloadtime)
|
||||||
|
o2overloadtime = world.time
|
||||||
|
else if(world.time - o2overloadtime > 120)
|
||||||
|
Dizzy(10) // better than a minute of you're fucked KO, but certainly a wake up call. Honk.
|
||||||
|
adjustOxyLoss(3)
|
||||||
|
if(world.time - o2overloadtime > 300)
|
||||||
|
adjustOxyLoss(8)
|
||||||
|
if(prob(20))
|
||||||
|
emote("cough")
|
||||||
|
throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
|
||||||
|
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "suffocation", /datum/mood_event/suffocation)
|
||||||
|
|
||||||
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
|
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
|
||||||
if(prob(20))
|
if(prob(20))
|
||||||
emote("gasp")
|
emote("gasp")
|
||||||
@@ -172,6 +186,7 @@
|
|||||||
|
|
||||||
else //Enough oxygen
|
else //Enough oxygen
|
||||||
failed_last_breath = 0
|
failed_last_breath = 0
|
||||||
|
o2overloadtime = 0 //reset our counter for this too
|
||||||
if(health >= crit_threshold)
|
if(health >= crit_threshold)
|
||||||
adjustOxyLoss(-5)
|
adjustOxyLoss(-5)
|
||||||
oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]
|
oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
//Breath damage
|
//Breath damage
|
||||||
|
|
||||||
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
|
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
|
||||||
var/safe_oxygen_max = 0
|
var/safe_oxygen_max = 50 // Too much of a good thing, in kPa as well.
|
||||||
var/safe_nitro_min = 0
|
var/safe_nitro_min = 0
|
||||||
var/safe_nitro_max = 0
|
var/safe_nitro_max = 0
|
||||||
var/safe_co2_min = 0
|
var/safe_co2_min = 0
|
||||||
@@ -97,11 +97,25 @@
|
|||||||
|
|
||||||
//Too much oxygen! //Yes, some species may not like it.
|
//Too much oxygen! //Yes, some species may not like it.
|
||||||
if(safe_oxygen_max)
|
if(safe_oxygen_max)
|
||||||
if(O2_pp > safe_oxygen_max)
|
if((O2_pp > safe_oxygen_max) && safe_oxygen_max == 0) //I guess plasma men technically need to have a check.
|
||||||
var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10
|
var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10
|
||||||
H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
|
H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
|
||||||
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
|
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
|
||||||
|
|
||||||
|
else if((O2_pp > safe_oxygen_max) && !(safe_oxygen_max == 0)) //Why yes, this is like too much CO2 and spahget. Dirty lizards.
|
||||||
|
if(!H.o2overloadtime)
|
||||||
|
H.o2overloadtime = world.time
|
||||||
|
else if(world.time - H.o2overloadtime > 120)
|
||||||
|
H.Dizzy(10) // better than a minute of you're fucked KO, but certainly a wake up call. Honk.
|
||||||
|
H.adjustOxyLoss(3)
|
||||||
|
if(world.time - H.o2overloadtime > 300)
|
||||||
|
H.adjustOxyLoss(8)
|
||||||
|
if(prob(20))
|
||||||
|
H.emote("cough")
|
||||||
|
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
H.o2overloadtime = 0
|
||||||
H.clear_alert("too_much_oxy")
|
H.clear_alert("too_much_oxy")
|
||||||
|
|
||||||
//Too little oxygen!
|
//Too little oxygen!
|
||||||
@@ -129,6 +143,7 @@
|
|||||||
var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10
|
var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10
|
||||||
H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
|
H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
|
||||||
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
|
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
|
||||||
|
H.losebreath += 2
|
||||||
else
|
else
|
||||||
H.clear_alert("too_much_nitro")
|
H.clear_alert("too_much_nitro")
|
||||||
|
|
||||||
@@ -385,6 +400,7 @@
|
|||||||
icon_state = "lungs-plasma"
|
icon_state = "lungs-plasma"
|
||||||
|
|
||||||
safe_oxygen_min = 0 //We don't breath this
|
safe_oxygen_min = 0 //We don't breath this
|
||||||
|
safe_oxygen_max = 0 // Like, at all.
|
||||||
safe_toxins_min = 16 //We breath THIS!
|
safe_toxins_min = 16 //We breath THIS!
|
||||||
safe_toxins_max = 0
|
safe_toxins_max = 0
|
||||||
|
|
||||||
@@ -407,7 +423,24 @@
|
|||||||
icon_state = "lungs-c-u"
|
icon_state = "lungs-c-u"
|
||||||
safe_toxins_max = 20
|
safe_toxins_max = 20
|
||||||
safe_co2_max = 20
|
safe_co2_max = 20
|
||||||
|
safe_oxygen_max = 250
|
||||||
|
|
||||||
cold_level_1_threshold = 200
|
cold_level_1_threshold = 200
|
||||||
cold_level_2_threshold = 140
|
cold_level_2_threshold = 140
|
||||||
cold_level_3_threshold = 100
|
cold_level_3_threshold = 100
|
||||||
|
|
||||||
|
/obj/item/organ/lungs/ashwalker
|
||||||
|
name = "ash lungs"
|
||||||
|
desc = "blackened lungs identical from specimens recovered from lavaland, unsuited to higher air pressures."
|
||||||
|
icon_state = "lungs-ll"
|
||||||
|
safe_oxygen_min = 3 //able to handle much thinner oxygen, something something ash storm adaptation
|
||||||
|
safe_oxygen_max = 18 // Air standard is 22kpA of O2, LL is 14kpA
|
||||||
|
safe_nitro_max = 28 // Air standard is 82kpA of N2, LL is 23kpA
|
||||||
|
|
||||||
|
cold_level_1_threshold = 280 // Ash Lizards can't take the cold very well, station air is only just warm enough
|
||||||
|
cold_level_2_threshold = 240
|
||||||
|
cold_level_3_threshold = 200
|
||||||
|
|
||||||
|
heat_level_1_threshold = 400 // better adapted for heat, obv. Lavaland standard is 300
|
||||||
|
heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Reference in New Issue
Block a user