Move napalms out and remove dependency

This commit is contained in:
Laetitia (O-01-67) 2022-12-07 12:09:57 -05:00 committed by GitHub
parent 9491f0fdb0
commit 5566f54ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1078 additions and 1142 deletions

View File

@ -1,8 +1,4 @@
var modName = "mods/randomness_but_tick.js"; elements.sencc = { //same element neighbor count check
var coldFireMod = "mods/cold fire revamp and doBurning edits.js";
if(enabledMods.includes(coldFireMod)) {
elements.sencc = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -27,9 +23,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc2 = { //same element neighbor count check elements.sencc2 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -54,9 +50,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc3 = { //same element neighbor count check elements.sencc3 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -82,9 +78,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc4 = { //same element neighbor count check elements.sencc4 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -110,9 +106,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc5 = { //same element neighbor count check elements.sencc5 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -138,9 +134,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc6 = { //same element neighbor count check elements.sencc6 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -166,9 +162,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc7 = { //same element neighbor count check elements.sencc7 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -194,9 +190,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc8 = { //same element neighbor count check elements.sencc8 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -222,9 +218,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc9 = { //same element neighbor count check elements.sencc9 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -250,9 +246,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc10 = { //same element neighbor count check elements.sencc10 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -278,9 +274,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc11 = { //same element neighbor count check elements.sencc11 = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
tick: function(pixel) { tick: function(pixel) {
@ -306,9 +302,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.sencc2b = { //same element neighbor count check elements.sencc2b = { //same element neighbor count check
color: "#000000", color: "#000000",
uwu: 0, uwu: 0,
owo: 0, owo: 0,
@ -339,9 +335,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
state: "solid", state: "solid",
hidden: true, hidden: true,
}, },
elements.discharge = { elements.discharge = {
color: "#7f7f7f", color: "#7f7f7f",
tick: function(pixel) { tick: function(pixel) {
for (var i = 1; i < width; i++) { for (var i = 1; i < width; i++) {
@ -357,9 +353,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate:true, insulate:true,
state: "solid", state: "solid",
behavior: behaviors.SELFDELETE, behavior: behaviors.SELFDELETE,
}, },
elements.troll_powder = { elements.troll_powder = {
color: ["#ffffff","#000000"], color: ["#ffffff","#000000"],
tick: function(pixel) { tick: function(pixel) {
ddd = Math.random() ddd = Math.random()
@ -411,9 +407,9 @@ if(enabledMods.includes(coldFireMod)) {
category: "powders", category: "powders",
state: "solid", state: "solid",
density: 1602, density: 1602,
}, },
elements.void_first = { elements.void_first = {
color: "#262626", color: "#262626",
tick: function(pixel) { tick: function(pixel) {
if(!pixel.void) { if(!pixel.void) {
@ -606,9 +602,9 @@ if(enabledMods.includes(coldFireMod)) {
}, },
category:"special", category:"special",
hardness: 1, hardness: 1,
}, },
elements.converter = { elements.converter = {
color: "#2ec408", color: "#2ec408",
tick: function(pixel) { tick: function(pixel) {
if(!pixel.changeTo) { if(!pixel.changeTo) {
@ -801,11 +797,11 @@ if(enabledMods.includes(coldFireMod)) {
}, },
category:"special", category:"special",
hardness: 1, hardness: 1,
}, },
conveyorIgnoreList = ["conveyor_1","conveyor_2","wall"] conveyorIgnoreList = ["conveyor_1","conveyor_2","wall"]
elements.conveyor_1 = { elements.conveyor_1 = {
color: "#7f7f7f", color: "#7f7f7f",
tick: function(pixel) { tick: function(pixel) {
//top right //top right
@ -888,9 +884,9 @@ if(enabledMods.includes(coldFireMod)) {
category: "machines", category: "machines",
insulate: true, insulate: true,
state: "solid", state: "solid",
}, },
elements.conveyor_2 = { elements.conveyor_2 = {
color: "#7f7f7f", color: "#7f7f7f",
tick: function(pixel) { tick: function(pixel) {
//top left //top left
@ -973,9 +969,9 @@ if(enabledMods.includes(coldFireMod)) {
category: "machines", category: "machines",
insulate: true, insulate: true,
state: "solid", state: "solid",
}, },
elements.vanishing_wall = { elements.vanishing_wall = {
behavior: behaviors.WALL, behavior: behaviors.WALL,
color: "#8080b0", color: "#8080b0",
density: 3333, density: 3333,
@ -993,9 +989,9 @@ if(enabledMods.includes(coldFireMod)) {
insulate: true, insulate: true,
conduct: 1, conduct: 1,
extraInfo: "It disappears when charged.", extraInfo: "It disappears when charged.",
}, },
elements.polka_dotted_powder = { elements.polka_dotted_powder = {
color: ["#000000","#000000","#7f7f7f","#ffffff","#ffffff"], color: ["#000000","#000000","#7f7f7f","#ffffff","#ffffff"],
behavior: behaviors.POWDER, behavior: behaviors.POWDER,
category: "powders", category: "powders",
@ -1031,9 +1027,9 @@ if(enabledMods.includes(coldFireMod)) {
} }
}, },
tempHigh: 800, tempHigh: 800,
}, },
elements.molten_polka_dotted_powder = { elements.molten_polka_dotted_powder = {
color: ["#ff7f00","#ff7f00","#ff9f00","#ffbf00","#ffbf00"], color: ["#ff7f00","#ff7f00","#ff9f00","#ffbf00","#ffbf00"],
density: 1100, density: 1100,
tick: function(pixel) { tick: function(pixel) {
@ -1072,9 +1068,9 @@ if(enabledMods.includes(coldFireMod)) {
stateHigh: "vaporized_polka_dotted_powder", stateHigh: "vaporized_polka_dotted_powder",
viscosity: 6, viscosity: 6,
hidden: true, hidden: true,
}, },
elements.vaporized_polka_dotted_powder = { elements.vaporized_polka_dotted_powder = {
color: ["#ffdf7f","#ffdf7f","#ffefbf","#ffffff","#ffffff"], color: ["#ffdf7f","#ffdf7f","#ffefbf","#ffffff","#ffffff"],
behavior: behaviors.GAS, behavior: behaviors.GAS,
category: "gases", category: "gases",
@ -1115,9 +1111,9 @@ if(enabledMods.includes(coldFireMod)) {
tempHigh: 8000, tempHigh: 8000,
stateHigh: "ionized_polka_dotted_powder", stateHigh: "ionized_polka_dotted_powder",
hidden: true, hidden: true,
}, },
elements.ionized_polka_dotted_powder = { elements.ionized_polka_dotted_powder = {
color: ["#fffff0","#fffff0","#fffff7","#ffffff","#ffffff"], color: ["#fffff0","#fffff0","#fffff7","#ffffff","#ffffff"],
behavior: [ behavior: [
"M2 AND CR:plasma%0.3|M1|M2 AND CR:plasma%0.3", "M2 AND CR:plasma%0.3|M1|M2 AND CR:plasma%0.3",
@ -1160,9 +1156,9 @@ if(enabledMods.includes(coldFireMod)) {
tempLow: 8000, tempLow: 8000,
stateLow: "vaporized_polka_dotted_powder", stateLow: "vaporized_polka_dotted_powder",
hidden: true, hidden: true,
}, },
elements.hdet = { elements.hdet = {
name: "heat- dependent explosion text", name: "heat- dependent explosion text",
color: "#33aa44", color: "#33aa44",
behavior: behaviors.POWDER, behavior: behaviors.POWDER,
@ -1202,77 +1198,22 @@ if(enabledMods.includes(coldFireMod)) {
conduct: 0.5, conduct: 0.5,
state: "solid", state: "solid",
category: "special" category: "special"
}, },
function randInt(max) { function randInt(max) {
return Math.floor(Math.random() * (max + 1)) return Math.floor(Math.random() * (max + 1))
} }
function randIntR(min,max) { function randIntR(min,max) {
if(min > max) { if(min > max) {
var temp = max; //the need of a temporary space has always annoyed me var temp = max; //the need of a temporary space has always annoyed me
max = min; max = min;
min = temp; min = temp;
}; };
return Math.floor(Math.random() * (max - min + 1)) + min return Math.floor(Math.random() * (max - min + 1)) + min
}; };
elements.napalm = { elements.lower_color_copy = {
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%50 AND M1%10|M1 AND SA%40 AND ST|M2%50 AND M1%10"
],
category: "weapons",
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,
temp: airTemp,
},
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%50 AND M1%10|M1 AND SA%40 AND ST|M2%50 AND M1%10"
],
category: "weapons",
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",
}
elements.lower_color_copy = {
behavior: behaviors.POWDER, behavior: behaviors.POWDER,
tick: function(pixel) { tick: function(pixel) {
if(!isEmpty(pixel.x,pixel.y+1,true)) { if(!isEmpty(pixel.x,pixel.y+1,true)) {
@ -1289,9 +1230,4 @@ if(enabledMods.includes(coldFireMod)) {
density: 1250, density: 1250,
breakInto: ["metal_scrap", "glass_shard"], breakInto: ["metal_scrap", "glass_shard"],
hardness: 0.7, 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).`)
};