mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 03:21:30 +00:00
Reworks stasis, reshuffles life order, makes gases use defines. (#9409)
This commit is contained in:
@@ -1562,7 +1562,7 @@
|
||||
if(check_rights(R_ADMIN|R_SERVER))
|
||||
if(href_list["vsc"] == "airflow")
|
||||
vsc.ChangeSettingsDialog(usr,vsc.settings)
|
||||
if(href_list["vsc"] == "phoron")
|
||||
if(href_list["vsc"] == GAS_PHORON)
|
||||
vsc.ChangeSettingsDialog(usr,vsc.plc.settings)
|
||||
if(href_list["vsc"] == "default")
|
||||
vsc.SetDefault(usr)
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = usr.loc.return_air()
|
||||
environment.gas["phoron"] = 0
|
||||
environment.gas["nitrogen"] = 82.1472
|
||||
environment.gas["oxygen"] = 21.8366
|
||||
environment.gas["carbon_dioxide"] = 0
|
||||
environment.gas["sleeping_agent"] = 0
|
||||
environment.gas["oxygen_agent_b"] = 0
|
||||
environment.gas[GAS_PHORON] = 0
|
||||
environment.gas[GAS_NITROGEN] = 82.1472
|
||||
environment.gas[GAS_OXYGEN] = 21.8366
|
||||
environment.gas[GAS_CO2] = 0
|
||||
environment.gas[GAS_N2O] = 0
|
||||
environment.temperature = 293.15
|
||||
environment.update_values()
|
||||
var/turf/simulated/location = get_turf(usr)
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
if(Rad.anchored)
|
||||
if(!Rad.P)
|
||||
var/obj/item/tank/phoron/Phoron = new/obj/item/tank/phoron(Rad)
|
||||
Phoron.air_contents.gas["phoron"] = 70
|
||||
Phoron.air_contents.gas[GAS_PHORON] = 70
|
||||
Rad.drainratio = 0
|
||||
Rad.P = Phoron
|
||||
Phoron.forceMove(Rad)
|
||||
|
||||
@@ -501,7 +501,7 @@
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("oxygen") L.adjustOxyLoss(amount)
|
||||
if(BP_BRAIN) L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
return
|
||||
|
||||
/obj/item/tank/proc/ignite() //This happens when a bomb is told to explode
|
||||
var/fuel_moles = air_contents.gas["phoron"] + air_contents.gas["oxygen"] / 6
|
||||
var/fuel_moles = air_contents.gas[GAS_PHORON] + air_contents.gas[GAS_OXYGEN] / 6
|
||||
var/strength = 1
|
||||
|
||||
var/turf/ground_zero = get_turf(loc)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
permeability_coefficient = 0.01
|
||||
siemens_coefficient = 0.9
|
||||
var/gas_filter_strength = 1 //For gas mask filters
|
||||
var/list/filtered_gases = list("phoron", "sleeping_agent")
|
||||
var/list/filtered_gases = list(GAS_PHORON, GAS_N2O)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 75, rad = 0)
|
||||
|
||||
/obj/item/clothing/mask/gas/filter_air(datum/gas_mixture/air)
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/item/clothing/mask/gas/old
|
||||
desc = "A face-covering mask that can be connected to an air supply. Seems to be an old, outdated design."
|
||||
filtered_gases = list("sleeping_agent")
|
||||
filtered_gases = list(GAS_N2O)
|
||||
item_state = "gas_mask"
|
||||
icon_state = "gas_mask"
|
||||
|
||||
|
||||
@@ -50,4 +50,4 @@
|
||||
return 0
|
||||
|
||||
/mob/living/heavy_vehicle/adjustHalLoss()
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -129,13 +129,6 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/heavy_vehicle/handle_status_effects()
|
||||
..()
|
||||
if(hallucination > 0)
|
||||
hallucination--
|
||||
else if(hallucination < 0)
|
||||
hallucination = 0
|
||||
|
||||
/mob/living/heavy_vehicle/handle_vision()
|
||||
if(head)
|
||||
sight = head.get_sight()
|
||||
|
||||
@@ -366,12 +366,12 @@
|
||||
|
||||
if(prob(5))
|
||||
consume_gasses = list()
|
||||
var/gas = pick("oxygen","nitrogen","phoron","carbon_dioxide")
|
||||
var/gas = pick(GAS_OXYGEN,GAS_NITROGEN,GAS_PHORON,GAS_CO2)
|
||||
consume_gasses[gas] = rand(3,9)
|
||||
|
||||
if(prob(5))
|
||||
exude_gasses = list()
|
||||
var/gas = pick("oxygen","nitrogen","phoron","carbon_dioxide")
|
||||
var/gas = pick(GAS_OXYGEN,GAS_NITROGEN,GAS_PHORON,GAS_CO2)
|
||||
exude_gasses[gas] = rand(3,9)
|
||||
|
||||
chems = list()
|
||||
|
||||
@@ -521,10 +521,10 @@
|
||||
outputs = list(
|
||||
"pressure" = IC_PINTYPE_NUMBER,
|
||||
"temperature" = IC_PINTYPE_NUMBER,
|
||||
"oxygen" = IC_PINTYPE_NUMBER,
|
||||
"nitrogen" = IC_PINTYPE_NUMBER,
|
||||
"carbon dioxide" = IC_PINTYPE_NUMBER,
|
||||
"phoron" = IC_PINTYPE_NUMBER,
|
||||
GAS_OXYGEN = IC_PINTYPE_NUMBER,
|
||||
GAS_NITROGEN = IC_PINTYPE_NUMBER,
|
||||
GAS_CO2 = IC_PINTYPE_NUMBER,
|
||||
GAS_PHORON = IC_PINTYPE_NUMBER,
|
||||
"other" = IC_PINTYPE_NUMBER
|
||||
)
|
||||
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
|
||||
@@ -621,10 +621,10 @@
|
||||
var/total_moles = environment.total_moles
|
||||
|
||||
if (total_moles)
|
||||
var/o2_level = environment.gas["oxygen"]/total_moles
|
||||
var/n2_level = environment.gas["nitrogen"]/total_moles
|
||||
var/co2_level = environment.gas["carbon_dioxide"]/total_moles
|
||||
var/phoron_level = environment.gas["phoron"]/total_moles
|
||||
var/o2_level = environment.gas[GAS_OXYGEN]/total_moles
|
||||
var/n2_level = environment.gas[GAS_NITROGEN]/total_moles
|
||||
var/co2_level = environment.gas[GAS_CO2]/total_moles
|
||||
var/phoron_level = environment.gas[GAS_PHORON]/total_moles
|
||||
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
|
||||
set_pin_data(IC_OUTPUT, 1, pressure)
|
||||
set_pin_data(IC_OUTPUT, 2, round(environment.temperature-T0C,0.1))
|
||||
@@ -713,8 +713,8 @@
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3)
|
||||
power_draw_per_use = 20
|
||||
|
||||
var/gas_name = "oxygen"
|
||||
var/gas_display_name = "oxygen"
|
||||
var/gas_name = GAS_OXYGEN
|
||||
var/gas_display_name = GAS_OXYGEN
|
||||
|
||||
/obj/item/integrated_circuit/input/gas_sensor/Initialize()
|
||||
name = "[gas_display_name] sensor"
|
||||
@@ -742,16 +742,16 @@
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/input/gas_sensor/co2
|
||||
gas_name = "carbon_dioxide"
|
||||
gas_name = GAS_CO2
|
||||
gas_display_name = "carbon dioxide"
|
||||
|
||||
/obj/item/integrated_circuit/input/gas_sensor/nitrogen
|
||||
gas_name = "nitrogen"
|
||||
gas_name = GAS_NITROGEN
|
||||
gas_display_name = "nitrogen"
|
||||
|
||||
/obj/item/integrated_circuit/input/gas_sensor/phoron
|
||||
gas_name = "phoron"
|
||||
gas_display_name = "phoron"
|
||||
gas_name = GAS_PHORON
|
||||
gas_display_name = GAS_PHORON
|
||||
|
||||
/obj/item/integrated_circuit/input/turfpoint
|
||||
name = "tile pointer"
|
||||
|
||||
@@ -536,11 +536,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
atmos_suitable = 0
|
||||
else if (Environment.temperature < mintemp)
|
||||
atmos_suitable = 0
|
||||
else if(Environment.gas["oxygen"] < min_oxy)
|
||||
else if(Environment.gas[GAS_OXYGEN] < min_oxy)
|
||||
atmos_suitable = 0
|
||||
else if(Environment.gas["phoron"] > max_phoron)
|
||||
else if(Environment.gas[GAS_PHORON] > max_phoron)
|
||||
atmos_suitable = 0
|
||||
else if(Environment.gas["carbon_dioxide"] > max_co2)
|
||||
else if(Environment.gas[GAS_CO2] > max_co2)
|
||||
atmos_suitable = 0
|
||||
else if(Environment.return_pressure() < min_pressure)
|
||||
atmos_suitable = 0
|
||||
|
||||
@@ -8,12 +8,33 @@
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
..()
|
||||
if(!..())
|
||||
return
|
||||
|
||||
UpdateStasis()
|
||||
|
||||
// Increase germ_level regularly
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
germ_level++
|
||||
|
||||
if(stat != DEAD && !InStasis())
|
||||
//Breathing, if applicable
|
||||
handle_breathing()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
|
||||
// eye, ear, brain damages
|
||||
handle_disabilities()
|
||||
|
||||
//all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc
|
||||
handle_statuses()
|
||||
|
||||
. = 1
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
QDEL_NULL(touching)
|
||||
bloodstr = null
|
||||
@@ -445,4 +466,23 @@
|
||||
return reagents
|
||||
|
||||
/mob/living/carbon/proc/should_have_organ(var/organ_check)
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/proc/SetStasis(var/factor, var/source = "misc")
|
||||
if((species && (species.flags & NO_SCAN)) || isSynthetic())
|
||||
return
|
||||
stasis_sources[source] = factor
|
||||
|
||||
/mob/living/carbon/InStasis()
|
||||
if(!stasis_value)
|
||||
return FALSE
|
||||
return life_tick % stasis_value
|
||||
|
||||
// call only once per run of life
|
||||
/mob/living/carbon/proc/UpdateStasis()
|
||||
stasis_value = 0
|
||||
if((species && (species.flags & NO_SCAN)) || isSynthetic())
|
||||
return
|
||||
for(var/source in stasis_sources)
|
||||
stasis_value += stasis_sources[source]
|
||||
stasis_sources.Cut()
|
||||
@@ -37,3 +37,5 @@
|
||||
var/list/organs_by_name = list() // map organ names to organs
|
||||
var/list/internal_organs_by_name = list() // so internal organs have less ickiness too
|
||||
|
||||
var/list/stasis_sources = list()
|
||||
var/stasis_value
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
/mob/living/carbon/human/update_canmove()
|
||||
var/old_lying = lying
|
||||
. = ..()
|
||||
if(lying && !old_lying && !resting && !buckled) // fell down
|
||||
if(lying && !old_lying && !resting && !buckled && isturf(loc)) // fell down
|
||||
playsound(loc, species.bodyfall_sound, 50, 1, -1)
|
||||
|
||||
/mob/living/carbon/human/getCloneLoss()
|
||||
|
||||
@@ -194,4 +194,23 @@
|
||||
/mob/living/carbon/human/proc/is_submerged()
|
||||
if(lying && istype(loc, /turf/simulated/floor/beach/water)) // replace this when we port fluids
|
||||
return TRUE
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/getCryogenicFactor(var/bodytemperature)
|
||||
if(isSynthetic())
|
||||
return 0
|
||||
if(!species)
|
||||
return 0
|
||||
|
||||
if(bodytemperature > species.cold_level_1)
|
||||
return 0
|
||||
else if(bodytemperature > species.cold_level_2)
|
||||
. = 5 * (1 - (bodytemperature - species.cold_level_2) / (species.cold_level_1 - species.cold_level_2))
|
||||
. = max(2, .)
|
||||
else if(bodytemperature > species.cold_level_3)
|
||||
. = 20 * (1 - (bodytemperature - species.cold_level_3) / (species.cold_level_2 - species.cold_level_3))
|
||||
. = max(5, .)
|
||||
else
|
||||
. = 80 * (1 - bodytemperature / species.cold_level_3)
|
||||
. = max(20, .)
|
||||
return round(.)
|
||||
@@ -28,7 +28,6 @@
|
||||
var/fire_alert = 0
|
||||
var/pressure_alert = 0
|
||||
var/temperature_alert = 0
|
||||
var/in_stasis = 0
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
set background = BACKGROUND_ENABLED
|
||||
@@ -46,9 +45,6 @@
|
||||
if(wearing_rig && wearing_rig.offline)
|
||||
wearing_rig = null
|
||||
|
||||
in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0
|
||||
if(in_stasis) loc:used++
|
||||
|
||||
..()
|
||||
|
||||
if(life_tick%30==5)//Makes huds update every 10 seconds instead of every 30 seconds
|
||||
@@ -57,7 +53,7 @@
|
||||
voice = GetVoice()
|
||||
|
||||
//No need to update all of these procs if the guy is dead.
|
||||
if(stat != DEAD && !in_stasis)
|
||||
if(stat != DEAD)
|
||||
//Updates the number of stored chemicals for powers
|
||||
handle_changeling()
|
||||
|
||||
@@ -82,8 +78,6 @@
|
||||
|
||||
handle_shared_dreaming()
|
||||
|
||||
handle_stasis_bag()
|
||||
|
||||
if(!handle_some_updates())
|
||||
return //We go ahead and process them 5 times for HUD images and other stuff though.
|
||||
|
||||
@@ -103,7 +97,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/breathe()
|
||||
if(!in_stasis)
|
||||
if(!InStasis())
|
||||
..()
|
||||
|
||||
// Calculate how vulnerable the human is to under- and overpressure.
|
||||
@@ -223,20 +217,8 @@
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_stasis_bag()
|
||||
// Handle side effects from stasis bag
|
||||
if(in_stasis)
|
||||
// First off, there's no oxygen supply, so the mob will slowly take brain damage
|
||||
adjustOxyLoss(3.5)
|
||||
// Next, the method to induce stasis has some adverse side-effects, manifesting
|
||||
// as cloneloss
|
||||
adjustCloneLoss(0.8)
|
||||
if(stat != DEAD)
|
||||
blinded = TRUE
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation()
|
||||
if(in_stasis)
|
||||
if(InStasis())
|
||||
return
|
||||
|
||||
if(getFireLoss())
|
||||
@@ -397,40 +379,38 @@
|
||||
//Body temperature is too hot.
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(status_flags & GODMODE) return 1 //godmode
|
||||
|
||||
var/burn_dam = 0
|
||||
if(bodytemperature < species.heat_level_2)
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_1
|
||||
else if(bodytemperature < species.heat_level_3)
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_2
|
||||
else
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_3
|
||||
take_overall_damage(burn = burn_dam, used_weapon = "extreme heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
else if(bodytemperature <= species.cold_level_1)
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(status_flags & GODMODE) return 1 //godmode
|
||||
if(status_flags & GODMODE)
|
||||
return 1
|
||||
|
||||
if (is_diona() == DIONA_WORKER)
|
||||
diona_contained_cold_damage()
|
||||
var/burn_dam = 0
|
||||
|
||||
if(status_flags & GODMODE) return 1 //godmode
|
||||
|
||||
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
if(bodytemperature > species.cold_level_2)
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else if(bodytemperature > species.cold_level_3)
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(bodytemperature > species.cold_level_2)
|
||||
burn_dam = COLD_DAMAGE_LEVEL_1
|
||||
else if(bodytemperature > species.cold_level_3)
|
||||
burn_dam = COLD_DAMAGE_LEVEL_2
|
||||
else
|
||||
burn_dam = COLD_DAMAGE_LEVEL_3
|
||||
SetStasis(getCryogenicFactor(bodytemperature), STASIS_COLD)
|
||||
if(!chem_effects[CE_CRYO])
|
||||
take_overall_damage(burn = burn_dam, used_weapon = "extreme cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
|
||||
// Account for massive pressure differences. Done by Polymorph
|
||||
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
|
||||
if(status_flags & GODMODE) return 1 //godmode
|
||||
if(status_flags & GODMODE)
|
||||
return 1 //godmode
|
||||
|
||||
if(adjusted_pressure >= species.hazard_high_pressure)
|
||||
var/pressure_damage = min( ( (adjusted_pressure / species.hazard_high_pressure) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE)
|
||||
@@ -459,8 +439,6 @@
|
||||
if (is_diona())
|
||||
diona_handle_temperature(DS)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/stabilize_body_temperature()
|
||||
if (species.passive_temp_gain) // We produce heat naturally.
|
||||
bodytemperature += species.passive_temp_gain
|
||||
@@ -604,7 +582,7 @@
|
||||
return min(1,thermal_protection)
|
||||
|
||||
/mob/living/carbon/human/handle_chemicals_in_body()
|
||||
if(in_stasis)
|
||||
if(InStasis())
|
||||
return
|
||||
|
||||
chem_effects.Cut()
|
||||
@@ -735,7 +713,7 @@
|
||||
src.visible_message("<B>[src]</B> [species.halloss_message]")
|
||||
Paralyse(10)
|
||||
|
||||
if(paralysis || sleeping || in_stasis)
|
||||
if(paralysis || sleeping || InStasis())
|
||||
blinded = TRUE
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
@@ -753,12 +731,12 @@
|
||||
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
|
||||
if(client || sleeping > 3 || istype(bg))
|
||||
AdjustSleeping(-1)
|
||||
if(prob(2) && health && !failed_last_breath && !isSynthetic())
|
||||
if(prob(2) && health && !failed_last_breath && !isSynthetic() && !InStasis())
|
||||
if(!paralysis)
|
||||
emote("snore")
|
||||
|
||||
//CONSCIOUS
|
||||
else if(!in_stasis)
|
||||
else if(!InStasis())
|
||||
stat = CONSCIOUS
|
||||
willfully_sleeping = FALSE
|
||||
|
||||
@@ -1016,7 +994,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/handle_random_events()
|
||||
if(in_stasis)
|
||||
if(InStasis())
|
||||
return
|
||||
|
||||
// Puke if toxloss is too high
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
gluttonous = 2
|
||||
virus_immune = 1
|
||||
|
||||
breath_type = "nitrogen"
|
||||
poison_type = "oxygen"
|
||||
breath_type = GAS_NITROGEN
|
||||
poison_type = GAS_OXYGEN
|
||||
siemens_coefficient = 0.2
|
||||
|
||||
flags = NO_SCAN
|
||||
@@ -113,8 +113,8 @@
|
||||
fall_mod = 0.5
|
||||
|
||||
eyes = "blank_eyes"
|
||||
breath_type = "nitrogen"
|
||||
poison_type = "oxygen"
|
||||
breath_type = GAS_NITROGEN
|
||||
poison_type = GAS_OXYGEN
|
||||
|
||||
flags = NO_SCAN | NO_PAIN
|
||||
spawn_flags = IS_RESTRICTED
|
||||
|
||||
@@ -115,9 +115,9 @@
|
||||
// Environment tolerance/life processes vars.
|
||||
var/reagent_tag //Used for metabolizing reagents.
|
||||
var/breath_pressure = 16 // Minimum partial pressure safe for breathing, kPa
|
||||
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
|
||||
var/poison_type = "phoron" // Poisonous air.
|
||||
var/exhale_type = "carbon_dioxide" // Exhaled gas type.
|
||||
var/breath_type = GAS_OXYGEN // Non-oxygen gas breathed, if any.
|
||||
var/poison_type = GAS_PHORON // Poisonous air.
|
||||
var/exhale_type = GAS_CO2 // Exhaled gas type.
|
||||
var/breath_vol_mul = 1 // The fraction of air used, relative to the default carbon breath volume (1/2 L)
|
||||
var/breath_eff_mul = 1 // The efficiency of breathing, relative to the default carbon breath efficiency (1/6)
|
||||
var/cold_level_1 = 260 // Cold damage level 1 below this point.
|
||||
|
||||
@@ -449,7 +449,7 @@ var/global/list/golem_types = list("Coal Golem",
|
||||
sleep(1)
|
||||
var/turf/location = get_turf(H)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,location))
|
||||
target_tile.assume_gas("phoron", 200, 100+T0C)
|
||||
target_tile.assume_gas(GAS_PHORON, 200, 100+T0C)
|
||||
spawn (0) target_tile.hotspot_expose(700, 400)
|
||||
qdel(H)
|
||||
|
||||
@@ -783,9 +783,9 @@ var/global/list/golem_types = list("Coal Golem",
|
||||
bodytype = "Human"
|
||||
|
||||
breath_pressure = 16
|
||||
breath_type = "oxygen"
|
||||
poison_type = "phoron"
|
||||
exhale_type = "carbon_dioxide"
|
||||
breath_type = GAS_OXYGEN
|
||||
poison_type = GAS_PHORON
|
||||
exhale_type = GAS_CO2
|
||||
|
||||
cold_level_1 = 260
|
||||
cold_level_2 = 200
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
taste_sensitivity = TASTE_SENSITIVE
|
||||
reagent_tag = IS_VAURCA
|
||||
siemens_coefficient = 1 //setting it to 0 would be redundant due to LordLag's snowflake checks, plus batons/tasers use siemens now too.
|
||||
breath_type = "phoron"
|
||||
breath_type = GAS_PHORON
|
||||
breath_vol_mul = 1/6 // 0.5 liters * breath_vol_mul = breath volume
|
||||
breath_eff_mul = 6 // 1/6 * breath_eff_mul = fraction of gas consumed
|
||||
poison_type = "nitrogen" //a species that breathes plasma shouldn't be poisoned by it.
|
||||
poison_type = GAS_NITROGEN //a species that breathes plasma shouldn't be poisoned by it.
|
||||
breathing_sound = null //They don't work that way I guess? I'm a coder not a purple man.
|
||||
mob_size = 13 //their half an inch thick exoskeleton and impressive height, plus all of their mechanical organs.
|
||||
natural_climbing = TRUE
|
||||
|
||||
@@ -8,33 +8,25 @@
|
||||
|
||||
if (transforming)
|
||||
return
|
||||
|
||||
if(!loc)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
handle_breathing()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Blood
|
||||
handle_blood()
|
||||
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
|
||||
aura_check(AURA_TYPE_LIFE)
|
||||
|
||||
. = 1
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
blinded = 0 // Placing this here just show how out of place it is.
|
||||
|
||||
if(handle_regular_status_updates())
|
||||
handle_status_effects()
|
||||
|
||||
if(stat != DEAD)
|
||||
aura_check(AURA_TYPE_LIFE)
|
||||
if(!InStasis())
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Check if we're on fire
|
||||
handle_fire()
|
||||
@@ -44,12 +36,6 @@
|
||||
for(var/obj/item/grab/G in src)
|
||||
G.process()
|
||||
|
||||
blinded = 0 // Placing this here just show how out of place it is.
|
||||
// human/handle_regular_status_updates() needs a cleanup, as blindness should be handled in handle_disabilities()
|
||||
if(handle_regular_status_updates()) // Status & health update, are we dead or alive etc.
|
||||
handle_disabilities() // eye, ear, brain damages
|
||||
handle_status_effects() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc
|
||||
|
||||
handle_actions()
|
||||
|
||||
update_canmove()
|
||||
@@ -59,6 +45,8 @@
|
||||
if(languages.len == 1 && default_language != languages[1])
|
||||
default_language = languages[1]
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_breathing()
|
||||
return
|
||||
|
||||
@@ -68,9 +56,6 @@
|
||||
/mob/living/proc/handle_chemicals_in_body()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_blood()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_random_events()
|
||||
return
|
||||
|
||||
@@ -94,7 +79,6 @@
|
||||
stat = CONSCIOUS
|
||||
return 1
|
||||
|
||||
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
|
||||
/mob/living/proc/handle_status_effects()
|
||||
if(paralysis)
|
||||
paralysis = max(paralysis-1,0)
|
||||
|
||||
@@ -924,6 +924,9 @@ default behaviour is:
|
||||
make_jittery(rand(150,200))
|
||||
adjustHalLoss(rand(50,60))
|
||||
|
||||
/mob/living/proc/InStasis()
|
||||
return FALSE
|
||||
|
||||
/mob/living/update_icon()
|
||||
for(var/aura in auras)
|
||||
var/obj/aura/A = aura
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
return 1
|
||||
|
||||
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
|
||||
if(G.gas["oxygen"] < 1)
|
||||
if(G.gas[GAS_OXYGEN] < 1)
|
||||
ExtinguishMobCompletely() //If there's no oxygen in the tile we're on, put out the fire
|
||||
return 1
|
||||
|
||||
|
||||
@@ -292,33 +292,6 @@
|
||||
src.unset_machine()
|
||||
src.cameraFollow = null
|
||||
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
/*
|
||||
/mob/living/silicon/pai/proc/pai_network_change()
|
||||
set category = "pAI Commands"
|
||||
set name = "Change Camera Network"
|
||||
src.reset_view(null)
|
||||
src.unset_machine()
|
||||
src.cameraFollow = null
|
||||
var/cameralist[0]
|
||||
|
||||
if(usr.stat == 2)
|
||||
to_chat(usr, "You can't change your camera network because you are dead!")
|
||||
return
|
||||
|
||||
for (var/obj/machinery/camera/C in Cameras)
|
||||
if(!C.status)
|
||||
continue
|
||||
else
|
||||
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "phoron" && C.network != "Prison") COMPILE ERROR! This will have to be updated as camera.network is no longer a string, but a list instead
|
||||
cameralist[C.network] = C.network
|
||||
|
||||
src.network = input(usr, "Which network would you like to view?") as null|anything in cameralist
|
||||
to_chat(src, "\blue Switched to [src.network] camera network.")
|
||||
//End of code by Mord_Sith
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
// Debug command - Maybe should be added to admin verbs later
|
||||
/mob/verb/makePAI(var/turf/t in view())
|
||||
|
||||
@@ -200,21 +200,21 @@
|
||||
if (abs(Environment.temperature - bodytemperature) > 40)
|
||||
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
|
||||
|
||||
if(min_oxy && Environment.gas["oxygen"] < min_oxy)
|
||||
if(min_oxy && Environment.gas[GAS_OXYGEN] < min_oxy)
|
||||
atmos_suitable = 0
|
||||
else if(max_oxy && Environment.gas["oxygen"] > max_oxy)
|
||||
else if(max_oxy && Environment.gas[GAS_OXYGEN] > max_oxy)
|
||||
atmos_suitable = 0
|
||||
else if(min_tox && Environment.gas["phoron"] < min_tox)
|
||||
else if(min_tox && Environment.gas[GAS_PHORON] < min_tox)
|
||||
atmos_suitable = 0
|
||||
else if(max_tox && Environment.gas["phoron"] > max_tox)
|
||||
else if(max_tox && Environment.gas[GAS_PHORON] > max_tox)
|
||||
atmos_suitable = 0
|
||||
else if(min_n2 && Environment.gas["nitrogen"] < min_n2)
|
||||
else if(min_n2 && Environment.gas[GAS_NITROGEN] < min_n2)
|
||||
atmos_suitable = 0
|
||||
else if(max_n2 && Environment.gas["nitrogen"] > max_n2)
|
||||
else if(max_n2 && Environment.gas[GAS_NITROGEN] > max_n2)
|
||||
atmos_suitable = 0
|
||||
else if(min_co2 && Environment.gas["carbon_dioxide"] < min_co2)
|
||||
else if(min_co2 && Environment.gas[GAS_CO2] < min_co2)
|
||||
atmos_suitable = 0
|
||||
else if(max_co2 && Environment.gas["carbon_dioxide"] > max_co2)
|
||||
else if(max_co2 && Environment.gas[GAS_CO2] > max_co2)
|
||||
atmos_suitable = 0
|
||||
|
||||
//Atmos effect
|
||||
|
||||
@@ -1126,7 +1126,7 @@
|
||||
|
||||
/mob/living/proc/handle_weakened()
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
weakened = max(weakened-1,0)
|
||||
return weakened
|
||||
|
||||
/mob/living/proc/handle_stuttering()
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
if(owner.species && owner.species.flags & NO_BLOOD)
|
||||
return
|
||||
|
||||
if(!owner || owner.stat == DEAD || owner.bodytemperature < 170 || owner.in_stasis) //Dead or cryosleep people do not pump the blood.
|
||||
if(!owner || owner.stat == DEAD || owner.bodytemperature < 170 || owner.InStasis()) //Dead or cryosleep people do not pump the blood.
|
||||
return
|
||||
|
||||
if(pulse != PULSE_NONE || BP_IS_ROBOTIC(src))
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"<span class='danger'>You can't breathe!</span>",
|
||||
"You hear someone gasp for air!",
|
||||
)
|
||||
owner.losebreath = round(damage/2)
|
||||
owner.losebreath += round(damage/2)
|
||||
|
||||
if(rescued)
|
||||
if(is_bruised())
|
||||
@@ -160,14 +160,14 @@
|
||||
if(owner.species.breath_type)
|
||||
breath_type = species.breath_type
|
||||
else
|
||||
breath_type = "oxygen"
|
||||
breath_type = GAS_OXYGEN
|
||||
|
||||
inhaling = breath.gas[breath_type]
|
||||
|
||||
if(owner.species.poison_type)
|
||||
poison_type = species.poison_type
|
||||
else
|
||||
poison_type = "phoron"
|
||||
poison_type = GAS_PHORON
|
||||
poison = breath.gas[poison_type]
|
||||
|
||||
if(owner.species.exhale_type)
|
||||
@@ -241,8 +241,8 @@
|
||||
owner.phoron_alert = 0
|
||||
|
||||
// If there's some other shit in the air lets deal with it here.
|
||||
if(breath.gas["sleeping_agent"])
|
||||
var/SA_pp = (breath.gas["sleeping_agent"] / breath.total_moles) * breath_pressure
|
||||
if(breath.gas[GAS_N2O])
|
||||
var/SA_pp = (breath.gas[GAS_N2O] / breath.total_moles) * breath_pressure
|
||||
|
||||
// Enough to make us paralysed for a bit
|
||||
if(SA_pp > SA_para_min)
|
||||
@@ -259,7 +259,7 @@
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
owner.emote(pick("giggle", "laugh"))
|
||||
breath.adjust_gas("sleeping_agent", -breath.gas["sleeping_agent"]/6, update = 0) //update after
|
||||
breath.adjust_gas(GAS_N2O, -breath.gas[GAS_N2O]/6, update = 0) //update after
|
||||
|
||||
// Were we able to breathe?
|
||||
if (failed_inhale || failed_exhale)
|
||||
|
||||
@@ -114,7 +114,7 @@ obj/item/organ/vaurca/neuralsocket/process()
|
||||
. = ..()
|
||||
|
||||
air_contents = new /datum/gas_mixture()
|
||||
air_contents.adjust_gas("phoron", (ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.adjust_gas(GAS_PHORON, (ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.volume = volume //liters
|
||||
air_contents.temperature = T20C
|
||||
distribute_pressure = ((pick(2.4,2.8,3.2,3.6)*ONE_ATMOSPHERE)*O2STANDARD)
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
var/phoron = (sheets+sheet_left)*20
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if (environment)
|
||||
environment.adjust_gas_temp("phoron", phoron/10, temperature + T0C)
|
||||
environment.adjust_gas_temp(GAS_PHORON, phoron/10, temperature + T0C)
|
||||
|
||||
sheets = 0
|
||||
sheet_left = 0
|
||||
|
||||
@@ -32,11 +32,11 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
|
||||
if(P)
|
||||
if(P.air_contents.gas["phoron"] == 0)
|
||||
if(P.air_contents.gas[GAS_PHORON] == 0)
|
||||
investigate_log("<font color='red'>out of fuel</font>.","singulo")
|
||||
eject()
|
||||
else
|
||||
P.air_contents.adjust_gas("phoron", -0.001*drainratio)
|
||||
P.air_contents.adjust_gas(GAS_PHORON, -0.001*drainratio)
|
||||
return
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ var/global/list/rad_collectors = list()
|
||||
toggle_power()
|
||||
user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \
|
||||
"You turn the [src.name] [active? "on":"off"].")
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [P?"Fuel: [round(P.air_contents.gas["phoron"]/0.29)]%":"<font color='red'>It is empty</font>"].","singulo")
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [P?"Fuel: [round(P.air_contents.gas[GAS_PHORON]/0.29)]%":"<font color='red'>It is empty</font>"].","singulo")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
@@ -125,7 +125,7 @@ var/global/list/rad_collectors = list()
|
||||
/obj/machinery/power/rad_collector/proc/receive_pulse(var/pulse_strength)
|
||||
if(P && active)
|
||||
var/power_produced = 0
|
||||
power_produced = P.air_contents.gas["phoron"]*pulse_strength*20
|
||||
power_produced = P.air_contents.gas[GAS_PHORON]*pulse_strength*20
|
||||
add_avail(power_produced)
|
||||
last_power_new = power_produced
|
||||
return
|
||||
|
||||
@@ -61,14 +61,14 @@
|
||||
T.resources["silver"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["diamond"] = 0
|
||||
T.resources["phoron"] = 0
|
||||
T.resources[MATERIAL_PHORON] = 0
|
||||
T.resources["osmium"] = 0
|
||||
T.resources["hydrogen"] = 0
|
||||
else if(tmp_cell < deep_val) // Rare metals.
|
||||
T.resources["gold"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["silver"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["uranium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["phoron"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources[MATERIAL_PHORON] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["osmium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["hydrogen"] = 0
|
||||
T.resources["diamond"] = 0
|
||||
@@ -76,7 +76,7 @@
|
||||
else // Deep metals.
|
||||
T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["phoron"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources[MATERIAL_PHORON] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["osmium"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["hydrogen"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
if(prob(40)) // A medium chance for these useful mats to appear in very small quantities
|
||||
|
||||
@@ -162,6 +162,7 @@
|
||||
taste_description = "sludge"
|
||||
|
||||
/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.add_chemical_effect(CE_CRYO, 1)
|
||||
if(M.bodytemperature < 170)
|
||||
M.add_chemical_effect(CE_PULSE, -2)
|
||||
M.adjustCloneLoss(-10 * removed)
|
||||
@@ -178,6 +179,7 @@
|
||||
taste_description = "slime"
|
||||
|
||||
/datum/reagent/clonexadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.add_chemical_effect(CE_CRYO, 1)
|
||||
if(M.bodytemperature < 170)
|
||||
M.add_chemical_effect(CE_PULSE, -2)
|
||||
M.adjustCloneLoss(-30 * removed)
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
else if(P.is_broken())
|
||||
return
|
||||
else
|
||||
P.air_contents.adjust_gas("phoron", (0.5*removed))
|
||||
P.air_contents.adjust_gas(GAS_PHORON, (0.5*removed))
|
||||
|
||||
else
|
||||
..()
|
||||
@@ -134,7 +134,7 @@
|
||||
/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T)
|
||||
if(!istype(T))
|
||||
return
|
||||
T.assume_gas("phoron", volume, T20C)
|
||||
T.assume_gas(GAS_PHORON, volume, T20C)
|
||||
remove_self(volume)
|
||||
|
||||
/datum/reagent/toxin/phoron_salt //Remember to exclude in RNG chems.
|
||||
@@ -186,7 +186,7 @@
|
||||
qdel(H)
|
||||
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
environment.adjust_gas("phoron",-amount*10)
|
||||
environment.adjust_gas(GAS_PHORON,-amount*10)
|
||||
|
||||
/datum/reagent/toxin/cyanide //Fast and Lethal
|
||||
name = "Cyanide"
|
||||
|
||||
@@ -870,7 +870,7 @@
|
||||
/datum/chemical_reaction/napalm/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/turf/location = get_turf(holder.my_atom.loc)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,location))
|
||||
target_tile.assume_gas("phoron", created_volume, 400+T0C)
|
||||
target_tile.assume_gas(GAS_PHORON, created_volume, 400+T0C)
|
||||
spawn (0) target_tile.hotspot_expose(700, 400)
|
||||
holder.del_reagent(/datum/reagent/fuel/napalm)
|
||||
return
|
||||
@@ -1466,7 +1466,7 @@
|
||||
/datum/chemical_reaction/slime/fire/proc/do_reaction(var/datum/reagents/holder)
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
for(var/turf/simulated/floor/target_tile in range(1, location))
|
||||
target_tile.assume_gas("phoron", 25, 1400)
|
||||
target_tile.assume_gas(GAS_PHORON, 25, 1400)
|
||||
target_tile.hotspot_expose(700, 400)
|
||||
|
||||
//Yellow
|
||||
@@ -3497,7 +3497,7 @@
|
||||
if(created_volume)
|
||||
var/turf/simulated/floor/T = get_turf(holder.my_atom.loc)
|
||||
if(istype(T))
|
||||
T.assume_gas("oxygen", created_volume*10, (created_thermal_energy/created_volume) )
|
||||
T.assume_gas(GAS_OXYGEN, created_volume*10, (created_thermal_energy/created_volume) )
|
||||
|
||||
/datum/chemical_reaction/phoron_salt_fire
|
||||
name = "Phoron Salt Fire"
|
||||
@@ -3511,7 +3511,7 @@
|
||||
/datum/chemical_reaction/phoron_salt_fire/on_reaction(var/datum/reagents/holder, var/created_volume, var/created_thermal_energy)
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,location))
|
||||
target_tile.assume_gas("phoron", created_volume*2, created_thermal_energy / 25) //2 because there is 2 phoron in 1u of phoron salts
|
||||
target_tile.assume_gas(GAS_PHORON, created_volume*2, created_thermal_energy / 25) //2 because there is 2 phoron in 1u of phoron salts
|
||||
addtimer(CALLBACK(target_tile, /turf/simulated/floor/.proc/hotspot_expose, 700, 400), 1)
|
||||
holder.del_reagent(/datum/reagent/toxin/phoron_salt)
|
||||
return
|
||||
|
||||
@@ -102,13 +102,13 @@
|
||||
else if(env.temperature > 375)
|
||||
trigger_hot = 1
|
||||
|
||||
if(env.gas["phoron"] >= 10)
|
||||
if(env.gas[GAS_PHORON] >= 10)
|
||||
trigger_phoron = 1
|
||||
if(env.gas["oxygen"] >= 10)
|
||||
if(env.gas[GAS_OXYGEN] >= 10)
|
||||
trigger_oxy = 1
|
||||
if(env.gas["carbon_dioxide"] >= 10)
|
||||
if(env.gas[GAS_CO2] >= 10)
|
||||
trigger_co2 = 1
|
||||
if(env.gas["nitrogen"] >= 10)
|
||||
if(env.gas[GAS_NITROGEN] >= 10)
|
||||
trigger_nitro = 1
|
||||
|
||||
//COLD ACTIVATION
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("carbon_dioxide", rand(2, 15))
|
||||
holder_loc.assume_gas(GAS_CO2, rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasco2/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("carbon_dioxide", pick(0, 0, 0.1, rand()))
|
||||
holder_loc.assume_gas(GAS_CO2, pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("nitrogen", rand(2, 15))
|
||||
holder_loc.assume_gas(GAS_NITROGEN, rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasnitro/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("nitrogen", pick(0, 0, 0.1, rand()))
|
||||
holder_loc.assume_gas(GAS_NITROGEN, pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("oxygen", rand(2, 15))
|
||||
holder_loc.assume_gas(GAS_OXYGEN, rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasoxy/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("oxygen", pick(0, 0, 0.1, rand()))
|
||||
holder_loc.assume_gas(GAS_OXYGEN, pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("oxygen", rand(2, 15))
|
||||
holder_loc.assume_gas(GAS_OXYGEN, rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasphoron/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("phoron", pick(0, 0, 0.1, rand()))
|
||||
holder_loc.assume_gas(GAS_PHORON, pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("sleeping_agent", rand(2, 15))
|
||||
holder_loc.assume_gas(GAS_N2O, rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gassleeping/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("sleeping_agent", pick(0, 0, 0.1, rand()))
|
||||
holder_loc.assume_gas(GAS_N2O, pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
damage = max( damage + min( ( (removed.temperature - CRITICAL_TEMPERATURE) / 150 ), damage_inc_limit ) , 0 )
|
||||
//Ok, 100% oxygen atmosphere = best reaction
|
||||
//Maxes out at 100% oxygen pressure
|
||||
oxygen = max(min((removed.gas["oxygen"] - (removed.gas["nitrogen"] * NITROGEN_RETARDATION_FACTOR)) / removed.total_moles, 1), 0)
|
||||
oxygen = max(min((removed.gas[GAS_OXYGEN] - (removed.gas[GAS_NITROGEN] * NITROGEN_RETARDATION_FACTOR)) / removed.total_moles, 1), 0)
|
||||
|
||||
//calculate power gain for oxygen reaction
|
||||
var/temp_factor
|
||||
@@ -273,8 +273,8 @@
|
||||
|
||||
//Release reaction gasses
|
||||
var/heat_capacity = removed.heat_capacity()
|
||||
removed.adjust_multi("phoron", max(device_energy / PHORON_RELEASE_MODIFIER, 0), \
|
||||
"oxygen", max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0))
|
||||
removed.adjust_multi(GAS_PHORON, max(device_energy / PHORON_RELEASE_MODIFIER, 0), \
|
||||
GAS_OXYGEN, max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0))
|
||||
|
||||
var/thermal_power = THERMAL_RELEASE_MODIFIER * device_energy
|
||||
if (debug)
|
||||
|
||||
Reference in New Issue
Block a user