update napalms
adds "cold fire revamp and doBurning edits.js" dependency
This commit is contained in:
parent
0d9e39384b
commit
bba9180dc4
|
|
@ -1,3 +1,7 @@
|
|||
var modName = "mods/randomness_but_tick.js";
|
||||
var coldFireMod = "mods/cold fire revamp and doBurning edits.js";
|
||||
|
||||
if(enabledMods.includes(coldFireMod)) {
|
||||
elements.sencc = { //same element neighbor count check
|
||||
color: "#000000",
|
||||
uwu: 0,
|
||||
|
|
@ -1213,113 +1217,57 @@ function randIntR(min,max) {
|
|||
return Math.floor(Math.random() * (max - min + 1)) + min
|
||||
};
|
||||
|
||||
elements.test293 = {
|
||||
color: "#f0e7e0",
|
||||
elements.napalm = {
|
||||
color: "#e0873e",
|
||||
behavior: [
|
||||
"XX|SA%40 AND ST|XX",
|
||||
"M2%10 AND SA%40 AND ST|XX|M2%10 AND SA%40 AND ST",
|
||||
"M2 AND M1%10|M1 AND SA%40 AND ST|M2 AND M1%10"
|
||||
"M2%50 AND M1%10|M1 AND SA%40 AND ST|M2%50 AND M1%10"
|
||||
],
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 2222.22,
|
||||
tick: function(pixel) {
|
||||
if(pixel.burning) {
|
||||
if(pixel.burning == true) {
|
||||
if(isEmpty(pixel.x,pixel.y-1)) {
|
||||
if(Math.random() < 0.04) { createPixel("fire",pixel.x,pixel.y-1) }
|
||||
if(Math.random() < 0.04) { pixel.temp++ }
|
||||
}
|
||||
if(isEmpty(pixel.x,pixel.y+1)) {
|
||||
if(Math.random() < 0.04) { createPixel("fire",pixel.x,pixel.y+1) }
|
||||
if(Math.random() < 0.04) { pixel.temp++ }
|
||||
}
|
||||
if(isEmpty(pixel.x-1,pixel.y)) {
|
||||
if(Math.random() < 0.04) { createPixel("fire",pixel.x-1,pixel.y) }
|
||||
if(Math.random() < 0.04) { pixel.temp++ }
|
||||
}
|
||||
if(isEmpty(pixel.x+1,pixel.y)) {
|
||||
if(Math.random() < 0.04) { createPixel("fire",pixel.x+1,pixel.y) }
|
||||
if(Math.random() < 0.04) { pixel.temp++ }
|
||||
}
|
||||
if(Math.random() < 0.0001) { explodeAt(pixel.x,pixel.y,randIntR(7,10),("fire,fire,fire,fire,smoke,"+pixel.element+","+pixel.element)) }
|
||||
}
|
||||
}
|
||||
doHeat(pixel);
|
||||
},
|
||||
state: "liquid",
|
||||
viscosity: 1000,
|
||||
density: 1200, //google was f***ing useless and i'm not searching that again, so arbitrary 1.2 it is
|
||||
burnTempChange: 2,
|
||||
burn: 300,
|
||||
burnTime: 500,
|
||||
},
|
||||
|
||||
elements.test293b = {
|
||||
color: "#e0e7f0",
|
||||
elements.hypernapalm = {
|
||||
name: "h y p e r n a p a l m", //HYPERNAPALM
|
||||
color: "#bd34eb",
|
||||
behavior: [
|
||||
"XX|SA%40 AND ST|XX",
|
||||
"M2%10 AND SA%40 AND ST|XX|M2%10 AND SA%40 AND ST",
|
||||
"M2 AND M1%10|M1 AND SA%40 AND ST|M2 AND M1%10"
|
||||
"M2%50 AND M1%10|M1 AND SA%40 AND ST|M2%50 AND M1%10"
|
||||
],
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 2222.22,
|
||||
tick: function(pixel) {
|
||||
for(i = -1; i < 2; i++) {
|
||||
for(j = -1; j < 2; j++) {
|
||||
if(!isEmpty(pixel.x + i, pixel.y + j) && !outOfBounds(pixel.x + i, pixel.y + j)) {
|
||||
if(pixelMap[pixel.x + i][pixel.y + j].element == "cold_fire" && !pixel.burning) {
|
||||
pixel.burning = true
|
||||
pixel.burnStart = pixelTicks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(pixel.burning) {
|
||||
if(pixel.burning == true) {
|
||||
for(i = -1; i < 2; i++) {
|
||||
for(j = -1; j < 2; j++) {
|
||||
if(!isEmpty(pixel.x + i, pixel.y + j) && !outOfBounds(pixel.x + i, pixel.y + j)) {
|
||||
if(pixelMap[pixel.x + i][pixel.y + j].element == "fire") {
|
||||
deletePixel(pixel.x + i, pixel.y + j)
|
||||
createPixel("cold_fire", pixel.x + i,pixel.y + j)
|
||||
}
|
||||
pixelMap[pixel.x + i][pixel.y + j].temp -= randIntR(1,2)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isEmpty(pixel.x,pixel.y-1)) {
|
||||
if(Math.random() < 0.04) { createPixel("cold_fire",pixel.x,pixel.y-1) }
|
||||
if(Math.random() < 0.04) { pixel.temp-- }
|
||||
}
|
||||
if(isEmpty(pixel.x,pixel.y+1)) {
|
||||
if(Math.random() < 0.04) { createPixel("cold_fire",pixel.x,pixel.y+1) }
|
||||
if(Math.random() < 0.04) { pixel.temp-- }
|
||||
}
|
||||
if(isEmpty(pixel.x-1,pixel.y)) {
|
||||
if(Math.random() < 0.04) { createPixel("cold_fire",pixel.x-1,pixel.y) }
|
||||
if(Math.random() < 0.04) { pixel.temp-- }
|
||||
}
|
||||
if(isEmpty(pixel.x+1,pixel.y)) {
|
||||
if(Math.random() < 0.04) { createPixel("cold_fire",pixel.x+1,pixel.y) }
|
||||
if(Math.random() < 0.04) { pixel.temp-- }
|
||||
}
|
||||
if(Math.random() < 0.0001) {
|
||||
var amogus = randIntR(8,11)
|
||||
var amog1 = (Math.ceil(amogus/2))*-1
|
||||
var amog2 = (Math.ceil(amogus/2))+1
|
||||
explodeAt(pixel.x,pixel.y,amogus,("cold_fire,cold_fire,cold_fire,cold_fire,cold_fire,"+pixel.element+","+pixel.element))
|
||||
for(i = amog1; i < amog2; i++) {
|
||||
for(j = amog1; j < amog2; j++) {
|
||||
if(!isEmpty(pixel.x + i, pixel.y + j) && !outOfBounds(pixel.x + i, pixel.y + j)) {
|
||||
pixelMap[pixel.x + i][pixel.y + j].temp -= randIntR(160,240)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
doHeat(pixel);
|
||||
},
|
||||
state: "liquid",
|
||||
viscosity: 1000,
|
||||
density: 1200,
|
||||
fireElement: "plasma",
|
||||
fireSpawnChance: 33,
|
||||
fireSpawnTemp: 7200,
|
||||
burnTempChange: 30,
|
||||
burn: 300,
|
||||
burnTime: 500,
|
||||
},
|
||||
|
||||
elements.cold_napalm = {
|
||||
color: "#3e87e0",
|
||||
behavior: [
|
||||
"XX|SA%40 AND ST|XX",
|
||||
"M2%10 AND SA%40 AND ST|XX|M2%10 AND SA%40 AND ST",
|
||||
"M2%50 AND M1%10|M1 AND SA%40 AND ST|M2%50 AND M1%10"
|
||||
],
|
||||
category: "weapons",
|
||||
state: "liquid",
|
||||
viscosity: 1000,
|
||||
density: 1200,
|
||||
burn: 300,
|
||||
burnTime: 500,
|
||||
fireElement: "cold_fire",
|
||||
burnTempChange: -1,
|
||||
burnInto: "cold_fire",
|
||||
}
|
||||
|
||||
|
|
@ -1341,3 +1289,8 @@ elements.lower_color_copy = {
|
|||
breakInto: ["metal_scrap", "glass_shard"],
|
||||
hardness: 0.7,
|
||||
}
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,coldFireMod);
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The "${coldFireMod}" mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue