add pyrogenic substances and reacts for funni

This commit is contained in:
Laetitia (O-01-67) 2023-02-14 13:40:29 -05:00 committed by GitHub
parent 7c3e23a761
commit 7641abb1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 186 additions and 3 deletions

View File

@ -15,8 +15,6 @@ elements.bioooze = {
//"elder_fluid": { "elem1":"corrupt_slime" }, //acid should be sulfuric acid and product should be wastestone //"elder_fluid": { "elem1":"corrupt_slime" }, //acid should be sulfuric acid and product should be wastestone
//"mercury": { "elem1":"liquid_protocite" }, //acid should be sulfuric acid and product should be wastestone //"mercury": { "elem1":"liquid_protocite" }, //acid should be sulfuric acid and product should be wastestone
//"blue_grav_liquid": { "elem1":"blue_grav_liquid" }, //bgl would set gravity to upwards gravity //"blue_grav_liquid": { "elem1":"blue_grav_liquid" }, //bgl would set gravity to upwards gravity
//thank fuck that elements are rotatable in sandboxels or else this
//would be meaningless and unimplementable
"blood": { "elem1": ["bioooze","bioooze","poison","slime",null], "elem2": "infection" }, "blood": { "elem1": ["bioooze","bioooze","poison","slime",null], "elem2": "infection" },
"soap": { "elem1": "slime", "chance": 0.02 }, "soap": { "elem1": "slime", "chance": 0.02 },
"plant": { "elem1": ["bioooze","bioooze","poison","slime",null], "elem2": "dead_plant" }, "plant": { "elem1": ["bioooze","bioooze","poison","slime",null], "elem2": "dead_plant" },
@ -78,4 +76,189 @@ elements.bioooze = {
stain: 0.2, stain: 0.2,
viscosity: 60, viscosity: 60,
description: "A particularly potent toxic sludge loaded with parasites and ickiness.", description: "A particularly potent toxic sludge loaded with parasites and ickiness.",
};
function threshholdedPyrogen(pixel,threshholdTemp,baseHeat,divisor) {
if(pixel.temp < threshholdTemp) {
pixel.temp += Math.max(baseHeat,(threshholdTemp - pixel.temp) / divisor);
} else {
pixel.temp += baseHeat;
};
};
function tpHeatCalc(startTemp,threshholdTemp,baseHeat,divisor) {
if(startTemp < threshholdTemp) {
return Math.max(baseHeat,(threshholdTemp - startTemp) / divisor);
} else {
return baseHeat;
};
};
function itfChanceCalc(baseHeat,divisor,chanceLimit) {
return Math.min(chanceLimit,(baseHeat / divisor))
};
function inferniumTempFire(pixel,divisor,chanceLimit) {
if(Math.random() < Math.min(chanceLimit,(pixel.temp / divisor))) { //fire depending on temp
var randomCoord = adjacentCoords[Math.floor(Math.random() * adjacentCoords.length)]; //random place
var nx = pixel.x+randomCoord[0];
var ny = pixel.y+randomCoord[1];
if(isEmpty(nx,ny)) { //if empty
createPixel("fire",nx,ny); //create fire at coord coords
pixelMap[nx][ny].temp = pixel.temp; //set temp
};
};
};
elements.pyreite = {
color: ["#cc674b","#e06e41","#f77320","#f77320","#fa9b28","#fac228"],
behavior: behaviors.WALL,
tempHigh: 5500, //Instead of making my own headcanons, I'm using Omniblog Of Starbound's headcanons :eggTF:
category: "solids",
density: 14600,
conduct: 0.66,
hardness: 0.79,
tick: function(pixel) {
threshholdedPyrogen(pixel,1722,0.25,512);
},
};
elements.infernium = {
color: ["#bf4b39","#e68453","#f7994d","#f7994d","#ffa154","#ffe875"],
behavior: [
"XX|CR:fire%0.01|XX",
"XX|XX|XX",
"XX|XX|XX"
],
tempHigh: 5526, //I have no headcanon to turn to for this mod so have multiples of 2763
category: "solids",
density: 13815,
conduct: 0.691,
hardness: 0.79,
tick: function(pixel) {
threshholdedPyrogen(pixel,1763,0.32,512);
inferniumTempFire(pixel,40000,0.2);
},
};
elements.molten_pyreite = {
tick: function(pixel) {
pixel.temp += 0.25;
},
reactions: {
molten_infernium: { elem1: "molten_infernyrite", elem2: "molten_infernyrite", temp1: 304, temp2: 304 },
},
};
elements.molten_infernium = {
tick: function(pixel) {
pixel.temp += 0.32;
inferniumTempFire(pixel,40000,0.2);
},
};
elements.infernyrite = {
color: ["#d45f2c","#f59449","#f7994d","#fcaa4c","#fab973","#ffea8c"],
behavior: [
"XX|CR:fire%0.01|XX",
"XX|XX|XX",
"XX|XX|XX"
],
tempHigh: 9901,
category: "solids",
density: 14197,
conduct: 0.63,
hardness: 0.8,
tick: function(pixel) {
threshholdedPyrogen(pixel,2501,0.79,480);
inferniumTempFire(pixel,40000,0.2);
},
};
elements.molten_infernyrite = {
tick: function(pixel) {
pixel.temp += 0.79;
inferniumTempFire(pixel,40000,0.2); //"canonically", the dilution and the pyrogenic synergy or whatever you want to call it just so happen to cancel out
},
reactions: {
blazing_pyrotheum: {
elem1: "molten_infernyreitheum",
elem2: ["blazing_pyrotheum","molten_infernyreitheum"],
temp1: 1043,
temp2: 1043
},
},
};
if(elements.blazing_pyrotheum) {
elements.infernyreitheum = {
color: ["#f2a863","#faaf4d","#ffb547","#fcaa4c","#fcd64c","#fff6ba"],
behavior: [
"XX|CR:fire%0.08|XX",
"XX|XX|XX",
"XX|XX|XX"
],
tempHigh: 11052,
category: "solids",
density: 15064,
conduct: 0.52,
hardness: 0.8,
tick: function(pixel) {
threshholdedPyrogen(pixel,8932,2.03,416);
inferniumTempFire(pixel,25000,0.4); //pyrotheum makes a lot of fire
},
};
function pyrestoneInfernyreitheumReaction(pyrestoneName) {
return {
elem1: "molten_pyrinfernyreitheum",
elem2: [pyrestoneName,pyrestoneName,"molten_pyrinfernyreitheum"],
temp1: 3085,
temp2: 3085
};
};
elements.molten_infernyreitheum = {
tick: function(pixel) {
pixel.temp += 2.03;
inferniumTempFire(pixel,25000,0.4);
},
reactions: {
unignited_pyrestone: pyrestoneInfernyreitheumReaction("unignited_pyrestone"),
ignited_pyrestone: pyrestoneInfernyreitheumReaction("ignited_pyrestone"),
heated_pyrestone: pyrestoneInfernyreitheumReaction("heated_pyrestone"),
burning_pyrestone: pyrestoneInfernyreitheumReaction("burning_pyrestone"),
blazing_pyrestone: pyrestoneInfernyreitheumReaction("blazing_pyrestone"),
fiery_pyrestone: pyrestoneInfernyreitheumReaction("fiery_pyrestone")
} }
};
if(elements.unignited_pyrestone) {
elements.pyrinfernyreitheum = {
color: ["#e6c087","#f7c76d","#ffd79c","#ffd79c","#ffe387","#ffffd9"],
behavior: [
"XX|CR:fire%2|XX",
"XX|XX|XX",
"XX|XX|XX"
],
tempHigh: 18254,
category: "solids",
density: 17042,
conduct: 0.25,
hardness: 0.8,
tick: function(pixel) {
threshholdedPyrogen(pixel,15944,7.01,352);
inferniumTempFire(pixel,15000,0.8); //pyrotheum makes a lot of fire
},
};
elements.molten_pyrinfernyreitheum = {
tick: function(pixel) {
pixel.temp += 7.01;
inferniumTempFire(pixel,15000,0.8); //pyrotheum makes a lot of fire
},
};
};
};