2023-02-24 21:04:47 -05:00
var modName = "mods/ochem_prerelease.js" ;
var fireMod = "mods/fire_mod.js" ;
2023-02-24 21:40:00 -05:00
var changeTempMod = "mods/changeTempReactionParameter.js" ;
2023-02-24 21:04:47 -05:00
2023-02-24 21:40:00 -05:00
if ( enabledMods . includes ( fireMod ) && enabledMods . includes ( changeTempMod ) ) {
2023-02-24 21:04:47 -05:00
/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \
# TODO : Pentyl line physical properties #
\ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * /
//Most hydrocarbons are fantastically colored for convenience
//Benzene ring
//Benzene is actually yellowish
//For combinations, it will represent a + shift in hue
//Isomerism
//Isomers like isobutane have slightly increased hue and sat
//Cis- isomers are darkened and trans- isomers are lightened
//Chain length
//Methyl line is purple
//plus benzene = pink
//Ethyl line is rose
//plus benzene = red
//Propyl line is green
//plus benzene = mint
//Butyl line is cyan
//plus benzene = blue
//Pentyl line is vermillion
//plus benzene = orange
//Bond type
//Alkanes are lightest
//Alkenes are darker
//Alkynes are darkest
//Benzene is non-ternary with respect to single vs double bond
//Benzene
elements . benzene = {
color : "#edf099" ,
behavior : behaviors . LIQUID ,
state : "liquid" ,
category : "liquids" ,
density : 876 ,
burn : 80 ,
burnTime : 20 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "dirty_water" , "dirty_water" ] ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
tempLow : 5.53 ,
tempHigh : 80.1 ,
} ;
elements . benzene _gas = {
density : 2.77 * airDensity ,
} ;
elements . benzene _ice = {
density : 1012 ,
} ;
//Alk*nes and their substituted benzenes
//Single carbon line
//Lowest bond order
//1 carbon = purple
elements . methane . color = "#bfabc9" ;
elements . liquid _methane ? ? = { } ;
elements . liquid _methane . density = 423 ;
//Methene and methyne don't make sense
//Benzene ver.
elements . toluene = {
//meth- purple + benzene hue up = pink
//liquid initial = more vivid
color : "#de76cf" ,
behavior : behaviors . LIQUID ,
state : "liquid" ,
category : "liquids" ,
density : 862 ,
burn : 80 ,
burnTime : 20 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" , "steam" ] ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.001 } , //unknown/unclassifiable carcinogenicity
"body" : { elem2 : "cancer" , chance : 0.001 } ,
} ,
tempHigh : 110.6 ,
tempLow : - 95 ,
} ;
elements . toluene _gas = {
density : 3.1 * airDensity ,
} ;
//Double carbon line
//Lowest bond order
//Rose
elements . ethane = {
color : "#cfa3bb" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 872 , //artifically raised by 400 degrees to prevent interference with ethylbenzene dehydrogenation
stateHigh : "fire" ,
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.00015 } ,
"body" : { elem2 : "rotten_meat" , chance : 0.00015 } ,
} ,
tempLow : - 88.5 ,
burn : 85 ,
burnTime : 5 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" ] ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 1.3562 , //absolute density
} ;
elements . liquid _ethane = {
tempLow : - 182.8 ,
density : 544 ,
} ;
//Double bonds
//ethylene = ethene
elements . ethylene = {
color : "#c991b0" ,
behavior : behaviors . GAS ,
state : "gas" ,
category : "gases" ,
tempHigh : 425 ,
stateHigh : "fire" ,
density : 1.18 ,
burn : 80 ,
burnTime : 20 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" ] ,
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.0001 } , //no mechanism for prolonged exposure causing harm
"body" : { elem2 : "rotten_meat" , chance : 0.0001 } ,
"benzene_gas" : { tempMin : 220 , elem1 : null , elem2 : "ethylbenzene_gas" } ,
} ,
tempLow : - 103.7
} ;
elements . liquid _ethylene = {
tempLow : - 169.2 ,
density : 577 , //unknown solid density
} ;
//Triple bonds
//acetylene = ethyne
elements . acetylene = {
color : "#b8819f" ,
behavior : behaviors . GAS ,
state : "gas" ,
category : "gases" ,
reactions : {
oxygen : { elem1 : [ "acetylene" , "oxy_fuel" ] , elem2 : null } ,
} ,
tick : function ( pixel ) { //tick-based autoignition point to trigger acetylene fire properties
if ( pixel . temp > 325 && ! pixel . burning ) {
pixel . burning = true ;
} ;
} ,
density : 1.1772 , //absolute
burn : 100 ,
burnTime : 10 ,
burnTempChange : 20 ,
fireSpawnTemp : 2700 , //overheat by 500 degrees to compensate for natural cooling effects
fireSpawnChance : 5 , //reduce own flame to reduce said effects from smoke
fireColor : "#5da8fc" ,
burnInto : [ "fire" , "plasma" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" ] ,
tempLow : - 84 ,
stateLow : "acetylene_ice" ,
} ;
elements . acetylene _ice = {
color : "#ffa8d8" ,
2023-02-24 21:38:21 -05:00
behavior : behaviors . POWDER ,
2023-02-24 21:04:47 -05:00
state : "solid" ,
category : "states" ,
2023-02-24 21:38:21 -05:00
reactions : {
liquid _oxygen : { elem1 : [ "acetylene_ice" , "oxy_fuel_slush" ] , elem2 : null , changeTemp : false } ,
oxygen _ice : { elem1 : [ "acetylene_ice" , "oxy_fuel_snow" ] , elem2 : null , changeTemp : false } ,
} ,
2023-02-24 21:04:47 -05:00
tick : function ( pixel ) {
if ( pixel . temp > 325 && ! pixel . burning ) {
pixel . burning = true ;
} ;
} ,
density : 720 ,
burn : 25 , //cold
burnTime : 5 ,
burnTempChange : 20 ,
fireSpawnTemp : 2700 ,
fireSpawnChance : 5 ,
fireColor : "#5da8fc" ,
burnInto : [ "fire" , "plasma" , "fire" , "fire" , "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" ] ,
"temp" : - 100 ,
"tempHigh" : - 84 ,
"stateHigh" : "acetylene" ,
hidden : true ,
} ;
//Benzene ver.
elements . ethylbenzene = {
color : "#de7676" ,
//ethene's rose plus benzene's yellow = red
behavior : behaviors . LIQUID ,
state : "liquid" ,
category : "liquids" ,
density : 867 ,
burn : 75 ,
burnTime : 25 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" , "steam" , "steam" ] ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
tempHigh : 136 ,
tempLow : - 95 ,
} ;
elements . ethylbenzene _gas = {
density : 3.7 * airDensity ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
"steam" : { tempMin : 600 , elem1 : [ "styrene" , "hydrogen" , "styrene" , "hydrogen" , "styrene" , "hydrogen" , "styrene" , "hydrogen" , "styrene" , "hydrogen" , "styrene" , "hydrogen" , "styrene" , "hydrogen" , "styrene" , "hydrogen" , "toluene" , "benzene" , "methane" , "ethane" ] , elem2 : "steam" , temp1 : - 3 , temp2 : - 3 } ,
} ,
} ;
//Triple carbon line
//Single bond
elements . propane . color = "#b8d4a5" ;
elements . propane . tempHigh = 493 ;
//Double bond
elements . propylene = { //propene
color : "#a4c48d" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 458 ,
stateHigh : "fire" ,
tempLow : - 47.6 ,
burn : 100 ,
burnTime : 5 ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 1.745 , //abs. at 25*C
} ;
elements . liquid _propylene = {
tempLow : - 185.2 ,
density : 613.9 ,
} ;
//Triple bond
elements . propyne = { //also methylacetylene
color : "#8bad72" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 340 ,
stateHigh : "fire" ,
tempLow : - 25.15 ,
burn : 85 ,
burnTime : 5 ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 1.6656 , //abs. at 25*C
} ;
elements . liquid _propylene = {
tempLow : - 102.7 ,
density : 671.963 ,
} ;
//Benzene ver.
//more obscure organic compound
elements . propylbenzene = {
color : "#92debd" ,
behavior : behaviors . LIQUID ,
state : "liquid" ,
category : "liquids" ,
density : 862 ,
burn : 75 ,
burnTime : 25 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" , "steam" , "steam" ] ,
reactions : {
//we can probably still assume that it's carcinogenic because it has the phenyl group
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
tempHigh : 159.2 ,
tempLow : - 99.5 ,
} ;
elements . propylbenzene _gas = {
density : 4.14 * airDensity ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
} ;
//Quadruple carbon line
//Single bond
elements . butane = {
color : "#a7dbd9" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 287 ,
stateHigh : "fire" ,
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.00015 } ,
"body" : { elem2 : "rotten_meat" , chance : 0.00015 } ,
} ,
tempLow : 1 ,
burn : 85 ,
burnTime : 5 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" , "steam" , "steam" ] ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 2.076 * airDensity ,
} ;
elements . liquid _butane = {
tempLow : - 134 ,
density : 604 ,
} ;
elements . isobutane = {
color : "#9cbddb" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 460 ,
stateHigh : "fire" ,
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.00015 } ,
"body" : { elem2 : "rotten_meat" , chance : 0.00015 } ,
} ,
tempLow : - 11.7 ,
burn : 85 ,
burnTime : 5 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" , "steam" , "steam" ] ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 2.51 ,
} ;
elements . liquid _isobutane = {
tempLow : - 159.42 ,
density : 563 ,
} ;
//Double bond
elements . butylene = { //butene
name : "1-butylene" ,
color : "#95cfcd" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 385 ,
stateHigh : "fire" ,
tempLow : - 6.47 ,
burn : 100 ,
burnTime : 5 ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 1.93 * airDensity ,
} ;
elements . liquid _butylene = {
tempLow : - 185.3 ,
density : 625.63 ,
} ;
elements . trans _2 _butylene = {
name : "t-butylene-2" ,
color : "#a1c9d4" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 324 ,
stateHigh : "fire" ,
tempLow : 0.8 ,
burn : 85 ,
burnTime : 5 ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 2 * airDensity ,
} ;
elements . liquid _trans _2 _butylene = {
tempLow : - 105.5 ,
density : 626 ,
} ;
elements . cis _2 _butylene = {
name : "c-butylene-2" ,
color : "#8cbcca" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 324 ,
stateHigh : "fire" ,
tempLow : 3.7 ,
burn : 85 ,
burnTime : 5 ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 2 * airDensity ,
} ;
elements . liquid _cis _2 _butylene = {
tempLow : - 138.9 ,
density : 641 ,
} ;
//Triple bond
elements . butyne = {
color : "#81a2b3" ,
behavior : behaviors . GAS ,
category : "gases" ,
tempHigh : 444 , //Unknown autoignition
stateHigh : "fire" ,
tempLow : 8.08 ,
burn : 100 ,
burnTime : 5 ,
fireColor : [ "#00ffff" , "#00ffdd" ] ,
state : "gas" ,
density : 2.12 * airDensity , //made-up due to also unknown vapor density
} ;
elements . liquid _butyne = {
tempLow : - 125.7 ,
density : 678.3 ,
} ;
//Benzene ver.
elements . butylbenzene = {
color : "#7b8ae0" ,
behavior : behaviors . LIQUID ,
state : "liquid" ,
category : "liquids" ,
density : 860.1 ,
burn : 75 ,
burnTime : 25 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" , "steam" , "steam" ] ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
tempHigh : 183.3 ,
tempLow : - 87.9 ,
} ;
elements . butylbenzene _gas = {
density : 4.6 * airDensity ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
} ;
elements . cumene = {
color : "#8873e6" ,
behavior : behaviors . LIQUID ,
state : "liquid" ,
category : "liquids" ,
density : 862 ,
burn : 75 ,
density : 0.777 ,
burnTime : 25 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" ] ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
tempHigh : 152 ,
tempLow : - 96 ,
} ;
elements . cumene _gas = {
density : 4.1 * airDensity ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
} ,
} ;
//Quintuple carbon line
//Other organic compounds
//Oxygen plus acetylene mixture
elements . oxy _fuel = {
color : "#ff5eb4" ,
behavior : behaviors . GAS ,
state : "gas" ,
category : "gases" ,
tick : function ( pixel ) { //tick-based autoignition point to trigger acetylene fire properties
if ( pixel . temp > 325 && ! pixel . burning ) {
pixel . burning = true ;
} ;
} ,
density : 1.25 ,
burn : 100 ,
burnTime : 10 ,
burnTempChange : 330 ,
fireSpawnTemp : 3100 ,
fireSpawnChance : 5 , //reduce own flame to reduce said effects from smoke
fireElement : [ "fire" , "plasma" ] ,
fireColor : "#5e91ff" ,
burnInto : [ "fire" , "plasma" ] ,
tempLow : - 84 ,
stateLow : [ "oxygen" , "oxygen" , "acetylene_ice" ] ,
hidden : true ,
} ;
2023-02-24 21:38:21 -05:00
elements . oxy _fuel _slush = {
color : "#d85fed" ,
behavior : behaviors . LIQUID ,
viscosity : 100 ,
state : "liquid" ,
category : "liquids" ,
tick : function ( pixel ) { //tick-based autoignition point to trigger acetylene fire properties
if ( pixel . temp > 325 && ! pixel . burning ) {
pixel . burning = true ;
} ;
} ,
density : 873 , //made-up
burn : 100 ,
burnTime : 10 ,
burnTempChange : 330 ,
fireSpawnTemp : 3100 ,
fireSpawnChance : 5 , //reduce own flame to reduce said effects from smoke
fireElement : [ "oxy_fuel" , "fire" , "plasma" ] ,
fireColor : "#5e91ff" ,
burnInto : "oxy_fuel" ,
temp : - 200 ,
tempLow : - 218.8 ,
stateLow : "oxy_fuel_snow" ,
tempHigh : - 183.94 ,
stateHigh : [ "oxygen" , "oxygen" , "acetylene_ice" ] ,
hidden : true ,
} ;
elements . oxy _fuel _snow = {
color : "#dd9afc" ,
behavior : behaviors . POWDER ,
state : "solid" ,
category : "powders" ,
tick : function ( pixel ) { //tick-based autoignition point to trigger acetylene fire properties
if ( pixel . temp > 325 && ! pixel . burning ) {
pixel . burning = true ;
} ;
} ,
density : 912 , //made-up
burn : 100 ,
temp : - 250 ,
burnTime : 10 ,
burnTempChange : 330 ,
fireSpawnTemp : 3100 ,
fireSpawnChance : 5 , //reduce own flame to reduce said effects from smoke
fireElement : [ "fire" , "plasma" ] ,
fireColor : "#5e91ff" ,
burnInto : "oxy_fuel" ,
tempHigh : - 218.8 ,
stateHigh : "oxy_fuel_slush" ,
hidden : true ,
} ;
2023-02-24 21:04:47 -05:00
//Styrene and its polymer
elements . styrene = {
color : "#d9d6c3" ,
behavior : behaviors . LIQUID ,
state : "liquid" ,
category : "liquids" ,
density : 909 ,
burn : 80 ,
burnTime : 25 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "steam" ] ,
reactions : {
"head" : { elem2 : "cancer" , chance : 0.0017 } ,
"body" : { elem2 : "cancer" , chance : 0.0017 } ,
"hydrogen" : { elem1 : "ethylbenzene" , elem2 : null , chance : 0.005 } ,
"benzoyl_peroxide" : { elem1 : "polystyrene" , elem2 : "benzoic_acid" } ,
"polystyrene" : { elem1 : "polystyrene" } ,
"molten_polystyrene" : { elem1 : "polystyrene" } ,
} ,
tempLow : - 30 ,
tempHigh : 145 ,
} ;
elements . styrene _gas = {
density : 3.6 * airDensity ,
} ;
elements . polystyrene = {
color : "#f5f5f5" ,
behavior : behaviors . WALL ,
state : "solid" ,
category : "solids" ,
density : 965 ,
tempHigh : 100 ,
//above this it does thermoplastic things
} ;
elements . molten _polystyrene = {
color : "#e3e3e3" ,
tempLow : 100 ,
behavior : behaviors . LIQUID ,
viscosity : 1000 ,
reactions : {
"foam" : { elem1 : "styrofoam" , elem2 : [ "styrofoam" , "molten_polystyrene" , "molten_polystyrene" , "molten_polystyrene" ] } ,
} ,
} ;
elements . styrofoam = {
color : "#f5f5f5" ,
behavior : behaviors . WALL ,
state : "solid" ,
category : "solids" ,
density : 50 ,
tempHigh : 160 , //reaction grace period
stateHigh : [ null , null , null , "molten_polystyrene" ] ,
} ;
//Benzoyl peroxide
elements . benzoyl _peroxide = {
color : "#ededed" ,
behavior : behaviors . POWDER ,
state : "solid" ,
category : "powders" ,
density : 1.334 ,
tempHigh : 103 ,
stateHigh : [ "benzoic_acid" , "benzoic_acid" , "benzoic_acid" , "fire" , "explosion" ] ,
} ;
//Benzoic acid
elements . benzoic _acid = {
color : "#c9c9c9" ,
behavior : behaviors . POWDER ,
state : "solid" ,
category : "powders" ,
density : 1.2659 ,
tempHigh : 122 ,
} ;
elements . molten _benzoic _acid = {
behavior : behaviors . LIQUID ,
color : "#b5b2b0" ,
tempHigh : 250 ,
density : 1074.9 ,
reactions : {
"molten_copper_sulfate" : { tempMin : 200 , elem1 : [ "phenol" , "phenol" , "carbon_dioxide" ] } , //using air oxygen
} ,
} ;
elements . benzoic _acid _gas = {
density : 4.21 * airDensity ,
reactions : {
"oxygen" : { tempMin : 350 , elem1 : "phenol" , elem2 : "carbon_dioxide" } ,
"molten_copper_sulfate" : { tempMin : 200 , elem1 : [ "phenol" , "phenol" , "carbon_dioxide" ] } ,
} ,
} ;
//Phenol
elements . phenol = {
color : "#dbd3d3" ,
behavior : behaviors . POWDER ,
state : "solid" ,
category : "powders" ,
density : 1070 ,
burn : 40 ,
burnTime : 70 ,
burnInto : [ "fire" , "fire" , "carbon_dioxide" , "carbon_dioxide" , "carbon_dioxide" , "steam" , "steam" , "steam" , "dioxin" ] ,
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.003 } ,
"body" : { elem2 : "rotten_meat" , chance : 0.003 } ,
} ,
tempHigh : 40.5 ,
tempLow : - 95 ,
} ;
elements . molten _phenol = {
color : "#cfc2c2" ,
behavior : behaviors . LIQUID ,
viscosity : 8 ,
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.003 } ,
"body" : { elem2 : "rotten_meat" , chance : 0.003 } ,
} ,
tempHigh : 181.7 ,
} ;
elements . phenol _gas = {
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.003 } ,
"body" : { elem2 : "rotten_meat" , chance : 0.003 } ,
} ,
density : 3.24 ,
} ;
//Inorganic compounds
//Carbon monoxide
elements . carbon _monoxide = {
color : "#8f8f8f" ,
behavior : behaviors . GAS ,
state : "gas" ,
category : "gases" ,
density : 1.145 ,
reactions : {
"head" : { elem2 : "rotten_meat" , chance : 0.0017 } ,
"body" : { elem2 : "rotten_meat" , chance : 0.0017 } ,
} ,
tempLow : - 191.5 ,
} ;
elements . liquid _carbon _monoxide = {
tempLow : - 205.02 ,
density : 789 , //unknown solid density
} ;
//Water
elements . steam . reactions ? ? = { } ;
elements . steam . reactions . charcoal = { tempMin : 680 , elem1 : "hydrogen" , elem2 : "carbon_monoxide" } ;
elements . steam . reactions . diamond = { tempMin : 680 , elem1 : "hydrogen" , elem2 : "carbon_monoxide" } ;
/* / / Oil refining
delete elements . oil . tempHigh ;
elements . oil . tick = function ( pixel ) {
2023-03-13 11:54:55 -04:00
if ( ! pixel . role ) {
var value = Math . random ( )
if ( value < 0.03 ) {
pixel . role = "lpg" ;
} ;
} ;
if ( pixel . role == "lpg" ) {
var value = Math . random ( )
//LPG composition weighted chooser
} ;
if ( pixel . temp > 30 ) { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
//LPG change switch(pixel.role) statement
} ;
2023-02-24 21:04:47 -05:00
} ;
* /
} else {
enabledMods . splice ( enabledMods . indexOf ( modName ) , 0 , fireMod ) ;
2023-02-24 21:40:00 -05:00
enabledMods . splice ( enabledMods . indexOf ( modName ) , 0 , changeTempMod ) ;
2023-02-24 21:04:47 -05:00
localStorage . setItem ( "enabledMods" , JSON . stringify ( enabledMods ) ) ;
2023-02-24 21:40:00 -05:00
alert ( ` The ${ fireMod } and ${ changeTempMod } mods are required and have been automatically inserted (reload for this to take effect). ` ) ;
2023-02-24 21:38:21 -05:00
} ;