Merge branch 'main' of https://github.com/R74nCom/sandboxels
This commit is contained in:
commit
d922f82e76
|
|
@ -224,6 +224,7 @@
|
||||||
<tr><td>fairy_chain.js</td><td>Adds way too many fairies to fey_and_more.js</td><td>Alice</td></tr>
|
<tr><td>fairy_chain.js</td><td>Adds way too many fairies to fey_and_more.js</td><td>Alice</td></tr>
|
||||||
<tr><td>fantastic_creatures.js</td><td>Adds various animals</td><td>Melecie</td></tr>
|
<tr><td>fantastic_creatures.js</td><td>Adds various animals</td><td>Melecie</td></tr>
|
||||||
<tr><td>fantasy_elements.js</td><td>Fantasy creatures and substances</td><td>pixelegend4</td></tr>
|
<tr><td>fantasy_elements.js</td><td>Fantasy creatures and substances</td><td>pixelegend4</td></tr>
|
||||||
|
<tr><td>flowers_and_forests.js</td><td>adds trees and flowers and things to do with nature</td><td>pixelegend4 and SquareScreamYT</td></tr>
|
||||||
<tr><td>fey_and_more.js</td><td>Adds fairies, magic, and a lot of other things</td><td>Melecie</td></tr>
|
<tr><td>fey_and_more.js</td><td>Adds fairies, magic, and a lot of other things</td><td>Melecie</td></tr>
|
||||||
<tr><td>fwibblen.js</td><td>Adds a flying creature that turns nickel into itself, and a second creature that does the same to the first one</td><td>Alice</td></tr>
|
<tr><td>fwibblen.js</td><td>Adds a flying creature that turns nickel into itself, and a second creature that does the same to the first one</td><td>Alice</td></tr>
|
||||||
<tr><td>human_edit.js</td><td>Improvements to humans</td><td>Alice</td></tr>
|
<tr><td>human_edit.js</td><td>Improvements to humans</td><td>Alice</td></tr>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
elements.Calor = {
|
||||||
|
color: "#ff2f2f",
|
||||||
|
tool: function(pixel) {
|
||||||
|
pixel.temp += 500000000000000000000500000000000000000000;
|
||||||
|
pixelTempCheck(pixel)
|
||||||
|
},
|
||||||
|
category: "tools",
|
||||||
|
};
|
||||||
|
elements.Frio = {
|
||||||
|
color: "#2f2fff",
|
||||||
|
tool: function(pixel) {
|
||||||
|
pixel.temp += -500000000000000000000500000000000000000000;
|
||||||
|
pixelTempCheck(pixel)
|
||||||
|
},
|
||||||
|
category: "tools",
|
||||||
|
};
|
||||||
|
|
@ -2,7 +2,18 @@
|
||||||
Created by SquareScreamYT and RealerRaddler
|
Created by SquareScreamYT and RealerRaddler
|
||||||
Thanks to Alice, nousernamefound and Fioushemastor for helping :)
|
Thanks to Alice, nousernamefound and Fioushemastor for helping :)
|
||||||
|
|
||||||
v1.4
|
Upcoming Features:
|
||||||
|
- onions
|
||||||
|
- spring onions
|
||||||
|
- soy sauce
|
||||||
|
- rice
|
||||||
|
- seaweed and agar
|
||||||
|
- pigs, ham and bacon
|
||||||
|
- garlic
|
||||||
|
- msg
|
||||||
|
- stainless steel
|
||||||
|
|
||||||
|
v1.5
|
||||||
|
|
||||||
Changelog (v1.0)
|
Changelog (v1.0)
|
||||||
- added chickens
|
- added chickens
|
||||||
|
|
@ -192,6 +203,21 @@ Changelog (v1.4)
|
||||||
- added ginger
|
- added ginger
|
||||||
- added ginger juice
|
- added ginger juice
|
||||||
- added ginger rhizomes, pseudostems and leaves
|
- added ginger rhizomes, pseudostems and leaves
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Changelog (v1.5)
|
||||||
|
- added blueberries
|
||||||
|
- added blueberries
|
||||||
|
- added blueberry seeds, stem, and leaves
|
||||||
|
- added blueberry juice
|
||||||
|
- added strawberry and blueberry jam
|
||||||
|
- added cut blueberries
|
||||||
|
- added advanced dough
|
||||||
|
- added carbonic acid
|
||||||
|
- added cookies and cookie dough
|
||||||
|
- replaced cooking oil with nut oil
|
||||||
|
- added boba and boba dough
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -536,7 +562,7 @@ elements.raw_chicken = {
|
||||||
"smoke": {elem1: "smoked_chicken"},
|
"smoke": {elem1: "smoked_chicken"},
|
||||||
"steam": {elem1: "steamed_chicken"},
|
"steam": {elem1: "steamed_chicken"},
|
||||||
"water": {elem1: "boiled_chicken", tempMin: 70},
|
"water": {elem1: "boiled_chicken", tempMin: 70},
|
||||||
"cooking_oil": {elem1: "fried_chicken", tempMin: 70}
|
"nut_oil": {elem1: "fried_chicken", tempMin: 70}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -575,7 +601,7 @@ elements.raw_chicken_nugget = {
|
||||||
stateHigh: ["ash", "smoke"],
|
stateHigh: ["ash", "smoke"],
|
||||||
hidden: true,
|
hidden: true,
|
||||||
reactions: {
|
reactions: {
|
||||||
"cooking_oil": {elem1: "chicken_nugget", tempMin: 70}
|
"nut_oil": {elem1: "chicken_nugget", tempMin: 70}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -678,22 +704,20 @@ elements.olive = {
|
||||||
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
||||||
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
"rock": { elem1:"cooking_oil", elem2:"rock", chance:0.035 },
|
"rock": { elem1:"nut_oil", elem2:"rock", chance:0.035, color1: "#ffc844" },
|
||||||
},
|
},
|
||||||
category:"food",
|
category:"food",
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "dead_plant",
|
stateHigh: "dead_plant",
|
||||||
tempLow: -1.66,
|
|
||||||
stateLow: "frozen_plant",
|
|
||||||
burn:65,
|
burn:65,
|
||||||
burnTime:60,
|
burnTime:60,
|
||||||
burnInto: "dead_plant",
|
burnInto: "dead_plant",
|
||||||
breakInto: "cooking_oil",
|
breakInto: "nut_oil",
|
||||||
state: "solid",
|
breakIntoColor: "#ffc844",
|
||||||
density: 1050,
|
density: 1050,
|
||||||
isFood: false
|
isFood: false
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
elements.cooking_oil = {
|
elements.cooking_oil = {
|
||||||
color: "#ffc844",
|
color: "#ffc844",
|
||||||
behavior: behaviors.LIQUID,
|
behavior: behaviors.LIQUID,
|
||||||
|
|
@ -711,7 +735,7 @@ elements.cooking_oil = {
|
||||||
"peeled_potato": {elem2: "fried_potato", tempMin: 70}
|
"peeled_potato": {elem2: "fried_potato", tempMin: 70}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
elements.pepper = {
|
elements.pepper = {
|
||||||
color: ["#1f190a", "#2b200d", "#362712", "#3b2211"],
|
color: ["#1f190a", "#2b200d", "#362712", "#3b2211"],
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
|
|
@ -752,7 +776,7 @@ elements.peeled_potato = {
|
||||||
stateHigh: "baked_potato",
|
stateHigh: "baked_potato",
|
||||||
density: 1100,
|
density: 1100,
|
||||||
reactions: {
|
reactions: {
|
||||||
"cooking_oil": { elem1: "fried_potato", tempMin: 70 }
|
"nut_oil": { elem1: "fried_potato", tempMin: 70 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -843,8 +867,6 @@ elements.apple = {
|
||||||
category:"food",
|
category:"food",
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "dead_plant",
|
stateHigh: "dead_plant",
|
||||||
tempLow: -1.66,
|
|
||||||
stateLow: "frozen_plant",
|
|
||||||
burn:65,
|
burn:65,
|
||||||
burnTime:60,
|
burnTime:60,
|
||||||
burnInto: "dead_plant",
|
burnInto: "dead_plant",
|
||||||
|
|
@ -1153,8 +1175,6 @@ elements.orange = {
|
||||||
category:"food",
|
category:"food",
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "dead_plant",
|
stateHigh: "dead_plant",
|
||||||
tempLow: -1.66,
|
|
||||||
stateLow: "frozen_plant",
|
|
||||||
burn:65,
|
burn:65,
|
||||||
burnTime:60,
|
burnTime:60,
|
||||||
burnInto: "dead_plant",
|
burnInto: "dead_plant",
|
||||||
|
|
@ -1436,7 +1456,7 @@ elements.raw_salmon = {
|
||||||
"smoke": {elem1: "smoked_salmon"},
|
"smoke": {elem1: "smoked_salmon"},
|
||||||
"steam": {elem1: "steamed_salmon"},
|
"steam": {elem1: "steamed_salmon"},
|
||||||
"water": {elem1: "boiled_salmon", tempMin: 70},
|
"water": {elem1: "boiled_salmon", tempMin: 70},
|
||||||
"cooking_oil": {elem1: "fried_salmon", tempMin: 70}
|
"nut_oil": {elem1: "fried_salmon", tempMin: 70}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1509,7 +1529,7 @@ elements.raw_tuna = {
|
||||||
"smoke": {elem1: "smoked_tuna"},
|
"smoke": {elem1: "smoked_tuna"},
|
||||||
"steam": {elem1: "steamed_tuna"},
|
"steam": {elem1: "steamed_tuna"},
|
||||||
"water": {elem1: "boiled_tuna", tempMin: 70},
|
"water": {elem1: "boiled_tuna", tempMin: 70},
|
||||||
"cooking_oil": {elem1: "fried_tuna", tempMin: 70}
|
"nut_oil": {elem1: "fried_tuna", tempMin: 70}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1662,8 +1682,6 @@ elements.watermelon = {
|
||||||
category:"food",
|
category:"food",
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "dead_plant",
|
stateHigh: "dead_plant",
|
||||||
tempLow: -1.66,
|
|
||||||
stateLow: "frozen_plant",
|
|
||||||
burn:65,
|
burn:65,
|
||||||
burnTime:60,
|
burnTime:60,
|
||||||
burnInto: "dead_plant",
|
burnInto: "dead_plant",
|
||||||
|
|
@ -1762,16 +1780,38 @@ elements.cream_of_tartar = {
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
category: "food",
|
category: "food",
|
||||||
state: "solid",
|
state: "solid",
|
||||||
tempHigh: 200,
|
|
||||||
stateHigh: "caramel",
|
|
||||||
density: 1500,
|
density: 1500,
|
||||||
isFood: true,
|
isFood: true,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
reaction: {
|
reactions: {
|
||||||
"sugar_water": {elem2: "corn_syrup", elem1: null, tempMin: 110}
|
"sugar_water": {elem2: "corn_syrup", elem1: null, tempMin: 80},
|
||||||
|
"carbonic_acid": {elem1: null, elem2: "carbon_dioxide"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elements.corn_syrup = {
|
||||||
|
color: ["#FFCD0C", "#E47F00", "#FEB003"],
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "food",
|
||||||
|
state: "liquid",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "caramel",
|
||||||
|
isFood: true,
|
||||||
|
hidden: true,
|
||||||
|
viscosity: 10000
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!elements.baking_soda.reactions) elements.baking_soda.reactions = {};
|
||||||
|
elements.baking_soda.reactions.water = { elem1: "carbonic_acid", elem2: "carbonic_acid" }
|
||||||
|
|
||||||
|
elements.carbonic_acid = {
|
||||||
|
color: ["#E0DEA5", "#DFDB9C", "#EBE8BC"],
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
hidden: true,
|
||||||
|
}
|
||||||
|
|
||||||
elements.wine = {
|
elements.wine = {
|
||||||
color: ["#6F0013", "#6D0112"],
|
color: ["#6F0013", "#6D0112"],
|
||||||
behavior: behaviors.LIQUID,
|
behavior: behaviors.LIQUID,
|
||||||
|
|
@ -1785,18 +1825,6 @@ elements.wine = {
|
||||||
tempLow: 0
|
tempLow: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.corn_syrup = {
|
|
||||||
color: ["#FFCD0C", "#E47F00", "#FEB003"],
|
|
||||||
behavior: behaviors.LIQUID,
|
|
||||||
category: "food",
|
|
||||||
state: "liquid",
|
|
||||||
tempHigh: 100,
|
|
||||||
stateHigh: "caramel",
|
|
||||||
isFood: true,
|
|
||||||
hidden: true,
|
|
||||||
viscosity: 10000
|
|
||||||
}
|
|
||||||
|
|
||||||
elements.shrimp = {
|
elements.shrimp = {
|
||||||
color: ["#EE5422", "#E9683C", "#F3583F", "#EDA270"],
|
color: ["#EE5422", "#E9683C", "#F3583F", "#EDA270"],
|
||||||
behavior: [
|
behavior: [
|
||||||
|
|
@ -2024,8 +2052,6 @@ elements.coconut = {
|
||||||
category:"food",
|
category:"food",
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "dead_plant",
|
stateHigh: "dead_plant",
|
||||||
tempLow: -1.66,
|
|
||||||
stateLow: "frozen_plant",
|
|
||||||
burn:65,
|
burn:65,
|
||||||
burnTime:60,
|
burnTime:60,
|
||||||
burnInto: "dead_plant",
|
burnInto: "dead_plant",
|
||||||
|
|
@ -2058,7 +2084,7 @@ elements.coconut_milk = {
|
||||||
viscosity: 1.5,
|
viscosity: 1.5,
|
||||||
category: "liquids",
|
category: "liquids",
|
||||||
state: "liquid",
|
state: "liquid",
|
||||||
density: 1036.86,
|
density: 825,
|
||||||
isFood: true
|
isFood: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2081,8 +2107,6 @@ elements.cut_coconut = {
|
||||||
category:"food",
|
category:"food",
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "dead_plant",
|
stateHigh: "dead_plant",
|
||||||
tempLow: -1.66,
|
|
||||||
stateLow: "frozen_plant",
|
|
||||||
burn:65,
|
burn:65,
|
||||||
burnTime:60,
|
burnTime:60,
|
||||||
burnInto: "dead_plant",
|
burnInto: "dead_plant",
|
||||||
|
|
@ -2188,8 +2212,6 @@ elements.lemon = {
|
||||||
category:"food",
|
category:"food",
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "dead_plant",
|
stateHigh: "dead_plant",
|
||||||
tempLow: -1.66,
|
|
||||||
stateLow: "frozen_plant",
|
|
||||||
burn:65,
|
burn:65,
|
||||||
burnTime:60,
|
burnTime:60,
|
||||||
burnInto: "dead_plant",
|
burnInto: "dead_plant",
|
||||||
|
|
@ -2624,10 +2646,6 @@ elements.corn_starch = {
|
||||||
"juice": { elem1: "dough", elem2: null },
|
"juice": { elem1: "dough", elem2: null },
|
||||||
"yolk": { elem1: "batter", elem2: null },
|
"yolk": { elem1: "batter", elem2: null },
|
||||||
"yogurt": { elem1: "batter", elem2: null },
|
"yogurt": { elem1: "batter", elem2: null },
|
||||||
"honey": { elem1:"gingerbread", elem2:null },
|
|
||||||
"molasses": { elem1:"gingerbread", elem2:null },
|
|
||||||
"sap": { elem1:"gingerbread", elem2:null },
|
|
||||||
"caramel": { elem1:"gingerbread", elem2:null },
|
|
||||||
"broth": { elem1:"dough", elem2:null },
|
"broth": { elem1:"dough", elem2:null },
|
||||||
"soda": { elem1:"dough", elem2:null },
|
"soda": { elem1:"dough", elem2:null },
|
||||||
"tea": { elem1:"dough", elem2:null },
|
"tea": { elem1:"dough", elem2:null },
|
||||||
|
|
@ -2934,7 +2952,10 @@ elements.strawberry_juice = {
|
||||||
density: 825,
|
density: 825,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
temp: 30,
|
temp: 30,
|
||||||
tempLow: 0
|
tempLow: 0,
|
||||||
|
reactions: {
|
||||||
|
"sugar": { elem1:"strawberry_jam", elem2:null, chance:0.35 },
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
elements.cream = {
|
elements.cream = {
|
||||||
|
|
@ -3148,3 +3169,341 @@ elements.ginger_juice = {
|
||||||
"bread": { elem1:"gingerbread", elem2:null },
|
"bread": { elem1:"gingerbread", elem2:null },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
elements.blueberry_seed = {
|
||||||
|
color: "#7a7133",
|
||||||
|
behavior: behaviors.STURDYPOWDER,
|
||||||
|
reactions: {
|
||||||
|
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
||||||
|
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"mercury": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"stench": { elem2:null, chance:0.25 },
|
||||||
|
},
|
||||||
|
tick: function(pixel) {
|
||||||
|
if (isEmpty(pixel.x,pixel.y+1)) {
|
||||||
|
movePixel(pixel,pixel.x,pixel.y+1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (Math.random() < 0.02 && pixel.temp < 100) {
|
||||||
|
if (!outOfBounds(pixel.x,pixel.y+1)) {
|
||||||
|
var dirtPixel = pixelMap[pixel.x][pixel.y+1];
|
||||||
|
if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") {
|
||||||
|
changePixel(pixel,"blueberry_stem");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pixel.age++;
|
||||||
|
}
|
||||||
|
doDefaults(pixel);
|
||||||
|
},
|
||||||
|
category:"life",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "dead_plant",
|
||||||
|
tempLow: -1.66,
|
||||||
|
stateLow: "frozen_plant",
|
||||||
|
burn:15,
|
||||||
|
burnTime:60,
|
||||||
|
burnInto: "dead_plant",
|
||||||
|
breakInto: "dead_plant",
|
||||||
|
state: "solid",
|
||||||
|
density: 1050,
|
||||||
|
cooldown: defaultCooldown
|
||||||
|
}
|
||||||
|
elements.blueberry_stem = {
|
||||||
|
color: "#419c2f",
|
||||||
|
behavior: [
|
||||||
|
"CR:blueberry_stem,blueberry_leaves,blueberry_leaves,blueberry_leaves,blueberry_leaves%3|CR:blueberry_stem,blueberry_leaves,blueberry_leaves,blueberry_leaves,blueberry_leaves%3|CR:blueberry_stem,blueberry_leaves,blueberry_leaves,blueberry_leaves,blueberry_leaves%3",
|
||||||
|
"CR:blueberry_stem,blueberry_leaves,blueberry_leaves,blueberry_leaves,blueberry_leaves%3|XX|CR:blueberry_stem,blueberry_leaves,blueberry_leaves,blueberry_leaves,blueberry_leaves%3",
|
||||||
|
"XX|M1|XX",
|
||||||
|
],
|
||||||
|
tick: function(pixel) {
|
||||||
|
if (isEmpty(pixel.x,pixel.y+1)) {
|
||||||
|
movePixel(pixel,pixel.x,pixel.y+1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (Math.random() < 0.02 && pixel.age > 50 && pixel.temp < 100) {
|
||||||
|
if (!outOfBounds(pixel.x,pixel.y+1)) {
|
||||||
|
var dirtPixel = pixelMap[pixel.x][pixel.y+1];
|
||||||
|
if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") {
|
||||||
|
changePixel(dirtPixel,"root");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pixel.age++;
|
||||||
|
}
|
||||||
|
doDefaults(pixel);
|
||||||
|
},
|
||||||
|
reactions: {
|
||||||
|
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
||||||
|
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"mercury": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"stench": { elem2:null, chance:0.25 },
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
"age":0
|
||||||
|
},
|
||||||
|
category:"life",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "dead_plant",
|
||||||
|
tempLow: -1.66,
|
||||||
|
stateLow: "frozen_plant",
|
||||||
|
burn:15,
|
||||||
|
burnTime:60,
|
||||||
|
burnInto: "dead_plant",
|
||||||
|
breakInto: "dead_plant",
|
||||||
|
state: "solid",
|
||||||
|
density: 1050,
|
||||||
|
}
|
||||||
|
elements.blueberry_leaves = {
|
||||||
|
color: "#4bad37",
|
||||||
|
behavior: [
|
||||||
|
"XX|CR:blueberry%2|XX",
|
||||||
|
"CR:blueberry%2|XX|CR:blueberry%2",
|
||||||
|
"M2|M1|M2",
|
||||||
|
],
|
||||||
|
reactions: {
|
||||||
|
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
||||||
|
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"mercury": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"stench": { elem2:null, chance:0.25 },
|
||||||
|
},
|
||||||
|
category:"life",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "dead_plant",
|
||||||
|
tempLow: -1.66,
|
||||||
|
stateLow: "frozen_plant",
|
||||||
|
burn:15,
|
||||||
|
burnTime:60,
|
||||||
|
burnInto: "dead_plant",
|
||||||
|
breakInto: "dead_plant",
|
||||||
|
state: "solid",
|
||||||
|
density: 1050
|
||||||
|
}
|
||||||
|
elements.blueberry = {
|
||||||
|
color: "#5d4bc4",
|
||||||
|
behavior: [
|
||||||
|
"XX|ST:blueberry_stem,blueberry_leaves|XX",
|
||||||
|
"ST:blueberry_stem,blueberry_leaves|XX|ST:blueberry_stem,blueberry_leaves",
|
||||||
|
"M2|M1|M2",
|
||||||
|
],
|
||||||
|
reactions: {
|
||||||
|
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
||||||
|
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"mercury": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"stench": { elem2:null, chance:0.25 },
|
||||||
|
},
|
||||||
|
category:"food",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "dead_plant",
|
||||||
|
burn:15,
|
||||||
|
burnTime:60,
|
||||||
|
burnInto: "dead_plant",
|
||||||
|
breakInto: "blueberry_juice",
|
||||||
|
state: "solid",
|
||||||
|
density: 1050,
|
||||||
|
cutInto: "cut_blueberry"
|
||||||
|
}
|
||||||
|
elements.blueberry_juice = {
|
||||||
|
color: "#5030a1",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "liquids",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: ["steam","sugar"],
|
||||||
|
burn: 70,
|
||||||
|
burnTime: 300,
|
||||||
|
burnInto: ["steam", "smoke"],
|
||||||
|
state: "liquid",
|
||||||
|
density: 825,
|
||||||
|
hidden: true,
|
||||||
|
temp: 30,
|
||||||
|
tempLow: 0,
|
||||||
|
reactions: {
|
||||||
|
"sugar": { elem1:"blueberry_jam", elem2:null, chance:0.35 },
|
||||||
|
"milk": { elem1:"fruit_milk", elem2:null, chance:0.35, color1: "#995fb3" },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
elements.fruit_slushie = {
|
||||||
|
color: "#ffcc54",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
reactions: {
|
||||||
|
"dirt": { elem1: null, elem2: "mud" },
|
||||||
|
"sand": { elem1: null, elem2: "wet_sand" }
|
||||||
|
},
|
||||||
|
temp: -5,
|
||||||
|
tempHigh: 18,
|
||||||
|
tempLow: -20,
|
||||||
|
stateLow: "ice",
|
||||||
|
stateHigh: "water",
|
||||||
|
category: "food",
|
||||||
|
state: "liquid",
|
||||||
|
density: 95,
|
||||||
|
viscosity: 100,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
elements.strawberry_jam = {
|
||||||
|
color: "#c73c3e",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "food",
|
||||||
|
tempHigh: 400,
|
||||||
|
stateHigh: ["sugar","smoke"],
|
||||||
|
burn: 70,
|
||||||
|
burnTime: 300,
|
||||||
|
viscosity: 750,
|
||||||
|
state: "liquid",
|
||||||
|
density: 825,
|
||||||
|
hidden: true
|
||||||
|
};
|
||||||
|
elements.blueberry_jam = {
|
||||||
|
color: "#281C4B",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "food",
|
||||||
|
tempHigh: 400,
|
||||||
|
stateHigh: ["sugar","smoke"],
|
||||||
|
burn: 70,
|
||||||
|
burnTime: 300,
|
||||||
|
viscosity: 750,
|
||||||
|
state: "liquid",
|
||||||
|
density: 825,
|
||||||
|
hidden: true
|
||||||
|
};
|
||||||
|
elements.cut_blueberry = {
|
||||||
|
color: "#d4ed8a",
|
||||||
|
behavior: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"M2|M1|M2",
|
||||||
|
],
|
||||||
|
reactions: {
|
||||||
|
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
||||||
|
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"mercury": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"stench": { elem2:null, chance:0.25 },
|
||||||
|
},
|
||||||
|
category:"food",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "dead_plant",
|
||||||
|
burn:15,
|
||||||
|
burnTime:60,
|
||||||
|
burnInto: "dead_plant",
|
||||||
|
breakInto: "blueberry_juice",
|
||||||
|
state: "solid",
|
||||||
|
density: 1050,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!elements.yeast.reactions) elements.yeast.reactions = {};
|
||||||
|
elements.yeast.reactions.flour = { elem1: "advanced_dough", elem2: null }
|
||||||
|
|
||||||
|
elements.advanced_dough = {
|
||||||
|
color: "#c49f58",
|
||||||
|
behavior: behaviors.STURDYPOWDER,
|
||||||
|
reactions: {
|
||||||
|
"milk": { elem2:"broth", color2:"#ECC891", tempMin:70 },
|
||||||
|
"cream": { elem2:"broth", color2:"#ECC891", tempMin:70 },
|
||||||
|
},
|
||||||
|
category: "food",
|
||||||
|
tempHigh: 94,
|
||||||
|
stateHigh: "bread",
|
||||||
|
stateHighColorMultiplier: 0.9,
|
||||||
|
burn:40,
|
||||||
|
burnTime:25,
|
||||||
|
burnInto:"ash",
|
||||||
|
state: "solid",
|
||||||
|
density: 526.9,
|
||||||
|
isFood: true,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!elements.melted_chocolate.reactions) elements.melted_chocolate.reactions = {};
|
||||||
|
elements.melted_chocolate.reactions.flour = { elem1: "cookie_dough", elem2: null }
|
||||||
|
|
||||||
|
elements.cookie_dough = {
|
||||||
|
color: ["#946826","#9e783f","#8a6d41","#614925"],
|
||||||
|
behavior: behaviors.STURDYPOWDER,
|
||||||
|
category: "food",
|
||||||
|
tempHigh: 94,
|
||||||
|
stateHigh: "cookie",
|
||||||
|
stateHighColorMultiplier: 0.8,
|
||||||
|
burn:40,
|
||||||
|
burnTime:25,
|
||||||
|
burnInto:"ash",
|
||||||
|
state: "solid",
|
||||||
|
density: 526.9,
|
||||||
|
isFood: true,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.cookie = {
|
||||||
|
color: "#7d5f2e",
|
||||||
|
behavior: behaviors.STURDYPOWDER,
|
||||||
|
tempHigh: 605,
|
||||||
|
stateHigh: "ash",
|
||||||
|
category: "food",
|
||||||
|
burn: 30,
|
||||||
|
burnTime: 200,
|
||||||
|
burnInto: ["smoke","smoke","smoke","ash"],
|
||||||
|
breakInto: "crumb",
|
||||||
|
breakIntoColor: "#7d6216",
|
||||||
|
state: "solid",
|
||||||
|
density: 233.96,
|
||||||
|
isFood: true
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.nut_oil.name = "cooking_oil"
|
||||||
|
|
||||||
|
// elements.fire.temp = 130
|
||||||
|
|
||||||
|
elements.bread.behavior = behaviors.SUPPORT
|
||||||
|
|
||||||
|
elements.toast.behavior = behaviors.SUPPORT
|
||||||
|
|
||||||
|
if (!elements.caramel.reactions) elements.caramel.reactions = {};
|
||||||
|
elements.caramel.reactions.corn_starch = { elem1: "boba_dough", elem2: null, chance: 0.35, tempMin: 70}
|
||||||
|
|
||||||
|
elements.boba_dough = {
|
||||||
|
color: ["#4a2007","#2b1304"],
|
||||||
|
behavior: behaviors.STURDYPOWDER,
|
||||||
|
category: "food",
|
||||||
|
tempHigh: 400,
|
||||||
|
stateHigh: "ash",
|
||||||
|
stateHighColorMultiplier: 0.8,
|
||||||
|
burn:40,
|
||||||
|
burnTime:25,
|
||||||
|
burnInto:"ash",
|
||||||
|
state: "solid",
|
||||||
|
density: 526.9,
|
||||||
|
reactions: {
|
||||||
|
"water": { elem1:"boba", tempMin:60},
|
||||||
|
},
|
||||||
|
isFood: true,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.boba = {
|
||||||
|
color: "#59290c",
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
tempHigh: 300,
|
||||||
|
stateHigh: "fire",
|
||||||
|
category: "food",
|
||||||
|
burn: 30,
|
||||||
|
burnTime: 200,
|
||||||
|
burnInto: ["smoke","smoke","smoke","ash"],
|
||||||
|
breakIntoColor: "#7d6216",
|
||||||
|
state: "solid",
|
||||||
|
density: 644,
|
||||||
|
isFood: true
|
||||||
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,205 @@
|
||||||
|
/* Flowers And Forests
|
||||||
|
Created by Pixelegend4 and SquareScreamYT
|
||||||
|
*/
|
||||||
|
|
||||||
|
elements.nutmeg = {
|
||||||
|
color: "#b86d42",
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "land",
|
||||||
|
state: "solid",
|
||||||
|
breakInto: "nutmeg_ground",
|
||||||
|
};
|
||||||
|
|
||||||
|
elements.nutmeg_drink = {
|
||||||
|
color: "#b86d42",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
category: "land",
|
||||||
|
state: "solid",
|
||||||
|
reactions: {
|
||||||
|
"baked_batter": { elem1: "nutmeg_cake", elem2: "nutmeg_cake" },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
elements.nutmeg_cake = {
|
||||||
|
color: "#b86d42",
|
||||||
|
behavior: behaviors.SOLID,
|
||||||
|
category: "land",
|
||||||
|
state: "solid",
|
||||||
|
};
|
||||||
|
|
||||||
|
elements.nutmeg_ground = {
|
||||||
|
color: "#804d2f",
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "land",
|
||||||
|
state: "solid",
|
||||||
|
reactions: {
|
||||||
|
"water": { elem1: "nutmeg_drink", elem2: "nutmeg_drink" },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
elements.cactus = {
|
||||||
|
color: "#35ff08",
|
||||||
|
behavior: behaviors.SOLID,
|
||||||
|
category: "land",
|
||||||
|
state: "solid",
|
||||||
|
reactions: {
|
||||||
|
"human": { elem1: "blood", elem2: "blood" },
|
||||||
|
"fly": { elem1: "blood", elem2: "blood" },
|
||||||
|
"bee": { elem1: "honey", elem2: "honey" },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
elements.blue_cactus = {
|
||||||
|
color: "#0033FF",
|
||||||
|
behavior: behaviors.SOLID,
|
||||||
|
category: "land",
|
||||||
|
state: "solid",
|
||||||
|
reactions: {
|
||||||
|
"human": { elem1: null, elem2: "blood" },
|
||||||
|
"fly": { elem1: null, elem2: "blood" },
|
||||||
|
"bee": { elem1: null, elem2: "honey" },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
elements.sycamore_wood = {
|
||||||
|
color: "#632e1f",
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
tempHigh: 400,
|
||||||
|
stateHigh: ["ember","charcoal","fire","fire","fire"],
|
||||||
|
category: "solids",
|
||||||
|
burn: 5,
|
||||||
|
burnTime: 300,
|
||||||
|
burnInto: ["ember","charcoal","fire"],
|
||||||
|
state: "solid",
|
||||||
|
hardness: 0.15,
|
||||||
|
breakInto: "sawdust",
|
||||||
|
breakIntoColor: ["#dba66e","#cc8a64"],
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
elements.sycamore_branch = {
|
||||||
|
color: "#632e1f",
|
||||||
|
behavior: [
|
||||||
|
"CR:sycamore_leaves,sycamore_branch%2|CR:sycamore_leaves,sycamore_branch%2|CR:sycamore_leaves,sycamore_branch%2",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "sycamore_wood",
|
||||||
|
tempLow: -30,
|
||||||
|
stateLow: "sycamore_wood",
|
||||||
|
category: "life",
|
||||||
|
burn: 40,
|
||||||
|
burnTime: 50,
|
||||||
|
burnInto: ["sap","ember","charcoal"],
|
||||||
|
hidden: true,
|
||||||
|
state: "solid",
|
||||||
|
density: 1500,
|
||||||
|
hardness: 0.15,
|
||||||
|
breakInto: ["sap","sawdust"],
|
||||||
|
};
|
||||||
|
elements.sycamore_leaves = {
|
||||||
|
color: ["#00d404","#0ec911","#109e12"],
|
||||||
|
behavior: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
reactions: {
|
||||||
|
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
|
||||||
|
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
|
||||||
|
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
|
||||||
|
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }
|
||||||
|
},
|
||||||
|
category:"life",
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "dead_plant",
|
||||||
|
tempLow: -1.66,
|
||||||
|
stateLow: "frozen_plant",
|
||||||
|
burn:65,
|
||||||
|
burnTime:60,
|
||||||
|
burnInto: "dead_plant",
|
||||||
|
breakInto: "dead_plant",
|
||||||
|
state: "solid",
|
||||||
|
density: 1050,
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.sycamore_seed = {
|
||||||
|
color: "#854610",
|
||||||
|
tick: function(pixel) {
|
||||||
|
if (isEmpty(pixel.x,pixel.y+1)) {
|
||||||
|
movePixel(pixel,pixel.x,pixel.y+1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (Math.random() < 0.02 && pixel.age > 50 && pixel.temp < 100) {
|
||||||
|
if (!outOfBounds(pixel.x,pixel.y+1)) {
|
||||||
|
var dirtPixel = pixelMap[pixel.x][pixel.y+1];
|
||||||
|
if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") {
|
||||||
|
changePixel(dirtPixel,"root");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isEmpty(pixel.x,pixel.y-1)) {
|
||||||
|
movePixel(pixel,pixel.x,pixel.y-1);
|
||||||
|
createPixel(Math.random() > 0.5 ? "sycamore_wood" : "sycamore_branch",pixel.x,pixel.y+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (pixel.age > 1000) {
|
||||||
|
changePixel(pixel,"sycamore_wood");
|
||||||
|
}
|
||||||
|
pixel.age++;
|
||||||
|
}
|
||||||
|
doDefaults(pixel);
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
"age":0
|
||||||
|
},
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "dead_plant",
|
||||||
|
tempLow: -2,
|
||||||
|
stateLow: "frozen_plant",
|
||||||
|
burn: 65,
|
||||||
|
burnTime: 15,
|
||||||
|
category: "life",
|
||||||
|
state: "solid",
|
||||||
|
density: 1500,
|
||||||
|
cooldown: defaultCooldown,
|
||||||
|
seed: true,
|
||||||
|
behavior: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|FX%10|XX",
|
||||||
|
"XX|M1|XX",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
worldgentypes.fields = {
|
||||||
|
layers: [
|
||||||
|
[0.75, "dirt"],
|
||||||
|
[0.05, "rock"],
|
||||||
|
[0, "basalt"],
|
||||||
|
],
|
||||||
|
decor: [
|
||||||
|
["sapling", 0.04, 20],
|
||||||
|
["grass", 0.25, 30],
|
||||||
|
["grass", 0.25, 30],
|
||||||
|
["bee", 0.02, 25],
|
||||||
|
["cloud", 1, 2],
|
||||||
|
],
|
||||||
|
baseHeight: 0.25
|
||||||
|
}
|
||||||
|
|
||||||
|
worldgentypes.sycamore_forest = {
|
||||||
|
layers: [
|
||||||
|
[0.75, "dirt"],
|
||||||
|
[0.05, "dirt"],
|
||||||
|
],
|
||||||
|
decor: [
|
||||||
|
["sycamore_seed", 0.04, 20],
|
||||||
|
["sycamore_seed", 0.10, 20],
|
||||||
|
["sycamore_seed", 0.13, 20],
|
||||||
|
["grass", 0.25, 30],
|
||||||
|
["cloud", 1, 2],
|
||||||
|
],
|
||||||
|
baseHeight: 0.25
|
||||||
|
};
|
||||||
|
elements.onion = {
|
||||||
|
color: "#f5b042",
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
category: "land",
|
||||||
|
state: "solid",
|
||||||
|
};
|
||||||
104
mods/heatglow.js
104
mods/heatglow.js
|
|
@ -52,53 +52,57 @@ elements.color_baker = {
|
||||||
excludeRandom: true,
|
excludeRandom: true,
|
||||||
desc: "Use to bake a metals paint color into its 'true' color, for heating purposes.",
|
desc: "Use to bake a metals paint color into its 'true' color, for heating purposes.",
|
||||||
}
|
}
|
||||||
//const plantfunc = function(pixel){
|
/*
|
||||||
// if (pixel.ogR == null || pixel.ogG == null || pixel.ogB == null){
|
function weightedAverage(num1, num2, weight){
|
||||||
// pixel.ogR = parseInt(pixel.color.slice(4, pixel.color.indexOf(',')), 10)
|
return ((weight * num1)+((1-weight)*num2))
|
||||||
// pixel.ogG = parseInt(pixel.color.slice(pixel.color.indexOf(',') + 1, pixel.color.lastIndexOf(',')), 10)
|
}
|
||||||
// pixel.ogB = parseInt(pixel.color.slice(pixel.color.lastIndexOf(',') + 1, -1), 10)
|
const plantfunc = function(pixel){
|
||||||
// pixel.deadR = 130;
|
if (pixel.ogR == null || pixel.ogG == null || pixel.ogB == null){
|
||||||
// pixel.deadG = 103;
|
pixel.ogR = parseInt(pixel.color.slice(4, pixel.color.indexOf(',')), 10)
|
||||||
// pixel.deadB = 40;
|
pixel.ogG = parseInt(pixel.color.slice(pixel.color.indexOf(',') + 1, pixel.color.lastIndexOf(',')), 10)
|
||||||
// pixel.burnR = 30;
|
pixel.ogB = parseInt(pixel.color.slice(pixel.color.lastIndexOf(',') + 1, -1), 10)
|
||||||
// pixel.burnG = 30;
|
var deadR = 130;
|
||||||
// pixel.burnB = 30;
|
var deadG = 103;
|
||||||
// }else{
|
var deadB = 40;
|
||||||
// pixel.gethigh = (elements[pixel.element].tempHigh)
|
var burnR = 30;
|
||||||
// pixel.halftemp = ((20+pixel.gethigh)/2)
|
var burnG = 30;
|
||||||
// if (pixel.temp <= (pixel.gethigh) - pixel.halftemp){
|
var burnB = 30;
|
||||||
// pixel.ctemp = 0;
|
var newR = pixel.ogR;
|
||||||
// pixel.twoctemp = 0,
|
var newG = pixel.ogG;
|
||||||
// pixel.littlectemp = 1;
|
var newB = pixel.ogB;
|
||||||
// } else if (pixel.temp > (pixel.gethigh)-pixel.halftemp && pixel.temp <= pixel.gethigh){
|
}else{
|
||||||
// pixel.ctemp = ((1/pixel.halftemp)*pixel.temp)-(((pixel.gethigh)-pixel.halftemp)/pixel.halftemp);
|
var gethigh = (elements[pixel.element].tempHigh)
|
||||||
// pixel.twoctemp = pixel.ctemp*2;
|
var halftemp = ((20+gethigh)/2)
|
||||||
// pixel.littlectemp = 2*(1-(pixel.ctemp));
|
if (pixel.temp > halftemp){
|
||||||
// }
|
var ctemp = ((1/halftemp)*pixel.temp)-(((gethigh)-halftemp)/halftemp);
|
||||||
// if (pixel.ctemp <= 0.5){
|
} else (ctemp = 0)
|
||||||
// pixel.newR = ((pixel.twoctemp*pixel.deadR)+(pixel.littlectemp*pixel.ogR)/(pixel.twoctemp+pixel.littlectemp));
|
if (ctemp <= 0.5 && ctemp > 0){
|
||||||
// pixel.newG = ((pixel.twoctemp*pixel.deadG)+(pixel.littlectemp*pixel.ogG)/(pixel.twoctemp+pixel.littlectemp));
|
newR = weightedAverage(deadR, pixel.ogR, 2*ctemp);
|
||||||
// pixel.newB = ((pixel.twoctemp*pixel.deadB)+(pixel.littlectemp*pixel.ogB)/(pixel.twoctemp+pixel.littlectemp));
|
newG = weightedAverage(deadG, pixel.ogG, 2*ctemp);
|
||||||
// }else if (pixel.ctemp > 0.5){
|
newB = weightedAverage(deadB, pixel.ogB, 2*ctemp);
|
||||||
// pixel.newR = (((pixel.twoctemp*pixel.deadR)+(pixel.littlectemp*pixel.burnR))/(pixel.twoctemp*pixel.littlectemp));
|
}else if (ctemp > 0.5){
|
||||||
// pixel.newG = (((pixel.twoctemp*pixel.deadG)+(pixel.littlectemp*pixel.burnG))/(pixel.twoctemp*pixel.littlectemp));
|
var modctemp = 2*(ctemp%0.5)
|
||||||
// pixel.newB= (((pixel.twoctemp*pixel.deadB)+(pixel.littlectemp*pixel.burnB))/(pixel.twoctemp*pixel.littlectemp));
|
newR = weightedAverage(burnR, deadR, 2*modctemp);
|
||||||
// }
|
newG = weightedAverage(burnG, deadG, 2*modctemp);
|
||||||
// pixel.color = "rgb(" + pixel.newR + "," + pixel.newG + "," + pixel.newB + ")";
|
newB = weightedAverage(burnB, deadB, 2*modctemp);
|
||||||
// }
|
}
|
||||||
// };
|
if (!ctemp == 0){
|
||||||
// if (!eLists.burnplants) { eLists.burnplants = [] }
|
pixel.color = "rgb(" + newR + "," + newG + "," + newB + ")";
|
||||||
// eLists.burnplants = eLists.burnplants.concat(["plant","dead_plant","grass","algae","sapling","evergreen","cactus","seeds","grass_seed","wheat_seed","flower_seed","pistil","petal","tree_branch","bamboo_plant","mushroom_spore","mushroom_stalk","mushroom_gill","mushroom_cap","hyphae","pumpkin_seed","pumpkin","corn","corn_seed","potato","potato_seed","root"])
|
} else {pixel.color = "rgb(" + pixel.ogR + "," + pixel.ogG + "," + pixel.ogB + ")"}
|
||||||
//eLists.burnplants.forEach(plant => {
|
}
|
||||||
// const prefunc = elements[plant].tick;
|
};
|
||||||
// if (!prefunc){
|
if (!eLists.burnplants) { eLists.burnplants = [] }
|
||||||
// elements[plant].tick = plantfunc;
|
eLists.burnplants = eLists.burnplants.concat(["plant","dead_plant","grass","algae","sapling","evergreen","cactus","seeds","grass_seed","wheat_seed","flower_seed","pistil","petal","tree_branch","bamboo_plant","mushroom_spore","mushroom_stalk","mushroom_gill","mushroom_cap","hyphae","pumpkin_seed","pumpkin","corn","corn_seed","potato","potato_seed","root"])
|
||||||
// }else{
|
eLists.burnplants.forEach(plant => {
|
||||||
// const modfunc = function(pixel){
|
const prefunc = elements[plant].tick;
|
||||||
// prefunc(pixel);
|
if (!prefunc){
|
||||||
// plantfunc(pixel);
|
elements[plant].tick = plantfunc;
|
||||||
// };
|
}else{
|
||||||
// elements[plant].tick = modfunc;
|
const modfunc = function(pixel){
|
||||||
// }
|
prefunc(pixel);
|
||||||
//});
|
plantfunc(pixel);
|
||||||
|
};
|
||||||
|
elements[plant].tick = modfunc;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
@ -1613,11 +1613,7 @@ elements.molten_bismuth = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
changePixel(pixel, "bismuth")
|
changePixel(pixel, "bismuth")
|
||||||
if (1 == 1){
|
var rgbResult = HSVtoRGB(pixel.tHue + 0.08, 0.5, 0.9);
|
||||||
var rgbResult = HSVtoRGB(pixel.tHue + 0.02, 0.8, 0.8);
|
|
||||||
} else {
|
|
||||||
var rgbResult = HSVtoRGB(pixel.tHue, 0.8, 0.8);
|
|
||||||
}
|
|
||||||
const hexR = rgbResult.r.toString(16).padStart(2, '0');
|
const hexR = rgbResult.r.toString(16).padStart(2, '0');
|
||||||
const hexG = rgbResult.g.toString(16).padStart(2, '0');
|
const hexG = rgbResult.g.toString(16).padStart(2, '0');
|
||||||
const hexB = rgbResult.b.toString(16).padStart(2, '0');
|
const hexB = rgbResult.b.toString(16).padStart(2, '0');
|
||||||
|
|
@ -2010,6 +2006,7 @@ elemfillerVar = 0;
|
||||||
elements.element_filler = {
|
elements.element_filler = {
|
||||||
category: "special",
|
category: "special",
|
||||||
color: elements.filler.color,
|
color: elements.filler.color,
|
||||||
|
excludeRandom: true,
|
||||||
state: "solid",
|
state: "solid",
|
||||||
movable: "false",
|
movable: "false",
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
|
|
@ -2039,4 +2036,59 @@ elements.element_filler = {
|
||||||
changePixel(pixel, pixel.changeElem)
|
changePixel(pixel, pixel.changeElem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var outlinerVar = 0
|
||||||
|
elements.outliner = {
|
||||||
|
color: elements.filler.color,
|
||||||
|
category: elements.filler.category,
|
||||||
|
excludeRandom: true,
|
||||||
|
onSelect: function() {
|
||||||
|
var answerot = prompt("Please input the desired element of this outliner. It will not work if you do multiple filter types while paused.",(outlinerVar||undefined));
|
||||||
|
if (!answerot) { return }
|
||||||
|
outlinerVar = mostSimilarElement(answerot);
|
||||||
|
},
|
||||||
|
tick: function(pixel){
|
||||||
|
var neighbors = 0;
|
||||||
|
if(!pixel.changeElem){
|
||||||
|
pixel.changeElem = outlinerVar;
|
||||||
|
if (pixel.nDelete == undefined){
|
||||||
|
pixel.nDelete = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pixel.nDelete){
|
||||||
|
deletePixel(pixel.x, pixel.y)
|
||||||
|
}
|
||||||
|
for (var i = 0; i < squareCoords.length; i++) {
|
||||||
|
var coord = squareCoords[i];
|
||||||
|
var x = pixel.x+coord[0];
|
||||||
|
var y = pixel.y+coord[1];
|
||||||
|
if (!isEmpty(x,y, true)) {
|
||||||
|
neighbors = neighbors + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (neighbors >= 8){
|
||||||
|
pixel.nDelete = true
|
||||||
|
} else {
|
||||||
|
changePixel(pixel, pixel.changeElem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
textures.transparency = [
|
||||||
|
"wwwggg",
|
||||||
|
"wwwggg",
|
||||||
|
"wwwggg",
|
||||||
|
"gggwww",
|
||||||
|
"gggwww",
|
||||||
|
"gggwww"
|
||||||
|
]
|
||||||
|
elements.transparency = {
|
||||||
|
color: ["#d4d4d4", "#ffffff"],
|
||||||
|
colorPattern: textures.transparency,
|
||||||
|
colorKey: {
|
||||||
|
"g": "#D4D4D4",
|
||||||
|
"w": "#ffffff"
|
||||||
|
},
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
category: "special",
|
||||||
|
state: "solid"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
window.addEventListener('load', function() {
|
||||||
|
console.log("attempted override")
|
||||||
|
pixelColorPick = function(pixel,customColor=null) {
|
||||||
|
var element = pixel.element;
|
||||||
|
var elementInfo = elements[element];
|
||||||
|
//if (elementInfo.behavior instanceof Array) {
|
||||||
|
|
||||||
|
if (pixel.charge && elementInfo.colorOn) {
|
||||||
|
customColor = elementInfo.colorOn;
|
||||||
|
}
|
||||||
|
if (customColor != null) {
|
||||||
|
if (Array.isArray(customColor)) {
|
||||||
|
customColor = customColor[0];
|
||||||
|
}
|
||||||
|
if (customColor.startsWith("#")) {
|
||||||
|
customColor = hexToRGB(customColor);
|
||||||
|
}
|
||||||
|
var rgb = customColor;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var rgb = elements[element].colorObject; // {r, g, b}
|
||||||
|
// If rgb is an array, choose a random item
|
||||||
|
if (Array.isArray(rgb)) {
|
||||||
|
rgb = rgb[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Randomly darken or lighten the RGB color
|
||||||
|
var coloroffset = Math.floor(Math.random() * (Math.random() > 0.5 ? -1 : 1) * Math.random() * 15);
|
||||||
|
var r = rgb.r + 0;
|
||||||
|
var g = rgb.g + 0;
|
||||||
|
var b = rgb.b + 0;
|
||||||
|
// Make sure the color is within the RGB range
|
||||||
|
r = Math.max(0, Math.min(255, r));
|
||||||
|
g = Math.max(0, Math.min(255, g));
|
||||||
|
b = Math.max(0, Math.min(255, b));
|
||||||
|
var color = "rgb("+r+","+g+","+b+")";
|
||||||
|
|
||||||
|
/*}
|
||||||
|
else {
|
||||||
|
var color = elementInfo.color;
|
||||||
|
if (Array.isArray(color)) {
|
||||||
|
color = color[Math.floor(Math.random() * color.length)];
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
for (var element in elements) {
|
||||||
|
elements[element].singleColor = true;
|
||||||
|
}
|
||||||
|
|
@ -96,4 +96,67 @@ elements.right_missile = {
|
||||||
category: "weapons",
|
category: "weapons",
|
||||||
state: "solid",
|
state: "solid",
|
||||||
density: 1300,
|
density: 1300,
|
||||||
|
},
|
||||||
|
elements.RL_cluster_munition = {
|
||||||
|
color: "#444444",
|
||||||
|
behavior: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"CRcluster%20|XX|CR:cluster%20",
|
||||||
|
"M2|M1|M2",
|
||||||
|
],
|
||||||
|
category: "weapons",
|
||||||
|
state: "solid",
|
||||||
|
density: 1300,
|
||||||
|
},
|
||||||
|
elements.cluster = {
|
||||||
|
color: "#444444",
|
||||||
|
behavior: [
|
||||||
|
"XX|EX:10%10|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
"M2|M1 AND EX:10%10|M2",
|
||||||
|
],
|
||||||
|
category: "weapons",
|
||||||
|
state: "solid",
|
||||||
|
density: 1300,
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
elements.machine_gun_left = {
|
||||||
|
color: "#C0C0C0",
|
||||||
|
behavior: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"CR:left_bullet|XX|XX",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
category: "weapons",
|
||||||
|
state: "solid",
|
||||||
|
density: 1300,
|
||||||
|
},
|
||||||
|
elements.machine_gun_right = {
|
||||||
|
color: "#C0C0C0",
|
||||||
|
behavior: [
|
||||||
|
"XX|XX|XX",
|
||||||
|
"XX|XX|CR:right_bullet",
|
||||||
|
"XX|XX|XX",
|
||||||
|
],
|
||||||
|
category: "weapons",
|
||||||
|
state: "solid",
|
||||||
|
density: 1300,
|
||||||
|
},
|
||||||
|
elements.left_bullet = {
|
||||||
|
color: "#4c4e42",
|
||||||
|
behavior: [
|
||||||
|
"M2|XX|XX",
|
||||||
|
"M1 AND EX:5|XX|XX",
|
||||||
|
"M2|XX|XX",
|
||||||
|
],
|
||||||
|
category:"weapons",
|
||||||
|
},
|
||||||
|
elements.right_bullet = {
|
||||||
|
color: "#4c4e42",
|
||||||
|
behavior: [
|
||||||
|
"XX|XX|M2",
|
||||||
|
"XX|XX|M1 AND EX:5",
|
||||||
|
"XX|XX|M2",
|
||||||
|
],
|
||||||
|
category:"weapons",
|
||||||
};
|
};
|
||||||
Loading…
Reference in New Issue