mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
Assmos part 1, #2
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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" = (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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, "<span class='alert'>Your mouth feels like it's burning!</span>")
|
||||
if (brown_pp >40)
|
||||
H.emote("gasp")
|
||||
H.adjustFireLoss(10)
|
||||
if (prob(brown_pp/2))
|
||||
to_chat(H, "<span class='alert'>Your throat closes up!</span>")
|
||||
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
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.1 KiB |
@@ -25,10 +25,8 @@
|
||||
action='n2o_scrub' params='{"id_tag": "{{id_tag}}", "val": {{+!filter_n2o}}}'>N2O</ui-button>
|
||||
<ui-button icon='{{filter_toxins ? "check-square-o" : "square-o"}}' style='{{filter_toxins ? "selected" : null}}'
|
||||
action='tox_scrub' params='{"id_tag": "{{id_tag}}", "val": {{+!filter_toxins}}}'>Plasma</ui-button>
|
||||
<ui-button icon='{{filter_bz ? "check-square-o" : "square-o"}}' style='{{filter_bz ? "selected" : null}}'
|
||||
action='bz_scrub' params='{"id_tag": "{{id_tag}}", "val": {{+!filter_bz}}}'>BZ</ui-button>
|
||||
<ui-button icon='{{filter_freon ? "check-square-o" : "square-o"}}' style='{{filter_freon ? "selected" : null}}'
|
||||
action='freon_scrub' params='{"id_tag": "{{id_tag}}", "val": {{+!filter_freon}}}'>Freon</ui-button>
|
||||
<ui-button icon='{{filter_rare ? "check-square-o" : "square-o"}}' style='{{filter_rare ? "selected" : null}}'
|
||||
action='rare_scrub' params='{"id_tag": "{{id_tag}}", "val": {{+!filter_rare}}}'>Rare Gases</ui-button>
|
||||
<ui-button icon='{{filter_water_vapor ? "check-square-o" : "square-o"}}' style='{{filter_water_vapor ? "selected" : null}}'
|
||||
action='water_vapor_scrub' params='{"id_tag": "{{id_tag}}", "val": {{+!filter_water_vapor}}}'>Water Vapor</ui-button>
|
||||
</ui-section>
|
||||
|
||||
@@ -23,8 +23,16 @@
|
||||
action='filter' params='{"mode": "/datum/gas/nitrous_oxide"}'>N2O</ui-button>
|
||||
<ui-button state='{{data.filter_type == "bz" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/bz"}'>BZ</ui-button>
|
||||
<ui-button state='{{data.filter_type == "freon" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/freon"}'>Freon</ui-button>
|
||||
<ui-button state='{{data.filter_type == "nob" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/hypernoblium"}'>Hyper-Noblium</ui-button>
|
||||
<ui-button state='{{data.filter_type == "browns" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/brown_gas"}'>Brown Gas</ui-button>
|
||||
<ui-button state='{{data.filter_type == "tritium" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/tritium"}'>Tritium</ui-button>
|
||||
<ui-button state='{{data.filter_type == "stimulum" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/stimulum"}'>Stimulum</ui-button>
|
||||
<ui-button state='{{data.filter_type == "pluox" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/pluoxium"}'>Pluoxium</ui-button>
|
||||
<ui-button state='{{data.filter_type == "water_vapor" ? "selected" : null}}'
|
||||
action='filter' params='{"mode": "/datum/gas/water_vapor"}'>Water Vapor</ui-button>
|
||||
</ui-section>
|
||||
|
||||
Reference in New Issue
Block a user