From eb4f6326d7d0bc581375bdac0c1e518180ef0ad3 Mon Sep 17 00:00:00 2001 From: as334 Date: Fri, 27 Oct 2017 00:11:56 -0400 Subject: [PATCH] Assmos part 1, #2 --- _maps/map_files/BoxStation/BoxStation.dmm | 4 +- .../map_files/Deltastation/DeltaStation2.dmm | 1 - _maps/map_files/MetaStation/MetaStation.dmm | 4 +- code/__DEFINES/atmospherics.dm | 25 +- code/game/objects/items/theft_tools.dm | 6 +- code/game/turfs/open.dm | 5 - .../atmospherics/environmental/LINDA_fire.dm | 10 +- .../atmospherics/gasmixtures/gas_mixture.dm | 5 +- .../atmospherics/gasmixtures/gas_types.dm | 44 ++- .../atmospherics/gasmixtures/reactions.dm | 303 +++++++++++++----- .../atmospherics/machinery/airalarm.dm | 86 +++-- .../components/unary_devices/tank.dm | 3 - .../components/unary_devices/vent_scrubber.dm | 68 ++-- .../atmospherics/machinery/other/miner.dm | 15 - .../machinery/portable/canister.dm | 39 ++- .../machinery/portable/scrubber.dm | 2 +- code/modules/cargo/packs.dm | 17 - code/modules/holodeck/turfs.dm | 2 +- code/modules/mob/living/carbon/life.dm | 10 + code/modules/power/supermatter/supermatter.dm | 18 +- .../chemistry/reagents/other_reagents.dm | 28 ++ .../chemistry/recipes/slime_extracts.dm | 2 +- code/modules/surgery/organs/lungs.dm | 37 ++- icons/effects/tile_effects.dmi | Bin 2861 -> 4199 bytes tgui/src/interfaces/airalarm/scrubbers.ract | 6 +- tgui/src/interfaces/atmos_filter.ract | 12 +- 26 files changed, 491 insertions(+), 261 deletions(-) diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index e580d6323f..988afb163f 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -53799,7 +53799,7 @@ /turf/open/floor/plasteel, /area/engine/engineering) "cCW" = ( -/obj/machinery/portable_atmospherics/canister/freon, +/obj/machinery/portable_atmospherics/canister/nitrous_oxide, /turf/open/floor/plating, /area/engine/engineering) "cCY" = ( @@ -86226,7 +86226,7 @@ bVI cay ccw chY -cCW +ciZ ciW ckB ckB diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 2e41702eb7..1308cf7c87 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -57403,7 +57403,6 @@ dir = 8 }, /obj/effect/turf_decal/bot, -/obj/machinery/portable_atmospherics/canister/freon, /turf/open/floor/plasteel, /area/engine/engineering) "cqt" = ( diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index aa5a62d079..1b1913ef26 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -77655,7 +77655,7 @@ /turf/open/floor/plating, /area/engine/engineering) "deZ" = ( -/obj/machinery/portable_atmospherics/canister/freon, +/obj/machinery/portable_atmospherics/canister/nitrous_oxide, /turf/open/floor/plating, /area/engine/engineering) "dfa" = ( @@ -120449,7 +120449,7 @@ aGS axY aJl aKx -deZ +aJu aNo axY aPW diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 1273b5e3de..87f16da081 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -56,28 +56,16 @@ #define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C #define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C #define FIRE_SPREAD_RADIOSITY_SCALE 0.85 -#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile -#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile #define FIRE_GROWTH_RATE 40000 //For small fires #define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C //Resistance to fire damage #define CARBON_LIFEFORM_FIRE_DAMAGE 4 //Fire damage - //Plasma fire properties -#define OXYGEN_BURN_RATE_BASE 1.4 -#define PLASMA_BURN_RATE_DELTA 9 -#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C -#define PLASMA_UPPER_TEMPERATURE 1370+T0C -#define PLASMA_MINIMUM_OXYGEN_NEEDED 2 -#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30 -#define PLASMA_OXYGEN_FULLBURN 10 #define MIN_TOXIC_GAS_DAMAGE 1 #define MAX_TOXIC_GAS_DAMAGE 10 -#define MOLES_PLASMA_VISIBLE 0.5 //Moles in a standard cell after which plasma is visible - //Plasma fusion properties -#define PLASMA_BINDING_ENERGY 3000000 -#define MAX_CARBON_EFFICENCY 9 -#define PLASMA_FUSED_COEFFICENT 0.08 -#define CARBON_CATALYST_COEFFICENT 0.01 -#define FUSION_PURITY_THRESHOLD 0.9 +#define MOLES_GAS_VISIBLE 0.5 //Moles in a standard cell after which gases are visible +#define STOP_REACTIONS 2 +#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C +#define GAS_STIM_MINIMUM 0.002 + // Pressure limits. #define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) #define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) @@ -193,8 +181,7 @@ #define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity()) #define ADD_GAS(gas_id, out_list)\ - var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id];\ - out_list[gas_id] = tmp_gaslist.Copy(); + var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id]; out_list[gas_id] = tmp_gaslist.Copy(); //ASSERT_GAS(gas_id, gas_mixture) - used to guarantee that the gas list for this id exists in gas_mixture.gases. //Must be used before adding to a gas. May be used before reading from a gas. diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 628b731197..5f3e493677 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -157,7 +157,7 @@ /obj/item/nuke_core_container/supermatter name = "supermatter bin" - desc = "A tiny receptacle that releases an inert freon mix upon sealing, allowing a sliver of a supermatter crystal to be safely stored.." + desc = "A tiny receptacle that releases an inert hyper-noblium mix upon sealing, allowing a sliver of a supermatter crystal to be safely stored.." var/obj/item/nuke_core/supermatter_sliver/sliver /obj/item/nuke_core_container/supermatter/Destroy() @@ -193,7 +193,7 @@ /obj/item/scalpel/supermatter name = "supermatter scalpel" - desc = "A scalpel with a tip of condensed freon gas, searingly cold to the touch, that can safely shave a sliver off a supermatter crystal." + desc = "A scalpel with a tip of condensed hyper-noblium gas, searingly cold to the touch, that can safely shave a sliver off a supermatter crystal." icon = 'icons/obj/nuke_tools.dmi' icon_state = "supermatter_scalpel" toolspeed = 0.5 @@ -202,7 +202,7 @@ /obj/item/hemostat/supermatter name = "supermatter extraction tongs" - desc = "A pair of tongs made from condensed freon gas, searingly cold to the touch, that can safely grip a supermatter sliver." + desc = "A pair of tongs made from condensed hyper-noblium gas, searingly cold to the touch, that can safely grip a supermatter sliver." icon = 'icons/obj/nuke_tools.dmi' icon_state = "supermatter_tongs" toolspeed = 0.75 diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index 3f5cb9b27f..d227710b32 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -177,11 +177,6 @@ for(var/obj/effect/O in src) if(is_cleanable(O)) qdel(O) - - var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in src) - if(hotspot && !isspaceturf(src)) - air.temperature = max(min(air.temperature-2000,air.temperature/2),0) - qdel(hotspot) return 1 /turf/open/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube) diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index 94b1b8ee45..025c05f6d4 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -14,10 +14,10 @@ var/oxy = air_contents.gases[/datum/gas/oxygen] ? air_contents.gases[/datum/gas/oxygen][MOLES] : 0 var/tox = air_contents.gases[/datum/gas/plasma] ? air_contents.gases[/datum/gas/plasma][MOLES] : 0 - + var/trit = air_contents.gases[/datum/gas/tritium] ? air_contents.gases[/datum/gas/tritium][MOLES] : 0 if(active_hotspot) if(soh) - if(tox > 0.5 && oxy > 0.5) + if((tox > 0.5 || trit > 0.5) && oxy > 0.5) if(active_hotspot.temperature < exposed_temperature) active_hotspot.temperature = exposed_temperature if(active_hotspot.volume < exposed_volume) @@ -26,11 +26,11 @@ var/igniting = 0 - if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && tox > 0.5) + if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && (tox > 0.5 || trit > 0.5)) igniting = 1 if(igniting) - if(oxy < 0.5 || tox < 0.5) + if(oxy < 0.5) return 0 active_hotspot = new /obj/effect/hotspot(src) @@ -112,7 +112,7 @@ qdel(src) return - if(!(location.air) || !location.air.gases[/datum/gas/plasma] || !location.air.gases[/datum/gas/oxygen] || location.air.gases[/datum/gas/plasma][MOLES] < 0.5 || location.air.gases[/datum/gas/oxygen][MOLES] < 0.5) + if(!(location.air) || !(location.air.gases[/datum/gas/plasma] || location.air.gases[/datum/gas/tritium]) || !location.air.gases[/datum/gas/oxygen] || (location.air.gases[/datum/gas/plasma][MOLES] < 0.5 && location.air.gases[/datum/gas/tritium][MOLES] < 0.5) || location.air.gases[/datum/gas/oxygen][MOLES] < 0.5) qdel(src) return diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 9b5ea089c2..8ddde526a7 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -6,7 +6,6 @@ What are the archived variables for? #define MINIMUM_HEAT_CAPACITY 0.0003 #define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */ - GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) @@ -401,6 +400,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) /datum/gas_mixture/react(turf/open/dump_location) . = 0 + reaction_results = new var/list/cached_gases = gases @@ -438,6 +438,9 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) */ . |= reaction.react(src, dump_location) + //to_chat(world,reaction.name) + if (. & STOP_REACTIONS) + break if(.) garbage_collect() if(temperature < TCMB) //just for safety diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm index e8e25fb912..8296ab56f4 100644 --- a/code/modules/atmospherics/gasmixtures/gas_types.dm +++ b/code/modules/atmospherics/gasmixtures/gas_types.dm @@ -58,7 +58,7 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, / specific_heat = 200 name = "Plasma" gas_overlay = "plasma" - moles_visible = MOLES_PLASMA_VISIBLE + moles_visible = MOLES_GAS_VISIBLE dangerous = TRUE /datum/gas/water_vapor @@ -66,14 +66,14 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, / specific_heat = 40 name = "Water Vapor" gas_overlay = "water_vapor" - moles_visible = MOLES_PLASMA_VISIBLE + moles_visible = MOLES_GAS_VISIBLE -/datum/gas/freon - id = "freon" +/datum/gas/hypernoblium + id = "nob" specific_heat = 2000 - name = "Freon" + name = "Hyper-noblium" gas_overlay = "freon" - moles_visible = MOLES_PLASMA_VISIBLE + moles_visible = MOLES_GAS_VISIBLE dangerous = TRUE /datum/gas/nitrous_oxide @@ -84,15 +84,21 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, / moles_visible = 1 dangerous = TRUE -/datum/gas/oxygen_agent_b - id = "agent_b" - specific_heat = 300 - name = "Oxygen Agent B" +/datum/gas/brown_gas //This is nitric oxide, but given generic name to avoid confusion with nitrous oxide(N20 vs. NO2) + id = "browns" + specific_heat = 20 + name = "Brown Gas" + gas_overlay = "browns" + moles_visible = MOLES_GAS_VISIBLE + dangerous = TRUE -/datum/gas/volatile_fuel - id = "v_fuel" - specific_heat = 30 - name = "Volatile Fuel" +/datum/gas/tritium + id = "tritium" + specific_heat = 10 + name = "Tritium" + gas_overlay = "tritium" + moles_visible = MOLES_GAS_VISIBLE + dangerous = TRUE /datum/gas/bz id = "bz" @@ -100,6 +106,16 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, / name = "BZ" dangerous = TRUE +/datum/gas/stimulum + id = "stim" + specific_heat = 5 + name = "Stimulum" + +/datum/gas/pluoxium + id = "pluox" + specific_heat = 80 + name = "Pluoxium" + /obj/effect/overlay/gas icon = 'icons/effects/tile_effects.dmi' mouse_opacity = MOUSE_OPACITY_TRANSPARENT diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index d9389975bb..63b84832af 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -1,6 +1,33 @@ #define NO_REACTION 0 #define REACTING 1 - +//Plasma fire properties +#define OXYGEN_BURN_RATE_BASE 1.4 +#define PLASMA_BURN_RATE_DELTA 9 +#define PLASMA_UPPER_TEMPERATURE 1370+T0C +#define PLASMA_MINIMUM_OXYGEN_NEEDED 2 +#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30 +#define PLASMA_OXYGEN_FULLBURN 10 +#define FIRE_CARBON_ENERGY_RELEASED 100000 //Amount of heat released per mole of burnt carbon into the tile +#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile +//General assmos defines. +#define WATER_VAPOR_FREEZE 200 +#define BROWNS_FORMATION_ENERGY 100000 +#define TRITIUM_BURN_OXY_FACTOR 100 +#define TRITIUM_BURN_TRIT_FACTOR 10 +#define SUPER_SATURATION_THRESHOLD 96 +#define STIMULUM_HEAT_SCALE 100000 +#define STIMULUM_FIRST_RISE 0.65 +#define STIMULUM_FIRST_DROP 0.065 +#define STIMULUM_SECOND_RISE 0.0009 +#define STIMULUM_ABSOLUTE_DROP 0.00000335 +#define REACTION_OPPRESSION_THRESHOLD 5 + //Plasma fusion properties +#define PLASMA_BINDING_ENERGY 3000000 +#define MAX_CATALYST_EFFICENCY 9 +#define PLASMA_FUSED_COEFFICENT 0.08 +#define CATALYST_COEFFICENT 0.01 +#define FUSION_PURITY_THRESHOLD 0.9 +#define FUSION_HEAT_DROPOFF 20000+T0C /datum/controller/subsystem/air/var/list/gas_reactions //this is our singleton of all reactions /proc/init_gas_reactions() @@ -35,48 +62,15 @@ /datum/gas_reaction/proc/react(datum/gas_mixture/air, atom/location) return NO_REACTION -//agent b: converts hot co2 and agent b to oxygen. requires plasma as a catalyst. endothermic -/datum/gas_reaction/agent_b - priority = 2 - name = "Agent B" - id = "agent_b" +/datum/gas_reaction/nobliumsupression + priority = INFINITY + name = "Hyper-Noblium Reaction Supression" + id = "nobstop" +/datum/gas_reaction/nobliumsupression/init_reqs() + min_requirements = list(/datum/gas/hypernoblium = REACTION_OPPRESSION_THRESHOLD) -/datum/gas_reaction/agent_b/init_reqs() - min_requirements = list( - "TEMP" = 900, - /datum/gas/oxygen_agent_b = MINIMUM_HEAT_CAPACITY, - /datum/gas/plasma = MINIMUM_HEAT_CAPACITY, - /datum/gas/carbon_dioxide = MINIMUM_HEAT_CAPACITY - ) - - -/datum/gas_reaction/agent_b/react(datum/gas_mixture/air) - var/list/cached_gases = air.gases - var/reaction_rate = min(cached_gases[/datum/gas/carbon_dioxide][MOLES]*0.75, cached_gases[/datum/gas/plasma][MOLES]*0.25, cached_gases[/datum/gas/oxygen_agent_b][MOLES]*0.05) - - cached_gases[/datum/gas/carbon_dioxide][MOLES] -= reaction_rate - cached_gases[/datum/gas/oxygen_agent_b][MOLES] -= reaction_rate*0.05 - - ASSERT_GAS(/datum/gas/oxygen, air) //only need to assert oxygen, as this reaction doesn't occur without the other gases existing - cached_gases[/datum/gas/oxygen][MOLES] += reaction_rate - - air.temperature -= (reaction_rate*20000)/air.heat_capacity() - - return REACTING - -//freon: does a freezy thing? -/datum/gas_reaction/freon - priority = 1 - name = "Freon" - id = "freon" - -/datum/gas_reaction/freon/init_reqs() - min_requirements = list(/datum/gas/freon = MOLES_PLASMA_VISIBLE) - -/datum/gas_reaction/freon/react(datum/gas_mixture/air, turf/open/location) - . = NO_REACTION - if(location && location.freon_gas_act()) - . = REACTING +/datum/gas_reaction/nobliumsupression/react() + return STOP_REACTIONS //water vapor: puts out fires? /datum/gas_reaction/water_vapor @@ -85,12 +79,15 @@ id = "vapor" /datum/gas_reaction/water_vapor/init_reqs() - min_requirements = list(/datum/gas/water_vapor = MOLES_PLASMA_VISIBLE) + min_requirements = list(/datum/gas/water_vapor = MOLES_GAS_VISIBLE) /datum/gas_reaction/water_vapor/react(datum/gas_mixture/air, turf/open/location) . = NO_REACTION - if(location && location.water_vapor_gas_act()) - air.gases[/datum/gas/water_vapor][MOLES] -= MOLES_PLASMA_VISIBLE + if (air.temperature <= WATER_VAPOR_FREEZE) + if(location && location.freon_gas_act()) + . = REACTING + else if(location && location.water_vapor_gas_act()) + air.gases[/datum/gas/water_vapor][MOLES] -= MOLES_GAS_VISIBLE . = REACTING //fire: combustion of plasma and volatile fuel (treated as hydrocarbons). creates hotspots. exothermic @@ -100,7 +97,7 @@ id = "fire" /datum/gas_reaction/fire/init_reqs() - min_requirements = list("TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST) //doesn't include plasma reqs b/c of volatile fuel stuff - consider finally axing volatile fuel + min_requirements = list("TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST) //doesn't include plasma reqs b/c of other, rarer, burning gases. /datum/gas_reaction/fire/react(datum/gas_mixture/air, turf/open/location) var/energy_released = 0 @@ -111,23 +108,23 @@ cached_results[id] = 0 //General volatile gas burn - if(cached_gases[/datum/gas/volatile_fuel] && cached_gases[/datum/gas/volatile_fuel][MOLES]) + if(cached_gases[/datum/gas/tritium] && cached_gases[/datum/gas/tritium][MOLES]) var/burned_fuel if(!cached_gases[/datum/gas/oxygen]) burned_fuel = 0 - else if(cached_gases[/datum/gas/oxygen][MOLES] < cached_gases[/datum/gas/volatile_fuel][MOLES]) - burned_fuel = cached_gases[/datum/gas/oxygen][MOLES] - cached_gases[/datum/gas/volatile_fuel][MOLES] -= burned_fuel - cached_gases[/datum/gas/oxygen][MOLES] = 0 + else if(cached_gases[/datum/gas/oxygen][MOLES] < cached_gases[/datum/gas/tritium][MOLES]) + burned_fuel = cached_gases[/datum/gas/oxygen][MOLES]/TRITIUM_BURN_OXY_FACTOR + cached_gases[/datum/gas/tritium][MOLES] -= burned_fuel else - burned_fuel = cached_gases[/datum/gas/volatile_fuel][MOLES] - cached_gases[/datum/gas/oxygen][MOLES] -= cached_gases[/datum/gas/volatile_fuel][MOLES] + burned_fuel = cached_gases[/datum/gas/tritium][MOLES]*TRITIUM_BURN_TRIT_FACTOR + cached_gases[/datum/gas/tritium][MOLES] -= cached_gases[/datum/gas/tritium][MOLES]/TRITIUM_BURN_TRIT_FACTOR + cached_gases[/datum/gas/oxygen][MOLES] -= cached_gases[/datum/gas/tritium][MOLES] if(burned_fuel) energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel ASSERT_GAS(/datum/gas/carbon_dioxide, air) - cached_gases[/datum/gas/carbon_dioxide][MOLES] += burned_fuel + cached_gases[/datum/gas/carbon_dioxide][MOLES] += burned_fuel/TRITIUM_BURN_OXY_FACTOR cached_results[id] += burned_fuel @@ -137,6 +134,7 @@ var/oxygen_burn_rate = 0 //more plasma released at higher temperatures var/temperature_scale + var/super_saturation if(temperature > PLASMA_UPPER_TEMPERATURE) temperature_scale = 1 else @@ -144,15 +142,25 @@ if(temperature_scale > 0) var/o2 = cached_gases[/datum/gas/oxygen] ? cached_gases[/datum/gas/oxygen][MOLES] : 0 oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale + if (o2 > cached_gases[/datum/gas/plasma][MOLES]*PLASMA_OXYGEN_FULLBURN) + plasma_burn_rate = (cached_gases[/datum/gas/plasma][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA + if(o2 / cached_gases[/datum/gas/plasma][MOLES] > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium. + super_saturation = TRUE if(o2 > cached_gases[/datum/gas/plasma][MOLES]*PLASMA_OXYGEN_FULLBURN) plasma_burn_rate = (cached_gases[/datum/gas/plasma][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA else plasma_burn_rate = (temperature_scale*(o2/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA + if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY) ASSERT_GAS(/datum/gas/carbon_dioxide, air) //don't need to assert o2, since if it isn't present we'll never reach this point anyway cached_gases[/datum/gas/plasma][MOLES] = QUANTIZE(cached_gases[/datum/gas/plasma][MOLES] - plasma_burn_rate) cached_gases[/datum/gas/oxygen][MOLES] = QUANTIZE(cached_gases[/datum/gas/oxygen][MOLES] - (plasma_burn_rate * oxygen_burn_rate)) - cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate + if (super_saturation) + ASSERT_GAS(/datum/gas/tritium,air) + cached_gases[/datum/gas/tritium][MOLES] += plasma_burn_rate + else + ASSERT_GAS(/datum/gas/carbon_dioxide,air) + cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate) @@ -175,9 +183,9 @@ return cached_results[id] ? REACTING : NO_REACTION -//fusion: a terrible idea that was fun to try. turns co2 and plasma into REALLY HOT oxygen and nitrogen. super exothermic lol +//fusion: a terrible idea that was fun but broken. Now reworked to be less broken and more interesting. /datum/gas_reaction/fusion - exclude = TRUE + exclude = FALSE priority = 2 name = "Plasmic Fusion" id = "fusion" @@ -186,35 +194,37 @@ min_requirements = list( "ENER" = PLASMA_BINDING_ENERGY * 10, /datum/gas/plasma = MINIMUM_HEAT_CAPACITY, - /datum/gas/carbon_dioxide = MINIMUM_HEAT_CAPACITY + /datum/gas/tritium = MINIMUM_HEAT_CAPACITY ) /datum/gas_reaction/fusion/react(datum/gas_mixture/air) var/list/cached_gases = air.gases var/temperature = air.temperature - if((cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/carbon_dioxide][MOLES])/air.total_moles() < FUSION_PURITY_THRESHOLD) - //Fusion wont occur if the level of impurities is too high. + if(((cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/tritium][MOLES])/air.total_moles() < FUSION_PURITY_THRESHOLD) || air.return_pressure() < 10*ONE_ATMOSPHERE) + //Fusion wont occur if the level of impurities is too high or if there is too little pressure. return NO_REACTION var/old_heat_capacity = air.heat_capacity() - var/carbon_efficency = min(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/carbon_dioxide][MOLES],MAX_CARBON_EFFICENCY) + var/catalyst_efficency = max(min(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/tritium][MOLES],MAX_CATALYST_EFFICENCY)-(temperature/FUSION_HEAT_DROPOFF),1) var/reaction_energy = THERMAL_ENERGY(air) - var/moles_impurities = air.total_moles()-(cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/carbon_dioxide][MOLES]) + var/moles_impurities = air.total_moles()-(cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/tritium][MOLES]) - var/plasma_fused = (PLASMA_FUSED_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY) - var/carbon_catalyzed = (CARBON_CATALYST_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY) - var/oxygen_added = carbon_catalyzed - var/nitrogen_added = (plasma_fused-oxygen_added)-(THERMAL_ENERGY(air)/PLASMA_BINDING_ENERGY) + var/plasma_fused = (PLASMA_FUSED_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY)*4 + var/tritium_catalyzed = (CATALYST_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY) + var/oxygen_added = tritium_catalyzed + var/waste_added = (plasma_fused-oxygen_added)-((air.total_moles()*air.heat_capacity())/PLASMA_BINDING_ENERGY) + reaction_energy = max(reaction_energy+((catalyst_efficency*cached_gases[/datum/gas/plasma][MOLES])/((moles_impurities/catalyst_efficency)+2)*10)+((plasma_fused/((moles_impurities/catalyst_efficency)))*PLASMA_BINDING_ENERGY),0) - reaction_energy = max(reaction_energy+((carbon_efficency*cached_gases[/datum/gas/plasma][MOLES])/((moles_impurities/carbon_efficency)+2)*10)+((plasma_fused/(moles_impurities/carbon_efficency))*PLASMA_BINDING_ENERGY),0) - - air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen) - - cached_gases[/datum/gas/plasma][MOLES] -= plasma_fused - cached_gases[/datum/gas/carbon_dioxide][MOLES] -= carbon_catalyzed + air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/water_vapor, /datum/gas/nitrous_oxide, /datum/gas/brown_gas) + //Fusion produces an absurd amount of waste products now, requiring active filtration. + cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES] - plasma_fused,0) + cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES] - tritium_catalyzed,0) cached_gases[/datum/gas/oxygen][MOLES] += oxygen_added - cached_gases[/datum/gas/nitrogen][MOLES] += nitrogen_added + cached_gases[/datum/gas/nitrogen][MOLES] += waste_added + cached_gases[/datum/gas/water_vapor][MOLES] += waste_added + cached_gases[/datum/gas/nitrous_oxide][MOLES] += waste_added + cached_gases[/datum/gas/brown_gas][MOLES] += waste_added if(reaction_energy > 0) var/new_heat_capacity = air.heat_capacity() @@ -223,5 +233,152 @@ //Prevents whatever mechanism is causing it to hit negative temperatures. return REACTING +/datum/gas_reaction/brownsformation //The formation of brown gas. Endothermic. Requires N2O as a catalyst. + priority = 3 + name = "Brown Gas formation" + id = "brownsformation" + +/datum/gas_reaction/brownsformation/init_reqs() + min_requirements = list( + /datum/gas/oxygen = 20, + /datum/gas/nitrogen = 20, + /datum/gas/nitrous_oxide = 5, + "TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST*400 + ) + +/datum/gas_reaction/brownsformation/react(datum/gas_mixture/air) + var/list/cached_gases = air.gases + var/temperature = air.temperature + + var/old_heat_capacity = air.heat_capacity() + var/heat_efficency = temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100) + var/energy_used = heat_efficency*BROWNS_FORMATION_ENERGY + ASSERT_GAS(/datum/gas/brown_gas,air) + + cached_gases[/datum/gas/oxygen][MOLES] -= heat_efficency + cached_gases[/datum/gas/nitrogen][MOLES] -= heat_efficency + cached_gases[/datum/gas/brown_gas][MOLES] += heat_efficency*2 + + if(energy_used > 0) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = max(((temperature*old_heat_capacity - energy_used)/new_heat_capacity),TCMB) + return REACTING + +/datum/gas_reaction/bzformation //Formation of BZ by combining plasma and tritium at low pressures. Exothermic. + priority = 4 + name = "BZ Gas formation" + id = "bzformation" + +/datum/gas_reaction/bzformation/init_reqs() + min_requirements = list( + /datum/gas/tritium = 10, + /datum/gas/plasma = 10 + ) + + +/datum/gas_reaction/bzformation/react(datum/gas_mixture/air) + var/list/cached_gases = air.gases + var/temperature = air.temperature + var/pressure = air.return_pressure() + + var/old_heat_capacity = air.heat_capacity() + var/reaction_efficency = 1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/tritium][MOLES],1))) + var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED + + ASSERT_GAS(/datum/gas/bz,air) + cached_gases[/datum/gas/bz][MOLES]+= reaction_efficency + cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- 2*reaction_efficency,0) + cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES] - reaction_efficency,0) + + + if(energy_released > 0) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = max(((temperature*old_heat_capacity + energy_released)/new_heat_capacity),TCMB) + return REACTING + +/datum/gas_reaction/stimformation //Stimulum formation follows a strange pattern of how effective it will be at a given temperature, having some multiple peaks and some large dropoffs. Exo and endo thermic. + priority = 5 + name = "Stimulum formation" + id = "stimformation" +/datum/gas_reaction/stimformation/init_reqs() + min_requirements = list( + /datum/gas/tritium = 30, + /datum/gas/plasma = 10, + /datum/gas/bz = 20, + /datum/gas/brown_gas = 30, + "TEMP" = STIMULUM_HEAT_SCALE/2) + +/datum/gas_reaction/stimformation/react(datum/gas_mixture/air) + var/list/cached_gases = air.gases + + var/old_heat_capacity = air.heat_capacity() + var/heat_scale = air.temperature/STIMULUM_HEAT_SCALE + var/stim_energy_change + stim_energy_change =heat_scale + (STIMULUM_FIRST_RISE(heat_scale**2)) - (STIMULUM_FIRST_DROP(heat_scale**3)) + (STIMULUM_SECOND_RISE(heat_scale**4)) - (STIMULUM_ABSOLUTE_DROP(heat_scale**5)) + + ASSERT_GAS(/datum/gas/stimulum,air) + cached_gases[/datum/gas/stimulum][MOLES]+= heat_scale/10 + cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- heat_scale,0) + cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES]- heat_scale,0) + cached_gases[/datum/gas/brown_gas][MOLES] = max(cached_gases[/datum/gas/brown_gas][MOLES]- heat_scale,0) + + if(stim_energy_change) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = max(((air.temperature*old_heat_capacity + stim_energy_change)/new_heat_capacity),TCMB) + return REACTING + +/datum/gas_reaction/nobliumformation //Hyper-Nobelium formation is extrememly endothermic, but requires high temperatures to start. Due to its high mass, hyper-nobelium uses large amounts of nitrogen and tritium. BZ can be used as a catalyst to make it less endothermic. + priority = 6 + name = "Hyper-Noblium condensation" + id = "nobformation" + +/datum/gas_reaction/nobliumformation/init_reqs() + min_requirements = list( + /datum/gas/nitrogen = 10, + /datum/gas/tritium = 5, + "TEMP" = 5000000) + +/datum/gas_reaction/nobliumformation/react(datum/gas_mixture/air) + var/list/cached_gases = air.gases + air.assert_gases(/datum/gas/hypernoblium,/datum/gas/bz) + var/old_heat_capacity = air.heat_capacity() + var/nob_formed = (cached_gases[/datum/gas/nitrogen][MOLES]*cached_gases[/datum/gas/tritium][MOLES])/100 + var/energy_taken = nob_formed*(10000000/(max(cached_gases[/datum/gas/bz][MOLES],1))) + cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- 10*nob_formed,0) + cached_gases[/datum/gas/nitrogen][MOLES] = max(cached_gases[/datum/gas/nitrogen][MOLES]- 20*nob_formed,0) + cached_gases[/datum/gas/hypernoblium][MOLES]+= nob_formed + + + if (nob_formed) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = max(((air.temperature*old_heat_capacity - energy_taken)/new_heat_capacity),TCMB) #undef REACTING #undef NO_REACTION +#undef OXYGEN_BURN_RATE_BASE +#undef PLASMA_BURN_RATE_DELTA +#undef PLASMA_UPPER_TEMPERATURE +#undef PLASMA_MINIMUM_OXYGEN_NEEDED +#undef PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO +#undef PLASMA_OXYGEN_FULLBURN +#undef FIRE_CARBON_ENERGY_RELEASED +#undef FIRE_PLASMA_ENERGY_RELEASED +#undef WATER_VAPOR_FREEZE +#undef BROWNS_FORMATION_ENERGY +#undef TRITIUM_BURN_OXY_FACTOR +#undef SUPER_SATURATION_THRESHOLD +#undef STIMULUM_HEAT_SCALE +#undef STIMULUM_FIRST_RISE +#undef STIMULUM_FIRST_DROP +#undef STIMULUM_SECOND_RISE +#undef STIMULUM_ABSOLUTE_DROP +#undef REACTION_OPPRESSION_THRESHOLD +#undef PLASMA_BINDING_ENERGY +#undef MAX_CATALYST_EFFICENCY +#undef PLASMA_FUSED_COEFFICENT +#undef CATALYST_COEFFICENT +#undef FUSION_PURITY_THRESHOLD +#undef FUSION_HEAT_DROPOFF \ No newline at end of file diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 18f88874e8..d2603208e5 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -5,10 +5,10 @@ var/max2 /datum/tlv/New(min2 as num, min1 as num, max1 as num, max2 as num) - src.min2 = min2 - src.min1 = min1 - src.max1 = max1 - src.max2 = max2 + if(min2) src.min2 = min2 + if(min1) src.min1 = min1 + if(max1) src.max1 = max1 + if(max2) src.max2 = max2 /datum/tlv/proc/get_danger_level(val as num) if(max2 != -1 && val >= max2) @@ -21,6 +21,18 @@ return 1 return 0 +/datum/tlv/no_checks + min2 = -1 + min1 = -1 + max1 = -1 + max2 = -1 + +/datum/tlv/dangerous + min2 = -1 + min1 = -1 + max1 = 0.2 + max2 = 0.5 + /obj/item/electronics/airalarm name = "air alarm electronics" icon_state = "airalarm_electronics" @@ -78,25 +90,33 @@ /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa - /datum/gas/plasma = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa - /datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa - /datum/gas/bz = new/datum/tlv(-1, -1, 0.2, 0.5), - /datum/gas/freon = new/datum/tlv(-1, -1, 0.2, 0.5), - /datum/gas/water_vapor = new/datum/tlv(-1, -1, 0.2, 0.5) + /datum/gas/plasma = new/datum/tlv/dangerous, // Partial pressure, kpa + /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, // Partial pressure, kpa + /datum/gas/bz = new/datum/tlv/dangerous, + /datum/gas/hypernoblium = new/datum/tlv/dangerous, + /datum/gas/water_vapor = new/datum/tlv/dangerous, + /datum/gas/tritium = new/datum/tlv/dangerous, + /datum/gas/stimulum = new/datum/tlv/dangerous, + /datum/gas/brown_gas = new/datum/tlv/dangerous, + /datum/gas/pluoxium = new/datum/tlv/dangerous ) /obj/machinery/airalarm/server // No checks here. TLV = list( - "pressure" = new/datum/tlv(-1, -1, -1, -1), - "temperature" = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/oxygen = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/nitrogen = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/plasma = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/bz = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/freon = new/datum/tlv(-1, -1, -1, -1), - /datum/gas/water_vapor = new/datum/tlv(-1, -1, -1, -1) + "pressure" = new/datum/tlv/no_checks, + "temperature" = new/datum/tlv/no_checks, + /datum/gas/oxygen = new/datum/tlv/no_checks, + /datum/gas/nitrogen = new/datum/tlv/no_checks, + /datum/gas/carbon_dioxide = new/datum/tlv/no_checks, + /datum/gas/plasma = new/datum/tlv/no_checks, + /datum/gas/nitrous_oxide = new/datum/tlv/no_checks, + /datum/gas/bz = new/datum/tlv/no_checks, + /datum/gas/hypernoblium = new/datum/tlv/no_checks, + /datum/gas/water_vapor = new/datum/tlv/no_checks, + /datum/gas/tritium = new/datum/tlv/no_checks, + /datum/gas/stimulum = new/datum/tlv/no_checks, + /datum/gas/brown_gas = new/datum/tlv/no_checks, + /datum/gas/pluoxium = new/datum/tlv/no_checks ) /obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures. @@ -106,11 +126,15 @@ /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa - /datum/gas/plasma = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa - /datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa - /datum/gas/bz = new/datum/tlv(-1, -1, 0.2, 0.5), - /datum/gas/freon = new/datum/tlv(-1, -1, 0.2, 0.5), - /datum/gas/water_vapor = new/datum/tlv(-1, -1, 0.2, 0.5) + /datum/gas/plasma = new/datum/tlv/dangerous, // Partial pressure, kpa + /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, // Partial pressure, kpa + /datum/gas/bz = new/datum/tlv/dangerous, + /datum/gas/hypernoblium = new/datum/tlv/dangerous, + /datum/gas/water_vapor = new/datum/tlv/dangerous, + /datum/gas/tritium = new/datum/tlv/dangerous, + /datum/gas/stimulum = new/datum/tlv/dangerous, + /datum/gas/brown_gas = new/datum/tlv/dangerous, + /datum/gas/pluoxium = new/datum/tlv/dangerous ) /obj/machinery/airalarm/engine @@ -256,8 +280,7 @@ "filter_co2" = info["filter_co2"], "filter_toxins" = info["filter_toxins"], "filter_n2o" = info["filter_n2o"], - "filter_bz" = info["filter_bz"], - "filter_freon" = info["filter_freon"], + "filter_rare" = info["filter_rare"], "filter_water_vapor" = info["filter_water_vapor"] )) data["mode"] = mode @@ -314,7 +337,7 @@ if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN)) locked = !locked . = TRUE - if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "bz_scrub", "freon_scrub","water_vapor_scrub", "widenet", "scrubbing") + if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "rare_scrub","water_vapor_scrub", "widenet", "scrubbing") send_signal(device_id, list("[action]" = text2num(params["val"]))) . = TRUE if("excheck") @@ -433,8 +456,7 @@ "co2_scrub" = 1, "tox_scrub" = 0, "n2o_scrub" = 0, - "bz_scrub" = 0, - "freon_scrub"= 0, + "rare_scrub"= 0, "water_vapor_scrub"= 0, "scrubbing" = 1, "widenet" = 0, @@ -452,8 +474,7 @@ "co2_scrub" = 1, "tox_scrub" = 1, "n2o_scrub" = 1, - "bz_scrub" = 1, - "freon_scrub"= 1, + "rare_scrub"= 1, "water_vapor_scrub"= 1, "scrubbing" = 1, "widenet" = 1, @@ -484,8 +505,7 @@ "co2_scrub" = 1, "tox_scrub" = 0, "n2o_scrub" = 0, - "bz_scrub" = 0, - "freon_scrub"= 0, + "rare_scrub"= 0, "water_vapor_scrub"= 0, "scrubbing" = 1, "widenet" = 0, diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index 04f1068a00..ec1fcdfc52 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -28,9 +28,6 @@ icon_state = "orange" gas_type = /datum/gas/plasma -/obj/machinery/atmospherics/components/unary/tank/oxygen_agent_b - icon_state = "orange_2" - gas_type = /datum/gas/oxygen_agent_b /obj/machinery/atmospherics/components/unary/tank/oxygen icon_state = "blue" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index 7665f93af3..5c8c31f793 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -20,8 +20,7 @@ var/scrub_CO2 = TRUE var/scrub_Toxins = FALSE var/scrub_N2O = FALSE - var/scrub_BZ = FALSE - var/scrub_Freon = FALSE + var/scrub_Rare = FALSE var/scrub_WaterVapor = FALSE @@ -70,9 +69,7 @@ amount += idle_power_usage if(scrub_N2O) amount += idle_power_usage - if(scrub_BZ) - amount += idle_power_usage - if(scrub_Freon) + if(scrub_Rare) amount += idle_power_usage if(scrub_WaterVapor) amount += idle_power_usage @@ -125,8 +122,7 @@ "filter_co2" = scrub_CO2, "filter_toxins" = scrub_Toxins, "filter_n2o" = scrub_N2O, - "filter_bz" = scrub_BZ, - "filter_freon" = scrub_Freon, + "filter_rare" =scrub_Rare, "filter_water_vapor" = scrub_WaterVapor, "sigtype" = "status" ) @@ -198,37 +194,52 @@ filtered_out.temperature = removed.temperature if(scrub_Toxins && removed_gases[/datum/gas/plasma]) - ADD_GAS(/datum/gas/plasma, filtered_out.gases) + ADD_GAS(/datum/gas/plasma, filtered_gases) filtered_gases[/datum/gas/plasma][MOLES] = removed_gases[/datum/gas/plasma][MOLES] removed_gases[/datum/gas/plasma][MOLES] = 0 if(scrub_CO2 && removed_gases[/datum/gas/carbon_dioxide]) - ADD_GAS(/datum/gas/carbon_dioxide, filtered_out.gases) + ADD_GAS(/datum/gas/carbon_dioxide, filtered_gases) filtered_gases[/datum/gas/carbon_dioxide][MOLES] = removed_gases[/datum/gas/carbon_dioxide][MOLES] removed_gases[/datum/gas/carbon_dioxide][MOLES] = 0 - if(removed_gases[/datum/gas/oxygen_agent_b]) - ADD_GAS(/datum/gas/oxygen_agent_b, filtered_out.gases) - filtered_gases[/datum/gas/oxygen_agent_b][MOLES] = removed_gases[/datum/gas/oxygen_agent_b][MOLES] - removed_gases[/datum/gas/oxygen_agent_b][MOLES] = 0 - if(scrub_N2O && removed_gases[/datum/gas/nitrous_oxide]) - ADD_GAS(/datum/gas/nitrous_oxide, filtered_out.gases) + ADD_GAS(/datum/gas/nitrous_oxide, filtered_gases) filtered_gases[/datum/gas/nitrous_oxide][MOLES] = removed_gases[/datum/gas/nitrous_oxide][MOLES] removed_gases[/datum/gas/nitrous_oxide][MOLES] = 0 - if(scrub_BZ && removed_gases[/datum/gas/bz]) - ADD_GAS(/datum/gas/bz, filtered_out.gases) + if(scrub_Rare && removed_gases[/datum/gas/bz]) + ADD_GAS(/datum/gas/bz, filtered_gases) filtered_gases[/datum/gas/bz][MOLES] = removed_gases[/datum/gas/bz][MOLES] removed_gases[/datum/gas/bz][MOLES] = 0 - if(scrub_Freon && removed_gases[/datum/gas/freon]) - ADD_GAS(/datum/gas/freon, filtered_out.gases) - filtered_gases[/datum/gas/freon][MOLES] = removed_gases[/datum/gas/freon][MOLES] - removed_gases[/datum/gas/freon][MOLES] = 0 + if(scrub_Rare && removed_gases[/datum/gas/hypernoblium]) + ADD_GAS(/datum/gas/hypernoblium, filtered_gases) + filtered_gases[/datum/gas/hypernoblium][MOLES] = removed_gases[/datum/gas/hypernoblium][MOLES] + removed_gases[/datum/gas/hypernoblium][MOLES] = 0 + + if(scrub_Rare && removed_gases[/datum/gas/stimulum]) + ADD_GAS(/datum/gas/stimulum, filtered_gases) + filtered_gases[/datum/gas/stimulum][MOLES] = removed_gases[/datum/gas/stimulum][MOLES] + removed_gases[/datum/gas/stimulum][MOLES] = 0 + + if(scrub_Rare && removed_gases[/datum/gas/pluoxium]) + ADD_GAS(/datum/gas/pluoxium, filtered_gases) + filtered_gases[/datum/gas/pluoxium][MOLES] = removed_gases[/datum/gas/pluoxium][MOLES] + removed_gases[/datum/gas/pluoxium][MOLES] = 0 + + if(scrub_Rare && removed_gases[/datum/gas/brown_gas]) + ADD_GAS(/datum/gas/brown_gas, filtered_gases) + filtered_gases[/datum/gas/brown_gas][MOLES] = removed_gases[/datum/gas/brown_gas][MOLES] + removed_gases[/datum/gas/brown_gas][MOLES] = 0 + + if(scrub_Rare && removed_gases[/datum/gas/tritium]) + ADD_GAS(/datum/gas/tritium, filtered_gases) + filtered_gases[/datum/gas/tritium][MOLES] = removed_gases[/datum/gas/tritium][MOLES] + removed_gases[/datum/gas/tritium][MOLES] = 0 if(scrub_WaterVapor && removed_gases[/datum/gas/water_vapor]) - ADD_GAS(/datum/gas/water_vapor, filtered_out.gases) + ADD_GAS(/datum/gas/water_vapor, filtered_gases) filtered_gases[/datum/gas/water_vapor][MOLES] = removed_gases[/datum/gas/water_vapor][MOLES] removed_gases[/datum/gas/water_vapor][MOLES] = 0 @@ -303,15 +314,10 @@ if("toggle_n2o_scrub" in signal.data) scrub_N2O = !scrub_N2O - if("bz_scrub" in signal.data) - scrub_BZ = text2num(signal.data["bz_scrub"]) - if("toggle_bz_scrub" in signal.data) - scrub_BZ = !scrub_BZ - - if("freon_scrub" in signal.data) - scrub_Freon = text2num(signal.data["freon_scrub"]) - if("toggle_freon_scrub" in signal.data) - scrub_Freon = !scrub_Freon + if("rare_scrub" in signal.data) + scrub_Rare = text2num(signal.data["rare_scrub"]) + if("toggle_rare_scrub" in signal.data) + scrub_Rare = !scrub_Rare if("water_vapor_scrub" in signal.data) scrub_WaterVapor = text2num(signal.data["water_vapor_scrub"]) diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm index 99e6cda6af..cb28f17802 100644 --- a/code/modules/atmospherics/machinery/other/miner.dm +++ b/code/modules/atmospherics/machinery/other/miner.dm @@ -173,21 +173,6 @@ overlay_color = "#FAFF00" spawn_id = /datum/gas/bz -/obj/machinery/atmospherics/miner/freon - name = "\improper Freon Gas Miner" - overlay_color = "#00FFE5" - spawn_id = /datum/gas/freon - -/obj/machinery/atmospherics/miner/volatile_fuel - name = "\improper Volatile Fuel Gas Miner" - overlay_color = "#564040" - spawn_id = /datum/gas/volatile_fuel - -/obj/machinery/atmospherics/miner/agent_b - name = "\improper Agent B Gas Miner" - overlay_color = "#E81E24" - spawn_id = /datum/gas/oxygen_agent_b - /obj/machinery/atmospherics/miner/water_vapor name = "\improper Water Vapor Gas Miner" overlay_color = "#99928E" diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 38c96a8ec9..0a7f43b383 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -43,7 +43,6 @@ "n2o" = /obj/machinery/portable_atmospherics/canister/nitrous_oxide, "bz" = /obj/machinery/portable_atmospherics/canister/bz, "air" = /obj/machinery/portable_atmospherics/canister/air, - "freon" = /obj/machinery/portable_atmospherics/canister/freon, "water vapor" = /obj/machinery/portable_atmospherics/canister/water_vapor, "caution" = /obj/machinery/portable_atmospherics/canister, ) @@ -79,11 +78,6 @@ icon_state = "orange" gas_type = /datum/gas/plasma -/obj/machinery/portable_atmospherics/canister/agent_b - name = "agent b canister" - desc = "Oxygen Agent B. You're not quite sure what it does." - gas_type = /datum/gas/oxygen_agent_b - /obj/machinery/portable_atmospherics/canister/bz name = "BZ canister" desc = "BZ, a powerful hallucinogenic nerve agent." @@ -101,12 +95,30 @@ desc = "Pre-mixed air." icon_state = "grey" -/obj/machinery/portable_atmospherics/canister/freon - name = "freon canister" - desc = "Freon. Great for the atmosphere!" - icon_state = "freon" - gas_type = /datum/gas/freon - starter_temp = 120 +/obj/machinery/portable_atmospherics/canister/tritium + name = "tritium canister" + desc = "Tritium. Inhalation might cause irradiation." + gas_type = /datum/gas/tritium + +/obj/machinery/portable_atmospherics/canister/nob + name = "hyper-noblium canister" + desc = "Hyper-Noblium. More noble than all other gases." + gas_type = /datum/gas/hypernoblium + +/obj/machinery/portable_atmospherics/canister/browns + name = "brown gas canister" + desc = "Browns gas. Feels great 'til the acid eats your lungs." + gas_type = /datum/gas/brown_gas + +/obj/machinery/portable_atmospherics/canister/stimulum + name = "stimulum canister" + desc = "Stimulum. High energy gas, high energy people." + gas_type = /datum/gas/stimulum + +/obj/machinery/portable_atmospherics/canister/pluoxium + name = "pluoxium canister" + desc = "Pluoxium. Like oxygen, but more bang for your buck." + gas_type = /datum/gas/pluoxium /obj/machinery/portable_atmospherics/canister/water_vapor name = "water vapor canister" @@ -115,6 +127,7 @@ gas_type = /datum/gas/water_vapor filled = 1 + /obj/machinery/portable_atmospherics/canister/proc/get_time_left() if(timing) . = round(max(0, valve_timer - world.time) / 10, 1) @@ -402,7 +415,7 @@ var/gas = air_contents.gases[id] if(!gas[GAS_META][META_GAS_DANGER]) continue - if(gas[MOLES] > (gas[GAS_META][META_GAS_MOLES_VISIBLE] || MOLES_PLASMA_VISIBLE)) //if moles_visible is undefined, default to plasma visibility + if(gas[MOLES] > (gas[GAS_META][META_GAS_MOLES_VISIBLE] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility danger[gas[GAS_META][META_GAS_NAME]] = gas[MOLES] //ex. "plasma" = 20 if(danger.len) diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index cd857d19a1..bb203fd6ee 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -7,7 +7,7 @@ var/volume_rate = 1000 volume = 1000 - var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/oxygen_agent_b, /datum/gas/bz, /datum/gas/freon, /datum/gas/water_vapor) + var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/brown_gas, /datum/gas/tritium, /datum/gas/hypernoblium, /datum/gas/water_vapor) /obj/machinery/portable_atmospherics/scrubber/Destroy() var/turf/T = get_turf(src) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index c5b180d8a1..4269de6069 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -937,23 +937,6 @@ crate_type = /obj/structure/closet/crate/secure/science dangerous = TRUE -/datum/supply_pack/science/bz_canister - name = "BZ Canister" - cost = 2000 - access_any = list(ACCESS_RD, ACCESS_ATMOSPHERICS) - contains = list(/obj/machinery/portable_atmospherics/canister/bz) - crate_name = "bz canister crate" - crate_type = /obj/structure/closet/crate/secure/science - dangerous = TRUE - -/datum/supply_pack/science/freon_canister - name = "Freon Canister" - cost = 6000 - access_any = list(ACCESS_RD, ACCESS_ATMOSPHERICS) - contains = list(/obj/machinery/portable_atmospherics/canister/freon) - crate_name = "freon canister crate" - crate_type = /obj/structure/closet/crate/secure/science - dangerous = TRUE /datum/supply_pack/science/research name = "Machine Prototype Crate" diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 80a7b7a545..680300b404 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -106,7 +106,7 @@ slowdown = 2 /turf/open/floor/holofloor/snow/cold - initial_gas_mix = "freon=7500;TEMP=0" + initial_gas_mix = "nob=7500;TEMP=2.7" /turf/open/floor/holofloor/asteroid name = "asteroid sand" diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 31f8eb3f73..71a05eb1f9 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -203,6 +203,16 @@ hallucination += 20 else if(bz_partialpressure > 0.01) hallucination += 5//Removed at 2 per tick so this will slowly build up + //TRITIUM + if(breath_gases[/datum/gas/tritium]) + var/tritium_partialpressure = (breath_gases[/datum/gas/tritium][MOLES]/breath.total_moles())*breath_pressure + radiation += tritium_partialpressure/10 + //Brown Gas + if (breath_gases[/datum/gas/brown_gas]) + var/browns_partialpressure = (breath_gases[/datum/gas/brown_gas][MOLES]/breath.total_moles())*breath_pressure + adjustFireLoss(browns_partialpressure/4) + + breath.garbage_collect() diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index d9aabd1197..3a73ddf820 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -9,7 +9,6 @@ #define OXYGEN_TRANSMIT_MODIFIER 1.5 //Higher == Bigger bonus to power generation. #define PLASMA_TRANSMIT_MODIFIER 4 -#define FREON_TRANSMIT_PENALTY 0.75 // Scales how much freon reduces total power transmission. 1 equals 1% per 1% of freon in the mix. #define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage. @@ -30,7 +29,7 @@ #define THERMAL_RELEASE_MODIFIER 5 //Higher == less heat released during reaction, not to be confused with the above values #define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction #define OXYGEN_RELEASE_MODIFIER 325 //Higher == less oxygen released at high temperature/power -#define FREON_BREEDING_MODIFIER 100 //Higher == less freon created + #define REACTION_POWER_MODIFIER 0.55 //Higher == more overall power #define MATTER_POWER_CONVERSION 10 //Crystal converts 1/this value of stored matter into energy. @@ -92,7 +91,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) var/power = 0 var/n2comp = 0 // raw composition of each gas in the chamber, ranges from 0 to 1 - var/freoncomp = 0 var/plasmacomp = 0 var/o2comp = 0 @@ -107,7 +105,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) var/powerloss_dynamic_scaling= 0 var/power_transmission_bonus = 0 var/mole_heat_penalty = 0 - var/freon_transmit_modifier = 1 + var/matter_power = 0 @@ -284,7 +282,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) if(damage > damage_archived && prob(10)) playsound(get_turf(src), 'sound/effects/empulse.ogg', 50, 1) - removed.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/nitrogen, /datum/gas/freon) + removed.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/nitrogen) //calculating gas related values combined_gas = max(removed.total_moles(), 0) @@ -294,16 +292,15 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide][MOLES]/combined_gas, 0) n2comp = max(removed.gases[/datum/gas/nitrogen][MOLES]/combined_gas, 0) - freoncomp = max(removed.gases[/datum/gas/freon][MOLES]/combined_gas, 0) - gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp - freoncomp, 0), 1) + gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp, 0), 1) dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY)+(o2comp * OXYGEN_HEAT_PENALTY)+(co2comp * CO2_HEAT_PENALTY)+(n2comp * NITROGEN_HEAT_MODIFIER), 0.5) dynamic_heat_resistance = max(n2ocomp * N2O_HEAT_RESISTANCE, 1) power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER), 0) - freon_transmit_modifier = max(1-(freoncomp * FREON_TRANSMIT_PENALTY), 0) + //more moles of gases are harder to heat than fewer, so let's scale heat damage around them mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25) @@ -332,7 +329,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload if(prob(50)) - radiation_pulse(src, power * (1 + power_transmission_bonus/10 * freon_transmit_modifier)) + radiation_pulse(src, power * (1 + power_transmission_bonus/10)) var/device_energy = power * REACTION_POWER_MODIFIER @@ -352,9 +349,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) removed.gases[/datum/gas/oxygen][MOLES] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0) - if(combined_gas < 50) - removed.gases[/datum/gas/freon][MOLES] = max((removed.gases[/datum/gas/freon][MOLES] + device_energy) * freoncomp / FREON_BREEDING_MODIFIER, 0) - if(produces_gas) env.merge(removed) air_update_turf() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 0a437f120e..7f764e933e 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1159,6 +1159,34 @@ M.confused = min(M.confused + 2, 5) ..() +/datum/reagent/stimulum + name = "Stimulum" + id = "stimulum" + description = "An unstable experimental gas that greatly increases the energy of those that inhale it" + reagent_state = GAS + metabolization_rate = 1.5 * REAGENTS_METABOLISM + color = "E1A116" + taste_description = "sourness" + +/datum/reagent/stimulum/on_mob_life(mob/living/M) // Has a speedup, and the anti-stun effects of nicotine. + M.status_flags |= GOTTAGOFAST + M.AdjustStun(-20, 0) + M.AdjustKnockdown(-20, 0) + M.AdjustUnconscious(-20, 0) + M.adjustStaminaLoss(-0.5*REM, 0) + +/datum/reagent/browngas + name = "Brown gas" + id = "brown_gas" + description = "A strange brown gas that makes you feel faster" + reagent_state = GAS + metabolization_rate = REAGENTS_METABOLISM + color = "90560B" + taste_description = "burning" + +/datum/reagent/browngas/on_mob_life(mob/living/M) //Has just a speedup + M.status_flags |= GOTTAGOFAST + /////////////////////////Coloured Crayon Powder//////////////////////////// //For colouring in /proc/mix_color_from_reagents diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 62e5fd723d..27bf596df0 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -243,7 +243,7 @@ if(holder && holder.my_atom) var/turf/open/T = get_turf(holder.my_atom) if(istype(T)) - T.atmos_spawn_air("freon=50;TEMP=120") + T.atmos_spawn_air("nitrogen=50;TEMP=2.7") /datum/chemical_reaction/slime/slimefireproof name = "Slime Fireproof" diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index eb1be67af2..7fd1b9bf6d 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -95,10 +95,10 @@ var/list/breath_gases = breath.gases - breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen) + breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen, /datum/gas/tritium, /datum/gas/brown_gas, /datum/gas/pluoxium, /datum/gas/stimulum) //Partial pressures in our breath - var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES]) + var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium][MOLES])) var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen][MOLES]) var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES]) var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES]) @@ -252,9 +252,40 @@ H.adjustBrainLoss(3) else if(bz_pp > 0.01) H.hallucination += 5//Removed at 2 per tick so this will slowly build up + + + // Tritium + var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium][MOLES]) + if (trit_pp > 50) + H.radiation += trit_pp/2 //If you're breathing in half an atmosphere of radioactive gas, you fucked up. + else + H.radiation += trit_pp/10 + + //Brown Gas + var/brown_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/brown_gas][MOLES]) + if (prob(brown_pp)) + to_chat(H, "Your mouth feels like it's burning!") + if (brown_pp >40) + H.emote("gasp") + H.adjustFireLoss(10) + if (prob(brown_pp/2)) + to_chat(H, "Your throat closes up!") + H.silent = max(H.silent, 3) + else + H.adjustFireLoss(brown_pp/4) + gas_breathed = breath_gases[/datum/gas/brown_gas][MOLES] + if (gas_breathed > GAS_STIM_MINIMUM) + H.reagents.add_reagent("brown_gas",1) + + breath_gases[/datum/gas/brown_gas][MOLES]-=gas_breathed + gas_breathed = 0 + //Stimulum + gas_breathed = breath_gases[/datum/gas/stimulum][MOLES] + if (gas_breathed > GAS_STIM_MINIMUM) + H.reagents.add_reagent("stimulum",1) + breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed handle_breath_temperature(breath, H) breath.garbage_collect() - return TRUE diff --git a/icons/effects/tile_effects.dmi b/icons/effects/tile_effects.dmi index 0bd03133ea129e9001c1543934cd92fca59c57b3..8111fef6dbea5c4fe0221f7b913148c16662afdd 100644 GIT binary patch literal 4199 zcmaJ_c{tSH_kS}OBgT?!5n?deK4cqWkbNS?5;75GC|hQRPu4-wVv9kRL0PA4SrS4h zvhUfG%8;>?P)x&j`uzU?{c-QP&pG!juh(y73>>?_YDjHfPeGIgZ7U7~`?zWwbH}vLC7$XQ z-?J3Q#VPOy4iv&RTn0G{+uY_#GFm~ zAY=8m=F#36sSI+n&Vh)WL-8ToL~+pFBgoxoV`+UVSE)E3@47`8ERt*CDPDB|Td#fS)N zKl;61`SXx3Q03!px5&?#Uh~oL9xVgLVgDhr{a|TGpZ2`!h_-kXT=x12&x>H3bEOj_ zps~NLVBBVkzzCsjViRdET$swv697qq=a$AQLo0RLNGpEH{SqV!3lzsLjFMz- zJk!6>O<1YTJ~lNVGbm7$`a}l2a=5vHlvuGT%Uuz%^fW8i=_5JadS9*t-h{fSH@IA4$mbSI9 zOP>sDXy5wd6-0DJ55iI0EN${J#`k>^T}$!Yh|D>mp+Bs~JeJh3R;@I`y%+K^Dv|-h zd@G?zH3(>&{?A03-RT}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TnV(?Z%QVJjZG%%)UB}6J8 zIE9*09uvoqrSIzVfThr$@YTvJ1Q32`y|8z~NS;5HK6?xD;q(Eo=Hqs2s=4dDySd1t zbI!pc?b=eCPkHfCvGI)O?@UAwlfV+Eu==*Rxkx0g=ZDh=)S^v7#-U}*fJgBl1Oftv z6wL!l@6RJDvp-RrpQkx@2n|Tc;Yl)!JRqnS97+Oga#)JlYe2~}Cty0!8c>TbSEKOl zQxFrS0ZS!(T|&;)d|F- zHk-}Q+wJy#&b|-@15uy>fhb9XkhvX*(Lza+r;Vfnc=5nRAG(GyNFyoGec%1hzA+#T zqk!#pdw;!NOAkW?_<%r^YBb%H6cri}IlTP^8W4!W)_@u` z#T<9K05{NpKonydrfu6tZQGs>62$;qk}@@9G{M+YR|lbc^Ky>C*0+i%7|e^5IY;<_ zikO4ON)1YJKon>|APO`f5CuWVo^$WsJ<jf5Cu{2o})er1|TQF0ti0~qy!qUaN2O Plasma - BZ - Freon + Rare Gases Water Vapor diff --git a/tgui/src/interfaces/atmos_filter.ract b/tgui/src/interfaces/atmos_filter.ract index bb48a78891..f8b62f3908 100644 --- a/tgui/src/interfaces/atmos_filter.ract +++ b/tgui/src/interfaces/atmos_filter.ract @@ -23,8 +23,16 @@ action='filter' params='{"mode": "/datum/gas/nitrous_oxide"}'>N2O BZ - Freon + Hyper-Noblium + Brown Gas + Tritium + Stimulum + Pluoxium Water Vapor