From 43edaedc291da8d5ab41ea195faf8a580e41447e Mon Sep 17 00:00:00 2001 From: as334 Date: Fri, 27 Oct 2017 00:11:56 -0400 Subject: [PATCH] Assmos part 1, #2 (#30791) * First part of Assmos * Adds tritium synthesis and basic in-body effects. * Begins adding the higher tier gases. Removes Freon(not completely yet) adds new gases to scrubers. Fixes some dumb bugs. * Whoops * Adds effects and synthesis reactions for pluoxium and stimulum * Kills Freon. * Adds sprites * Removes the magic numbers * Hyper-Nobelium formation * Removes Freon from maps. * Initial Dunc Review changes * Should ACTUALLY fix the maps this time. * Dunc Final Review * Debugging part 1 * Fixes brown gas synthesis * Auto stash before merge of "assmos-pathconflicts" and "origin/master" * fix compile errors * Moves defines. Fixes stimulum coefficents. * Reworks how Stim and brown gas work, adds tritium to tile fires, fixes a lot of general reaction bugs. * fixes typo * Hopefully fixes UI * compiles tgui * Tritium balance. --- _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/assets/tgui.js | 34 +- tgui/src/interfaces/airalarm/scrubbers.ract | 6 +- tgui/src/interfaces/atmos_filter.ract | 12 +- 27 files changed, 508 insertions(+), 278 deletions(-) diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index f27ae75796b..0457e25c1ab 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -53788,7 +53788,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" = ( @@ -83682,7 +83682,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 6d4a167545c..740d4f5f575 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -57445,7 +57445,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 74ffa974352..4695f9a11be 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -77684,7 +77684,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" = ( @@ -120477,7 +120477,7 @@ aGS axY aJl aKx -deZ +aJu aNo axY aPW diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 1273b5e3de5..87f16da0811 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 1d025a21f35..6795c4d58bf 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 3f5cb9b27f9..d227710b32c 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 94b1b8ee45c..025c05f6d4a 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 9b5ea089c2e..8ddde526a77 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 e8e25fb912d..8296ab56f4e 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 d9389975bba..63b84832afd 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 18f88874e86..d2603208e56 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 04f1068a000..ec1fcdfc525 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 2c468c206d4..70a1bd4ea74 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 @@ -72,9 +71,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 @@ -127,8 +124,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" ) @@ -200,37 +196,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 @@ -305,15 +316,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 99e6cda6af6..cb28f178020 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 38c96a8ec90..0a7f43b383a 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 cd857d19a16..bb203fd6ee9 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 c5b180d8a1f..4269de60694 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 80a7b7a5451..680300b404a 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 914cb6e52f4..73c8345ba7d 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -198,6 +198,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 94c91f0436a..7ce459a712a 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 @@ -292,7 +290,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) @@ -302,16 +300,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) @@ -340,7 +337,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 @@ -360,9 +357,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 b9a2349873c..c93ca30841e 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 62e5fd723de..27bf596df08 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 baff6ac787a..65c1e3e1fbd 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~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var a=t(80),r=t(76),i=t(79);e.exports=[].fill||function(t){for(var e=a(this),n=i(e.length),o=arguments,s=o.length,u=r(s>1?o[1]:void 0,n),p=s>2?o[2]:void 0,c=void 0===p?n:r(p,n);c>u;)e[u++]=t;return e}},{76:76,79:79,80:80}],7:[function(t,e,n){var a=t(78),r=t(79),i=t(76);e.exports=function(t){return function(e,n,o){var s,u=a(e),p=r(u.length),c=i(o,p);if(t&&n!=n){for(;p>c;)if(s=u[c++],s!=s)return!0}else for(;p>c;c++)if((t||c in u)&&u[c]===n)return t||c;return!t&&-1}}},{76:76,78:78,79:79}],8:[function(t,e,n){var a=t(17),r=t(34),i=t(80),o=t(79),s=t(9);e.exports=function(t){var e=1==t,n=2==t,u=3==t,p=4==t,c=6==t,l=5==t||c;return function(f,d,h){for(var m,v,g=i(f),b=r(g),y=a(d,h,3),x=o(b.length),_=0,w=e?s(f,x):n?s(f,0):void 0;x>_;_++)if((l||_ in b)&&(m=b[_],v=y(m,_,g),t))if(e)w[_]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return _;case 2:w.push(m)}else if(p)return!1;return c?-1:u||p?p:w}}},{17:17,34:34,79:79,80:80,9:9}],9:[function(t,e,n){var a=t(38),r=t(36),i=t(83)("species");e.exports=function(t,e){var n;return r(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)||(n=void 0),a(n)&&(n=n[i],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},{36:36,38:38,83:83}],10:[function(t,e,n){var a=t(11),r=t(83)("toStringTag"),i="Arguments"==a(function(){return arguments}());e.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=(e=Object(t))[r])?n:i?a(e):"Object"==(o=a(e))&&"function"==typeof e.callee?"Arguments":o}},{11:11,83:83}],11:[function(t,e,n){var a={}.toString;e.exports=function(t){return a.call(t).slice(8,-1)}},{}],12:[function(t,e,n){"use strict";var a=t(46),r=t(31),i=t(60),o=t(17),s=t(69),u=t(18),p=t(27),c=t(42),l=t(44),f=t(82)("id"),d=t(30),h=t(38),m=t(65),v=t(19),g=Object.isExtensible||h,b=v?"_s":"size",y=0,x=function(t,e){if(!h(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!d(t,f)){if(!g(t))return"F";if(!e)return"E";r(t,f,++y)}return"O"+t[f]},_=function(t,e){var n,a=x(e);if("F"!==a)return t._i[a];for(n=t._f;n;n=n.n)if(n.k==e)return n};e.exports={getConstructor:function(t,e,n,r){var c=t(function(t,i){s(t,c,e),t._i=a.create(null),t._f=void 0,t._l=void 0,t[b]=0,void 0!=i&&p(i,n,t[r],t)});return i(c.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[b]=0},"delete":function(t){var e=this,n=_(e,t);if(n){var a=n.n,r=n.p;delete e._i[n.i],n.r=!0,r&&(r.n=a),a&&(a.p=r),e._f==n&&(e._f=a),e._l==n&&(e._l=r),e[b]--}return!!n},forEach:function(t){for(var e,n=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!_(this,t)}}),v&&a.setDesc(c.prototype,"size",{get:function(){return u(this[b])}}),c},def:function(t,e,n){var a,r,i=_(t,e);return i?i.v=n:(t._l=i={i:r=x(e,!0),k:e,v:n,p:a=t._l,n:void 0,r:!1},t._f||(t._f=i),a&&(a.n=i),t[b]++,"F"!==r&&(t._i[r]=i)),t},getEntry:_,setStrong:function(t,e,n){c(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),m(e)}}},{17:17,18:18,19:19,27:27,30:30,31:31,38:38,42:42,44:44,46:46,60:60,65:65,69:69,82:82}],13:[function(t,e,n){var a=t(27),r=t(10);e.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");var e=[];return a(this,!1,e.push,e),e}}},{10:10,27:27}],14:[function(t,e,n){"use strict";var a=t(31),r=t(60),i=t(4),o=t(38),s=t(69),u=t(27),p=t(8),c=t(30),l=t(82)("weak"),f=Object.isExtensible||o,d=p(5),h=p(6),m=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},b=function(t,e){return d(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=b(this,t);return e?e[1]:void 0},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},e.exports={getConstructor:function(t,e,n,a){var i=t(function(t,r){s(t,i,e),t._i=m++,t._l=void 0,void 0!=r&&u(r,n,t[a],t)});return r(i.prototype,{"delete":function(t){return o(t)?f(t)?c(t,l)&&c(t[l],this._i)&&delete t[l][this._i]:v(this)["delete"](t):!1},has:function(t){return o(t)?f(t)?c(t,l)&&c(t[l],this._i):v(this).has(t):!1}}),i},def:function(t,e,n){return f(i(e))?(c(e,l)||a(e,l,{}),e[l][t._i]=n):v(t).set(e,n),t},frozenStore:v,WEAK:l}},{27:27,30:30,31:31,38:38,4:4,60:60,69:69,8:8,82:82}],15:[function(t,e,n){"use strict";var a=t(29),r=t(22),i=t(61),o=t(60),s=t(27),u=t(69),p=t(38),c=t(24),l=t(43),f=t(66);e.exports=function(t,e,n,d,h,m){var v=a[t],g=v,b=h?"set":"add",y=g&&g.prototype,x={},_=function(t){var e=y[t];i(y,t,"delete"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"has"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!p(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof g&&(m||y.forEach&&!c(function(){(new g).entries().next()}))){var w,k=new g,E=k[b](m?{}:-0,1)!=k,S=c(function(){k.has(1)}),C=l(function(t){new g(t)});C||(g=e(function(e,n){u(e,g,t);var a=new v;return void 0!=n&&s(n,h,a[b],a),a}),g.prototype=y,y.constructor=g),m||k.forEach(function(t,e){w=1/e===-(1/0)}),(S||w)&&(_("delete"),_("has"),h&&_("get")),(w||E)&&_(b),m&&y.clear&&delete y.clear}else g=d.getConstructor(e,t,h,b),o(g.prototype,n);return f(g,t),x[t]=g,r(r.G+r.W+r.F*(g!=v),x),m||d.setStrong(g,t,h),g}},{22:22,24:24,27:27,29:29,38:38,43:43,60:60,61:61,66:66,69:69}],16:[function(t,e,n){var a=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=a)},{}],17:[function(t,e,n){var a=t(2);e.exports=function(t,e,n){if(a(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,a){return t.call(e,n,a)};case 3:return function(n,a,r){return t.call(e,n,a,r)}}return function(){return t.apply(e,arguments)}}},{2:2}],18:[function(t,e,n){e.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],19:[function(t,e,n){e.exports=!t(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{24:24}],20:[function(t,e,n){var a=t(38),r=t(29).document,i=a(r)&&a(r.createElement);e.exports=function(t){return i?r.createElement(t):{}}},{29:29,38:38}],21:[function(t,e,n){var a=t(46);e.exports=function(t){var e=a.getKeys(t),n=a.getSymbols;if(n)for(var r,i=n(t),o=a.isEnum,s=0;i.length>s;)o.call(t,r=i[s++])&&e.push(r);return e}},{46:46}],22:[function(t,e,n){var a=t(29),r=t(16),i=t(31),o=t(61),s=t(17),u="prototype",p=function(t,e,n){var c,l,f,d,h=t&p.F,m=t&p.G,v=t&p.S,g=t&p.P,b=t&p.B,y=m?a:v?a[e]||(a[e]={}):(a[e]||{})[u],x=m?r:r[e]||(r[e]={}),_=x[u]||(x[u]={});m&&(n=e);for(c in n)l=!h&&y&&c in y,f=(l?y:n)[c],d=b&&l?s(f,a):g&&"function"==typeof f?s(Function.call,f):f,y&&!l&&o(y,c,f),x[c]!=f&&i(x,c,d),g&&_[c]!=f&&(_[c]=f)};a.core=r,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,e.exports=p},{16:16,17:17,29:29,31:31,61:61}],23:[function(t,e,n){var a=t(83)("match");e.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[a]=!1,!"/./"[t](e)}catch(r){}}return!0}},{83:83}],24:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],25:[function(t,e,n){"use strict";var a=t(31),r=t(61),i=t(24),o=t(18),s=t(83);e.exports=function(t,e,n){var u=s(t),p=""[t];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(r(String.prototype,t,n(o,u,p)),a(RegExp.prototype,u,2==e?function(t,e){return p.call(t,this,e)}:function(t){return p.call(t,this)}))}},{18:18,24:24,31:31,61:61,83:83}],26:[function(t,e,n){"use strict";var a=t(4);e.exports=function(){var t=a(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},{4:4}],27:[function(t,e,n){var a=t(17),r=t(40),i=t(35),o=t(4),s=t(79),u=t(84);e.exports=function(t,e,n,p){var c,l,f,d=u(t),h=a(n,p,e?2:1),m=0;if("function"!=typeof d)throw TypeError(t+" is not iterable!");if(i(d))for(c=s(t.length);c>m;m++)e?h(o(l=t[m])[0],l[1]):h(t[m]);else for(f=d.call(t);!(l=f.next()).done;)r(f,h,l.value,e)}},{17:17,35:35,4:4,40:40,79:79,84:84}],28:[function(t,e,n){var a=t(78),r=t(46).getNames,i={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(e){return o.slice()}};e.exports.get=function(t){return o&&"[object Window]"==i.call(t)?s(t):r(a(t))}},{46:46,78:78}],29:[function(t,e,n){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},{}],30:[function(t,e,n){var a={}.hasOwnProperty;e.exports=function(t,e){return a.call(t,e)}},{}],31:[function(t,e,n){var a=t(46),r=t(59);e.exports=t(19)?function(t,e,n){return a.setDesc(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},{19:19,46:46,59:59}],32:[function(t,e,n){e.exports=t(29).document&&document.documentElement},{29:29}],33:[function(t,e,n){e.exports=function(t,e,n){var a=void 0===n;switch(e.length){case 0:return a?t():t.call(n);case 1:return a?t(e[0]):t.call(n,e[0]);case 2:return a?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return a?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return a?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],34:[function(t,e,n){var a=t(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},{11:11}],35:[function(t,e,n){var a=t(45),r=t(83)("iterator"),i=Array.prototype;e.exports=function(t){return void 0!==t&&(a.Array===t||i[r]===t)}},{45:45,83:83}],36:[function(t,e,n){var a=t(11);e.exports=Array.isArray||function(t){return"Array"==a(t)}},{11:11}],37:[function(t,e,n){var a=t(38),r=Math.floor;e.exports=function(t){return!a(t)&&isFinite(t)&&r(t)===t}},{38:38}],38:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],39:[function(t,e,n){var a=t(38),r=t(11),i=t(83)("match");e.exports=function(t){var e;return a(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==r(t))}},{11:11,38:38,83:83}],40:[function(t,e,n){var a=t(4);e.exports=function(t,e,n,r){try{return r?e(a(n)[0],n[1]):e(n)}catch(i){var o=t["return"];throw void 0!==o&&a(o.call(t)),i}}},{4:4}],41:[function(t,e,n){"use strict";var a=t(46),r=t(59),i=t(66),o={};t(31)(o,t(83)("iterator"),function(){return this}),e.exports=function(t,e,n){t.prototype=a.create(o,{next:r(1,n)}),i(t,e+" Iterator")}},{31:31,46:46,59:59,66:66,83:83}],42:[function(t,e,n){"use strict";var a=t(48),r=t(22),i=t(61),o=t(31),s=t(30),u=t(45),p=t(41),c=t(66),l=t(46).getProto,f=t(83)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){return this};e.exports=function(t,e,n,b,y,x,_){p(n,e,b);var w,k,E=function(t){if(!d&&t in A)return A[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",C=y==v,P=!1,A=t.prototype,O=A[f]||A[h]||y&&A[y],T=O||E(y);if(O){var R=l(T.call(new t));c(R,S,!0),!a&&s(A,h)&&o(R,f,g),C&&O.name!==v&&(P=!0,T=function(){return O.call(this)})}if(a&&!_||!d&&!P&&A[f]||o(A,f,T),u[e]=T,u[S]=g,y)if(w={values:C?T:E(v),keys:x?T:E(m),entries:C?E("entries"):T},_)for(k in w)k in A||i(A,k,w[k]);else r(r.P+r.F*(d||P),e,w);return w}},{22:22,30:30,31:31,41:41,45:45,46:46,48:48,61:61,66:66,83:83}],43:[function(t,e,n){var a=t(83)("iterator"),r=!1;try{var i=[7][a]();i["return"]=function(){r=!0},Array.from(i,function(){throw 2})}catch(o){}e.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var i=[7],o=i[a]();o.next=function(){return{done:n=!0}},i[a]=function(){return o},t(i)}catch(s){}return n}},{83:83}],44:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],45:[function(t,e,n){e.exports={}},{}],46:[function(t,e,n){var a=Object;e.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},{}],47:[function(t,e,n){var a=t(46),r=t(78);e.exports=function(t,e){for(var n,i=r(t),o=a.getKeys(i),s=o.length,u=0;s>u;)if(i[n=o[u++]]===e)return n}},{46:46,78:78}],48:[function(t,e,n){e.exports=!1},{}],49:[function(t,e,n){e.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}},{}],50:[function(t,e,n){e.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},{}],51:[function(t,e,n){e.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},{}],52:[function(t,e,n){var a,r,i,o=t(29),s=t(75).set,u=o.MutationObserver||o.WebKitMutationObserver,p=o.process,c=o.Promise,l="process"==t(11)(p),f=function(){var t,e,n;for(l&&(t=p.domain)&&(p.domain=null,t.exit());a;)e=a.domain,n=a.fn,e&&e.enter(),n(),e&&e.exit(),a=a.next;r=void 0,t&&t.enter()};if(l)i=function(){p.nextTick(f)};else if(u){var d=1,h=document.createTextNode("");new u(f).observe(h,{characterData:!0}),i=function(){h.data=d=-d}}else i=c&&c.resolve?function(){c.resolve().then(f)}:function(){s.call(o,f)};e.exports=function(t){var e={fn:t,next:void 0,domain:l&&p.domain};r&&(r.next=e),a||(a=e,i()),r=e}},{11:11,29:29,75:75}],53:[function(t,e,n){var a=t(46),r=t(80),i=t(34);e.exports=t(24)(function(){var t=Object.assign,e={},n={},a=Symbol(),r="abcdefghijklmnopqrst";return e[a]=7,r.split("").forEach(function(t){n[t]=t}),7!=t({},e)[a]||Object.keys(t({},n)).join("")!=r})?function(t,e){for(var n=r(t),o=arguments,s=o.length,u=1,p=a.getKeys,c=a.getSymbols,l=a.isEnum;s>u;)for(var f,d=i(o[u++]),h=c?p(d).concat(c(d)):p(d),m=h.length,v=0;m>v;)l.call(d,f=h[v++])&&(n[f]=d[f]);return n}:Object.assign},{24:24,34:34,46:46,80:80}],54:[function(t,e,n){var a=t(22),r=t(16),i=t(24);e.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],o={};o[t]=e(n),a(a.S+a.F*i(function(){n(1)}),"Object",o)}},{16:16,22:22,24:24}],55:[function(t,e,n){var a=t(46),r=t(78),i=a.isEnum;e.exports=function(t){return function(e){for(var n,o=r(e),s=a.getKeys(o),u=s.length,p=0,c=[];u>p;)i.call(o,n=s[p++])&&c.push(t?[n,o[n]]:o[n]);return c}}},{46:46,78:78}],56:[function(t,e,n){var a=t(46),r=t(4),i=t(29).Reflect;e.exports=i&&i.ownKeys||function(t){var e=a.getNames(r(t)),n=a.getSymbols;return n?e.concat(n(t)):e}},{29:29,4:4,46:46}],57:[function(t,e,n){"use strict";var a=t(58),r=t(33),i=t(2);e.exports=function(){for(var t=i(this),e=arguments.length,n=Array(e),o=0,s=a._,u=!1;e>o;)(n[o]=arguments[o++])===s&&(u=!0);return function(){var a,i=this,o=arguments,p=o.length,c=0,l=0;if(!u&&!p)return r(t,n,i);if(a=n.slice(),u)for(;e>c;c++)a[c]===s&&(a[c]=o[l++]);for(;p>l;)a.push(o[l++]);return r(t,a,i)}}},{2:2,33:33,58:58}],58:[function(t,e,n){e.exports=t(29)},{29:29}],59:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],60:[function(t,e,n){var a=t(61);e.exports=function(t,e){for(var n in e)a(t,n,e[n]);return t}},{61:61}],61:[function(t,e,n){var a=t(29),r=t(31),i=t(82)("src"),o="toString",s=Function[o],u=(""+s).split(o);t(16).inspectSource=function(t){return s.call(t)},(e.exports=function(t,e,n,o){"function"==typeof n&&(n.hasOwnProperty(i)||r(n,i,t[e]?""+t[e]:u.join(e+"")),n.hasOwnProperty("name")||r(n,"name",e)),t===a?t[e]=n:(o||delete t[e],r(t,e,n))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||s.call(this)})},{16:16,29:29,31:31,82:82}],62:[function(t,e,n){e.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return(e+"").replace(t,n)}}},{}],63:[function(t,e,n){e.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},{}],64:[function(t,e,n){var a=t(46).getDesc,r=t(38),i=t(4),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{r=t(17)(Function.call,a(Object.prototype,"__proto__").set,2),r(e,[]),n=!(e instanceof Array)}catch(i){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},{17:17,38:38,4:4,46:46}],65:[function(t,e,n){"use strict";var a=t(29),r=t(46),i=t(19),o=t(83)("species");e.exports=function(t){var e=a[t];i&&e&&!e[o]&&r.setDesc(e,o,{configurable:!0,get:function(){return this}})}},{19:19,29:29,46:46,83:83}],66:[function(t,e,n){var a=t(46).setDesc,r=t(30),i=t(83)("toStringTag");e.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&a(t,i,{configurable:!0,value:e})}},{30:30,46:46,83:83}],67:[function(t,e,n){var a=t(29),r="__core-js_shared__",i=a[r]||(a[r]={});e.exports=function(t){return i[t]||(i[t]={})}},{29:29}],68:[function(t,e,n){var a=t(4),r=t(2),i=t(83)("species");e.exports=function(t,e){var n,o=a(t).constructor;return void 0===o||void 0==(n=a(o)[i])?e:r(n)}},{2:2,4:4,83:83}],69:[function(t,e,n){e.exports=function(t,e,n){if(!(t instanceof e))throw TypeError(n+": use the 'new' operator!");return t}},{}],70:[function(t,e,n){var a=t(77),r=t(18);e.exports=function(t){return function(e,n){var i,o,s=r(e)+"",u=a(n),p=s.length;return 0>u||u>=p?t?"":void 0:(i=s.charCodeAt(u),55296>i||i>56319||u+1===p||(o=s.charCodeAt(u+1))<56320||o>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(o-56320)+65536)}}},{18:18,77:77}],71:[function(t,e,n){var a=t(39),r=t(18);e.exports=function(t,e,n){if(a(e))throw TypeError("String#"+n+" doesn't accept regex!");return r(t)+""}},{18:18,39:39}],72:[function(t,e,n){var a=t(79),r=t(73),i=t(18);e.exports=function(t,e,n,o){var s=i(t)+"",u=s.length,p=void 0===n?" ":n+"",c=a(e);if(u>=c)return s;""==p&&(p=" ");var l=c-u,f=r.call(p,Math.ceil(l/p.length));return f.length>l&&(f=f.slice(0,l)),o?f+s:s+f}},{18:18,73:73,79:79}],73:[function(t,e,n){"use strict";var a=t(77),r=t(18);e.exports=function(t){var e=r(this)+"",n="",i=a(t);if(0>i||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},{18:18,77:77}],74:[function(t,e,n){var a=t(22),r=t(18),i=t(24),o=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",s="["+o+"]",u="​…",p=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(t,e){var n={};n[t]=e(f),a(a.P+a.F*i(function(){return!!o[t]()||u[t]()!=u}),"String",n)},f=l.trim=function(t,e){return t=r(t)+"",1&e&&(t=t.replace(p,"")),2&e&&(t=t.replace(c,"")),t};e.exports=l},{18:18,22:22,24:24}],75:[function(t,e,n){var a,r,i,o=t(17),s=t(33),u=t(32),p=t(20),c=t(29),l=c.process,f=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,m=0,v={},g="onreadystatechange",b=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},y=function(t){b.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++m]=function(){s("function"==typeof t?t:Function(t),e)},a(m),m},d=function(t){delete v[t]},"process"==t(11)(l)?a=function(t){l.nextTick(o(b,t,1))}:h?(r=new h,i=r.port2,r.port1.onmessage=y,a=o(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(a=function(t){c.postMessage(t+"","*")},c.addEventListener("message",y,!1)):a=g in p("script")?function(t){u.appendChild(p("script"))[g]=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(o(b,t,1),0)}),e.exports={set:f,clear:d}},{11:11,17:17,20:20,29:29,32:32,33:33}],76:[function(t,e,n){var a=t(77),r=Math.max,i=Math.min;e.exports=function(t,e){return t=a(t),0>t?r(t+e,0):i(t,e)}},{77:77}],77:[function(t,e,n){var a=Math.ceil,r=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?r:a)(t)}},{}],78:[function(t,e,n){var a=t(34),r=t(18);e.exports=function(t){return a(r(t))}},{18:18,34:34}],79:[function(t,e,n){var a=t(77),r=Math.min;e.exports=function(t){return t>0?r(a(t),9007199254740991):0}},{77:77}],80:[function(t,e,n){var a=t(18);e.exports=function(t){return Object(a(t))}},{18:18}],81:[function(t,e,n){var a=t(38);e.exports=function(t,e){if(!a(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!a(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},{38:38}],82:[function(t,e,n){var a=0,r=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++a+r).toString(36))}},{}],83:[function(t,e,n){var a=t(67)("wks"),r=t(82),i=t(29).Symbol;e.exports=function(t){return a[t]||(a[t]=i&&i[t]||(i||r)("Symbol."+t))}},{29:29,67:67,82:82}],84:[function(t,e,n){var a=t(10),r=t(83)("iterator"),i=t(45);e.exports=t(16).getIteratorMethod=function(t){return void 0!=t?t[r]||t["@@iterator"]||i[a(t)]:void 0}},{10:10,16:16,45:45,83:83}],85:[function(t,e,n){"use strict";var a,r=t(46),i=t(22),o=t(19),s=t(59),u=t(32),p=t(20),c=t(30),l=t(11),f=t(33),d=t(24),h=t(4),m=t(2),v=t(38),g=t(80),b=t(78),y=t(77),x=t(76),_=t(79),w=t(34),k=t(82)("__proto__"),E=t(8),S=t(7)(!1),C=Object.prototype,P=Array.prototype,A=P.slice,O=P.join,T=r.setDesc,R=r.getDesc,j=r.setDescs,M={};o||(a=!d(function(){return 7!=T(p("div"),"a",{get:function(){return 7}}).a}),r.setDesc=function(t,e,n){if(a)try{return T(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(h(t)[e]=n.value),t},r.getDesc=function(t,e){if(a)try{return R(t,e)}catch(n){}return c(t,e)?s(!C.propertyIsEnumerable.call(t,e),t[e]):void 0},r.setDescs=j=function(t,e){h(t);for(var n,a=r.getKeys(e),i=a.length,o=0;i>o;)r.setDesc(t,n=a[o++],e[n]);return t}),i(i.S+i.F*!o,"Object",{getOwnPropertyDescriptor:r.getDesc,defineProperty:r.setDesc,defineProperties:j});var L="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),D=L.concat("length","prototype"),N=L.length,F=function(){var t,e=p("iframe"),n=N,a=">";for(e.style.display="none",u.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("