Merge branch 'R74nCom:main' into main
This commit is contained in:
commit
db1caa38c5
|
|
@ -1 +1,10 @@
|
|||
Contributions to the main index.html file will be ignored. Use this repository to officially publish your Sandboxels mods.
|
||||
|
||||
Rules for publishing mods:
|
||||
1. Must not focus on something NSFW or illegal.
|
||||
2. Must be tested beforehand on your own. This repo does not accept mods for the sole purpose of you testing them.
|
||||
3. Must contain some meaningful content.
|
||||
|
||||
Failure to follow these rules may result in your pull request being ignored!
|
||||
|
||||
Learn more about [submitting your mod](https://sandboxels.wiki.gg/wiki/Modding_tutorial#Putting_it_online).
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
Controls for Sandboxels are listed underneath [the game](https://sandboxels.R74n.com).
|
||||
|
||||
Join our [Discord server](https://discord.gg/ejUc6YPQuS) for support, suggestions, or bug reports.
|
||||
Use the [feedback form](https://sandboxels.r74n.com/feedback) linked under the game for suggestions or bug reports. You can also join our [Discord server](https://discord.gg/ejUc6YPQuS) for support and everything else.
|
||||
|
||||
You can also report issues on this GitHub repository [here](https://github.com/R74nCom/sandboxels/issues).
|
||||
This isn't preferred, but you can also report issues on this GitHub repository [here](https://github.com/R74nCom/sandboxels/issues).
|
||||
|
||||
For help with creating mods, there's a channel on the Discord for that!
|
||||
For help with creating mods, read the [Modding Tutorial](https://sandboxels.wiki.gg/wiki/Modding_tutorial).
|
||||
|
||||
For help with specific mods, the mod's creator is likely in the Discord. Ask around and you'll be directed to them.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Created by SquareScreamYT <@918475812884344852> and RealerRaddler <@914371295561535508>
|
||||
Thanks to Alice <@697799964985786450>, nousernamefound <@316383921346707468>, Adora the Transfem <@778753696804765696> and Fioushemastor <@738828785482203189> for helping :)
|
||||
|
||||
v1.6
|
||||
v1.7
|
||||
|
||||
me trying to come up with stuff not in plants.js:
|
||||
|
||||
|
|
@ -18,13 +18,11 @@ Upcoming Features:
|
|||
- stainless steel
|
||||
- chili
|
||||
- pepper plants
|
||||
- pineapples
|
||||
- mint
|
||||
- vanilla
|
||||
- cocoa beans and hot chocolate
|
||||
- normal cookies and cookie dough
|
||||
- cows and beef
|
||||
- mangoes and passionfruits
|
||||
- celery
|
||||
- marshmallows, normal, cooked and burnt
|
||||
- broccoli
|
||||
|
|
@ -251,6 +249,20 @@ Changelog (v1.6)
|
|||
|
||||
|
||||
|
||||
Changelog (v1.7)
|
||||
- added chocolate chips
|
||||
- added sprinkles
|
||||
- added banana milk (yellow fruit milk)
|
||||
- added passion fruits
|
||||
- added passion fruit vines and seeds (new climbing vines feature!)
|
||||
- added mangoes
|
||||
- added mango juice
|
||||
- added mango wood, branch, leaves and seeds
|
||||
- added pineapples
|
||||
- added pineapple leaves, seed and juice
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
|
@ -603,10 +615,10 @@ elements.raw_chicken = {
|
|||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
burnInto: "cook_chicken",
|
||||
burnInto: "cooked_chicken",
|
||||
temp:25,
|
||||
tempHigh: 600,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
stateHigh: ["cooked_chicken"],
|
||||
reactions: {
|
||||
"batter": { elem1: "battered_raw_chicken", elem2: null },
|
||||
"smoke": {elem1: "smoked_chicken"},
|
||||
|
|
@ -1584,6 +1596,7 @@ elements.cooked_salmon = {
|
|||
tempHigh: 600,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
isFood: true,
|
||||
hidden: true,
|
||||
}
|
||||
|
||||
elements.smoked_salmon = {
|
||||
|
|
@ -1594,6 +1607,7 @@ elements.smoked_salmon = {
|
|||
temp:55,
|
||||
tempHigh: 600,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
hidden: true,
|
||||
isFood: true,
|
||||
}
|
||||
|
||||
|
|
@ -1604,6 +1618,7 @@ elements.steamed_salmon = {
|
|||
state: "solid",
|
||||
temp:60,
|
||||
tempHigh: 600,
|
||||
hidden: true,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
isFood: true,
|
||||
}
|
||||
|
|
@ -1615,6 +1630,7 @@ elements.boiled_salmon = {
|
|||
state: "solid",
|
||||
temp:70,
|
||||
tempHigh: 600,
|
||||
hidden: true,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
isFood: true,
|
||||
}
|
||||
|
|
@ -1626,6 +1642,7 @@ elements.fried_salmon = {
|
|||
state: "solid",
|
||||
temp:70,
|
||||
tempHigh: 600,
|
||||
hidden: true,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
isFood: true,
|
||||
}
|
||||
|
|
@ -1653,6 +1670,7 @@ elements.cooked_tuna = {
|
|||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
hidden: true,
|
||||
temp:50,
|
||||
tempHigh: 600,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
|
|
@ -1666,6 +1684,7 @@ elements.smoked_tuna = {
|
|||
state: "solid",
|
||||
temp:55,
|
||||
tempHigh: 600,
|
||||
hidden: true,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
isFood: true,
|
||||
}
|
||||
|
|
@ -1677,6 +1696,7 @@ elements.steamed_tuna = {
|
|||
state: "solid",
|
||||
temp:60,
|
||||
tempHigh: 600,
|
||||
hidden: true,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
isFood: true,
|
||||
}
|
||||
|
|
@ -1686,6 +1706,7 @@ elements.boiled_tuna = {
|
|||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
hidden: true,
|
||||
temp:70,
|
||||
tempHigh: 600,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
|
|
@ -1697,6 +1718,7 @@ elements.fried_tuna = {
|
|||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
hidden: true,
|
||||
temp:70,
|
||||
tempHigh: 600,
|
||||
stateHigh: ["ash", "smoke"],
|
||||
|
|
@ -4176,6 +4198,7 @@ elements.cut_banana = {
|
|||
breakInto: "banana_juice",
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
hidden: true
|
||||
}
|
||||
elements.banana_juice = {
|
||||
color: "#dbc440",
|
||||
|
|
@ -4200,6 +4223,9 @@ elements.banana_juice = {
|
|||
},
|
||||
reactions: {
|
||||
"bread": { elem1:"banana_bread", elem2:null, chance:0.35 },
|
||||
"milk": { elem1: "fruit_milk", elem2: "fruit_milk", chance: 0.35, color1:"#ede59a", color2:"#ede59a"},
|
||||
"coconut_milk": { elem1: "fruit_milk", elem2: "fruit_milk", chance: 0.35, color1:"#ede59a", color2:"#ede59a"},
|
||||
"nut_milk": { elem1: "fruit_milk", elem2: "fruit_milk", chance: 0.35, color1:"#ede59a", color2:"#ede59a"}
|
||||
},
|
||||
tempLow: 0
|
||||
};
|
||||
|
|
@ -4220,3 +4246,514 @@ elements.banana_bread = {
|
|||
density: 233.96,
|
||||
isFood: true
|
||||
}
|
||||
elements.sprinkles = {
|
||||
color: ["#eb726a", "#ebca6a", "#88eb6a", "#6aaceb", "#eb6ade"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
desc: "colorful edible sand",
|
||||
hidden: false,
|
||||
isFood: true,
|
||||
burn: 30,
|
||||
burnTime: 200,
|
||||
burnInto: ["smoke","smoke","smoke","ash"],
|
||||
breakInto: "sugar",
|
||||
breakIntoColor: ["#fb827a", "#fbda7a", "#98fb7a", "#7abcfb", "#fb7aee"],
|
||||
tempHigh: 176,
|
||||
stateHigh: "caramel",
|
||||
density: 277,
|
||||
cooldown: 2
|
||||
}
|
||||
elements.chocolate_chips = {
|
||||
color: "#6e4c1d",
|
||||
behavior: behaviors.POWDER,
|
||||
tempHigh: 31,
|
||||
stateHigh: "melted_chocolate",
|
||||
category: "food",
|
||||
state: "solid",
|
||||
density: 1325,
|
||||
isFood: true,
|
||||
desc: "chocolate chips yum",
|
||||
cooldown: 2
|
||||
}
|
||||
elements.chocolate.breakInto = "chocolate_chips"
|
||||
//elements.fruit_milk.stateLowColorMultiplier = 0.9
|
||||
|
||||
elements.passion_fruit_vine = {
|
||||
color: "#00df00",
|
||||
behavior: [
|
||||
"ST:wood|ST:wood|ST:wood",
|
||||
"ST:wood AND CR:passion_fruit%0.02|XX|ST:wood AND CR:passion_fruit%0.02",
|
||||
"ST:wood|ST:wood AND M1|ST:wood",
|
||||
],
|
||||
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 },
|
||||
"carbon_dioxide": { elem2:"oxygen", chance:0.25 },
|
||||
},
|
||||
category:"life",
|
||||
tempHigh: 100,
|
||||
stateHigh: "dead_plant",
|
||||
tempLow: -1.66,
|
||||
stateLow: "frozen_plant",
|
||||
burn:15,
|
||||
burnTime:60,
|
||||
burnInto: "dead_plant",
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
breakInto: "dead_plant"
|
||||
}
|
||||
elements.passion_fruit_seed = {
|
||||
color: "#6b4f36",
|
||||
tick: function(pixel) {
|
||||
if (Math.random() < 0.1 && 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)) {
|
||||
if (!isEmpty(pixel.x+1,pixel.y-1) || !isEmpty(pixel.x-1,pixel.y-1)) {
|
||||
movePixel(pixel,pixel.x,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x,pixel.y+1);
|
||||
}
|
||||
}
|
||||
if (!isEmpty(pixel.x+2,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1)) {
|
||||
movePixel(pixel,pixel.x+1,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x-1,pixel.y+1);
|
||||
}
|
||||
if (!isEmpty(pixel.x-2,pixel.y-1) && isEmpty(pixel.x-1,pixel.y-1)) {
|
||||
movePixel(pixel,pixel.x-1,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x+1,pixel.y+1);
|
||||
}
|
||||
if (!isEmpty(pixel.x,pixel.y-1) && !isEmpty(pixel.x+1,pixel.y) && isEmpty(pixel.x+1,pixel.y-1)) {
|
||||
movePixel(pixel,pixel.x+1,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x-1,pixel.y+1);
|
||||
}
|
||||
if (!isEmpty(pixel.x,pixel.y-1) && !isEmpty(pixel.x-1,pixel.y) && isEmpty(pixel.x-1,pixel.y-1)) {
|
||||
movePixel(pixel,pixel.x-1,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x+1,pixel.y+1);
|
||||
}
|
||||
/*if (pixelMap[pixel.x+1][pixel.y-1].element !== "wood" && pixelMap[pixel.x-1][pixel.y-1].element !== "wood") {
|
||||
movePixel(pixel,pixel.x,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x,pixel.y+1);
|
||||
if (isEmpty(pixel.x+1,pixel.y-1) && pixelMap[pixel.x+2][pixel.y-1].element === "wood") {
|
||||
movePixel(pixel,pixel.x+1,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x-1,pixel.y+1);
|
||||
}
|
||||
if (isEmpty(pixel.x-1,pixel.y-1) && pixelMap[pixel.x-2][pixel.y-1].element === "wood") {
|
||||
movePixel(pixel,pixel.x-1,pixel.y-1);
|
||||
createPixel("passion_fruit_vine",pixel.x+1,pixel.y+1);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (pixel.age > 400 && Math.random() < 0.1) {
|
||||
changePixel(pixel,"passion_fruit_vine");
|
||||
}
|
||||
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: [
|
||||
"ST:wood,passion_fruit_vine|ST:wood,passion_fruit_vine|ST:wood,passion_fruit_vine",
|
||||
"ST:wood,passion_fruit_vine|XX|ST:wood,passion_fruit_vine",
|
||||
"ST:wood,passion_fruit_vine|M1|ST:wood,passion_fruit_vine",
|
||||
],
|
||||
};
|
||||
|
||||
elements.passion_fruit = {
|
||||
color: "#78236f",
|
||||
behavior: [
|
||||
"ST:passion_fruit_vine%95|ST:passion_fruit_vine%95|ST:passion_fruit_vine%95",
|
||||
"ST:passion_fruit_vine%95|XX|ST:passion_fruit_vine%95",
|
||||
"ST:passion_fruit_vine%95|M1|ST:passion_fruit_vine%95",
|
||||
],
|
||||
category:"food",
|
||||
tempHigh: 100,
|
||||
stateHigh: "dead_plant",
|
||||
burn:65,
|
||||
burnTime:60,
|
||||
burnInto: "dead_plant",
|
||||
breakInto: ["passion_fruit_juice","passion_fruit_juice",/*"passion_fruit_seed"*/],
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
cutInto: "passion_fruit_flesh",
|
||||
temp:20
|
||||
}
|
||||
elements.passion_fruit_flesh = {
|
||||
color: "#ffe205",
|
||||
behavior: behaviors.LIQUID,
|
||||
category:"food",
|
||||
tempHigh: 100,
|
||||
stateHigh: "dead_plant",
|
||||
burn:65,
|
||||
burnTime:60,
|
||||
viscosity: 999,
|
||||
burnInto: "dead_plant",
|
||||
breakInto: ["passion_fruit_juice","passion_fruit_juice",/*"passion_fruit_seed"*/],
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
hidden: true,
|
||||
temp: 20
|
||||
}
|
||||
elements.passion_fruit_juice = {
|
||||
color: "#d6bf2b",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
tempHigh: 100,
|
||||
stateHigh: ["steam","sugar"],
|
||||
burn: 70,
|
||||
burnTime: 300,
|
||||
burnInto: ["steam", "smoke"],
|
||||
state: "liquid",
|
||||
density: 825,
|
||||
hidden: true,
|
||||
temp: 20,
|
||||
onMix: function(pixel) {
|
||||
if (shiftDown) {
|
||||
if (Math.random() < 0.2) {
|
||||
changePixel(pixel,"juice")
|
||||
pixel.color = pixelColorPick(pixel,"#d6bf2b")
|
||||
}
|
||||
}
|
||||
},
|
||||
tempLow: 0
|
||||
};
|
||||
eLists.JUICEMIXABLE.push("passion_fruit_juice");
|
||||
|
||||
elements.mango_wood = {
|
||||
color: "#966435",
|
||||
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.mango_branch = {
|
||||
color: "#966435",
|
||||
behavior: [
|
||||
"CR:mango_leaves,mango_branch%2|CR:mango_leaves,mango_branch%2|CR:mango_leaves,mango_branch%2",
|
||||
"XX|XX|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
tempHigh: 100,
|
||||
stateHigh: "mango_wood",
|
||||
tempLow: -30,
|
||||
stateLow: "mango_wood",
|
||||
category: "life",
|
||||
burn: 40,
|
||||
burnTime: 50,
|
||||
burnInto: ["sap","ember","charcoal"],
|
||||
hidden: true,
|
||||
state: "solid",
|
||||
density: 1500,
|
||||
hardness: 0.15,
|
||||
breakInto: ["sap","sawdust"],
|
||||
}
|
||||
elements.mango_leaves = {
|
||||
color: ["#61b535","#5fba2f"],
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|XX",
|
||||
"XX|CR:mango%0.1|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.mango = {
|
||||
color: ["#cc5b3f","#cc8a3f","#ccb93f","#abcc3f"],
|
||||
behavior: behaviors.POWDER,
|
||||
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:"food",
|
||||
tempHigh: 100,
|
||||
stateHigh: "dead_plant",
|
||||
burn:65,
|
||||
burnTime:60,
|
||||
burnInto: "dead_plant",
|
||||
breakInto: "mango_juice",
|
||||
cutInto: "cut_mango",
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
}
|
||||
|
||||
elements.cut_mango = {
|
||||
color: "#ebcb2d",
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category:"food",
|
||||
tempHigh: 100,
|
||||
stateHigh: ["sugar","steam"],
|
||||
burn:65,
|
||||
burnTime:60,
|
||||
burnInto: "dead_plant",
|
||||
breakInto: "mango_juice",
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
hidden: true,
|
||||
}
|
||||
|
||||
elements.mango_seed = {
|
||||
color: "#9e8951",
|
||||
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 ? "mango_wood" : "mango_branch",pixel.x,pixel.y+1);
|
||||
}
|
||||
}
|
||||
else if (pixel.age > 1000) {
|
||||
changePixel(pixel,"mango_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",
|
||||
],
|
||||
};
|
||||
|
||||
elements.mango_juice = {
|
||||
color: "#f0c348",
|
||||
onMix: function(pixel) {
|
||||
if (shiftDown) {
|
||||
if (Math.random() < 0.2) {
|
||||
changePixel(pixel,"juice")
|
||||
pixel.color = pixelColorPick(pixel,"#f0c348")
|
||||
}
|
||||
}
|
||||
},
|
||||
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
|
||||
};
|
||||
eLists.JUICEMIXABLE.push("mango_juice");
|
||||
|
||||
elements.pineapple_leaves = {
|
||||
color: "#3aab11",
|
||||
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.pineapple = {
|
||||
color: "#e8bc38",
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category:"food",
|
||||
tempHigh: 100,
|
||||
stateHigh: "dead_plant",
|
||||
burn:65,
|
||||
burnTime:60,
|
||||
burnInto: "dead_plant",
|
||||
breakInto: "pineapple_juice",
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
temp:20
|
||||
}
|
||||
elements.pineapple_seed = {
|
||||
color: "#695531",
|
||||
tick: function(pixel) {
|
||||
if (isEmpty(pixel.x,pixel.y+1)) {
|
||||
movePixel(pixel,pixel.x,pixel.y+1);
|
||||
}
|
||||
else {
|
||||
if (pixel.temp < 100 && pixel.temp > 20) {
|
||||
if (Math.random() < 0.02 && pixel.age > 50) {
|
||||
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) && pixel.leafgrown==false) {
|
||||
movePixel(pixel,pixel.x,pixel.y-1);
|
||||
createPixel("pineapple_leaves",pixel.x,pixel.y+1);
|
||||
if (isEmpty(pixel.x+1,pixel.y) && isEmpty(pixel.x-1,pixel.y)) {
|
||||
createPixel("pineapple_leaves",pixel.x+1,pixel.y);
|
||||
createPixel("pineapple_leaves",pixel.x-1,pixel.y);
|
||||
if (isEmpty(pixel.x-2,pixel.y-1) && isEmpty(pixel.x+2,pixel.y-1)) {
|
||||
createPixel("pineapple_leaves",pixel.x+2,pixel.y-1);
|
||||
createPixel("pineapple_leaves",pixel.x-2,pixel.y-1);
|
||||
if (isEmpty(pixel.x,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1) && isEmpty(pixel.x-1,pixel.y-1)) {
|
||||
createPixel("pineapple",pixel.x,pixel.y-1);
|
||||
createPixel("pineapple",pixel.x+1,pixel.y-1);
|
||||
createPixel("pineapple",pixel.x-1,pixel.y-1);
|
||||
if (isEmpty(pixel.x,pixel.y-2) && isEmpty(pixel.x+1,pixel.y-2) && isEmpty(pixel.x-1,pixel.y-2)) {
|
||||
createPixel("pineapple",pixel.x,pixel.y-2);
|
||||
createPixel("pineapple",pixel.x+1,pixel.y-2);
|
||||
createPixel("pineapple",pixel.x-1,pixel.y-2);
|
||||
if (isEmpty(pixel.x,pixel.y-3) && isEmpty(pixel.x+1,pixel.y-3) && isEmpty(pixel.x-1,pixel.y-3)) {
|
||||
createPixel("pineapple",pixel.x,pixel.y-3);
|
||||
createPixel("pineapple",pixel.x+1,pixel.y-3);
|
||||
createPixel("pineapple",pixel.x-1,pixel.y-3);
|
||||
if (isEmpty(pixel.x,pixel.y-4) && isEmpty(pixel.x+1,pixel.y-4) && isEmpty(pixel.x-1,pixel.y-4)) {
|
||||
createPixel("pineapple",pixel.x,pixel.y-4);
|
||||
createPixel("pineapple",pixel.x+1,pixel.y-4);
|
||||
createPixel("pineapple",pixel.x-1,pixel.y-4);
|
||||
if (isEmpty(pixel.x,pixel.y-5) && isEmpty(pixel.x+1,pixel.y-6) && isEmpty(pixel.x-1,pixel.y-6)) {
|
||||
createPixel("pineapple_leaves",pixel.x,pixel.y-5);
|
||||
createPixel("pineapple_leaves",pixel.x+1,pixel.y-6);
|
||||
createPixel("pineapple_leaves",pixel.x-1,pixel.y-6);
|
||||
pixel.leafgrown = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pixel.age > 500 && pixel.leafgrown == true && Math.random() < 0.1) {
|
||||
changePixel(pixel,"pineapple_leaves");
|
||||
}
|
||||
}
|
||||
pixel.age++;
|
||||
}
|
||||
doDefaults(pixel);
|
||||
},
|
||||
properties: {
|
||||
"age":0,
|
||||
"leafgrown":false,
|
||||
},
|
||||
tempHigh: 100,
|
||||
stateHigh: "dead_plant",
|
||||
tempLow: -2,
|
||||
stateLow: "frozen_plant",
|
||||
burn: 65,
|
||||
burnTime: 15,
|
||||
category: "life",
|
||||
state: "solid",
|
||||
density: 1500,
|
||||
cooldown: defaultCooldown,
|
||||
seed: true,
|
||||
temp:25,
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|XX",
|
||||
"XX|M1|XX",
|
||||
],
|
||||
};
|
||||
elements.pineapple_juice = {
|
||||
color: "#d9ba32",
|
||||
onMix: function(pixel) {
|
||||
if (shiftDown) {
|
||||
if (Math.random() < 0.2) {
|
||||
changePixel(pixel,"juice")
|
||||
pixel.color = pixelColorPick(pixel,"#d9ba32")
|
||||
}
|
||||
}
|
||||
},
|
||||
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
|
||||
};
|
||||
eLists.JUICEMIXABLE.push("pineapple_juice");
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ elements.liquid_deuterium = {
|
|||
elements.tritium = {
|
||||
color: "#558bcf",
|
||||
behavior: [
|
||||
"M2|M1 AND CR:radiation%1|M2",
|
||||
"M2|M1 AND CR:radiation%0.125|M2",
|
||||
"M1|XX|M1",
|
||||
"M2|M1 AND CR:radiation%0.5|M2",
|
||||
"M2|M1 AND CR:radiation%0.05125|M2",
|
||||
],
|
||||
reactions: {
|
||||
"oxygen": { elem1:null, elem2:"tritiated_steam", tempMin:500 },
|
||||
|
|
@ -73,7 +73,7 @@ elements.tritium = {
|
|||
elements.liquid_tritium = {
|
||||
color: "#97afcf",
|
||||
behavior: [
|
||||
"XX|CR:radiation%1|XX",
|
||||
"XX|CR:radiation%0.125|XX",
|
||||
"M2|XX|M2",
|
||||
"M1|M1|M1",
|
||||
],
|
||||
|
|
@ -157,7 +157,7 @@ elements.heavy_ice = {
|
|||
elements.tritiated_water = {
|
||||
color: "#2167ff",
|
||||
behavior: [
|
||||
"XX|CR:radiation%1|XX",
|
||||
"XX|CR:radiation%0.125|XX",
|
||||
"M2|XX|M2",
|
||||
"M1|M1|M1",
|
||||
],
|
||||
|
|
@ -189,9 +189,9 @@ elements.tritiated_water = {
|
|||
elements.tritiated_steam = {
|
||||
color: "#abd6ff",
|
||||
behavior: [
|
||||
"M2|M1 AND CR:radiation%1|M2",
|
||||
"M2|M1 AND CR:radiation%0.125|M2",
|
||||
"M1|XX|M1",
|
||||
"M2|M1 AND CR:radiation%0.5|M2",
|
||||
"M2|M1 AND CR:radiation%0.05125|M2",
|
||||
],
|
||||
reactions: {
|
||||
"copper": { elem1:"oxygen", elem2:"oxidized_copper", chance:0.01 },
|
||||
|
|
@ -216,9 +216,9 @@ elements.tritiated_steam = {
|
|||
elements.tritiated_ice = {
|
||||
color: "#b2daeb",
|
||||
behavior: [
|
||||
"XX|CR:radiation%0.25|XX",
|
||||
"CR:radiation%0.25|XX|CR:radiation%0.25",
|
||||
"XX|CR:radiation%0.25|XX",
|
||||
"XX|CR:radiation%0.125|XX",
|
||||
"CR:radiation%0.125|XX|CR:radiation%0.125",
|
||||
"XX|CR:radiation%0.125|XX",
|
||||
],
|
||||
temp: -5,
|
||||
tempHigh: 5,
|
||||
|
|
@ -262,9 +262,9 @@ elements.fluoroantimonic_acid = {
|
|||
elements.tritium_ice = {
|
||||
color: "#b5d2ff",
|
||||
behavior: [
|
||||
"XX|CR:radiation%0.25|XX",
|
||||
"CR:radiation%0.25|XX|CR:radiation%0.25",
|
||||
"XX|CR:radiation%0.25|XX",
|
||||
"XX|CR:radiation%0.125|XX",
|
||||
"CR:radiation%0.125|XX|CR:radiation%0.125",
|
||||
"XX|CR:radiation%0.125|XX",
|
||||
],
|
||||
temp: -259,
|
||||
tempHigh: -256,
|
||||
|
|
@ -283,4 +283,36 @@ elements.unstain = {
|
|||
y: pixel.y
|
||||
})
|
||||
}
|
||||
},
|
||||
elements.legacy_hydrogen = {
|
||||
color: "#558bcf",
|
||||
behavior: behaviors.GAS,
|
||||
reactions: {
|
||||
"oxygen": { elem1:null, elem2:"steam", tempMin:500 },
|
||||
"hydrogen": { elem1:"neutron", elem2:"helium", tempMin:10000, temp1:10000, temp2:10000 },
|
||||
"nitrogen": { elem1:null, elem2:"oxygen", tempMin:10000 },
|
||||
"sulphur": { elem1:null, elem2:"chlorine", tempMin:10000 },
|
||||
"neon": { elem1:null, elem2:"sodium", tempMin:10000 }
|
||||
},
|
||||
category: "gases",
|
||||
burn: 100,
|
||||
burnTime: 2,
|
||||
tempLow: -253,
|
||||
stateLow: "liquid_hydrogen",
|
||||
state: "gas",
|
||||
density: 0.08375,
|
||||
conduct: 0.02,
|
||||
colorOn: "#d6462d"
|
||||
},
|
||||
elements.ultimate_reset = {
|
||||
color: "#ff0000",
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|EX:10000>flash AND CR:ultimate_reset%0.01|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category: "tools",
|
||||
state: "solid",
|
||||
excludeRandom: true,
|
||||
cooldown: defaultCooldown
|
||||
};
|
||||
|
|
@ -0,0 +1,237 @@
|
|||
/*
|
||||
|
||||
Also checkout sbstuff.js by sb! Without it, this mod wouldn't be possible!
|
||||
|
||||
Discords of people that helped me:
|
||||
usecit - UseCit.psd
|
||||
nousernamefound - nousernamefound
|
||||
|
||||
Credits:
|
||||
Saschas - Waterpowder idea
|
||||
|
||||
|
||||
*/
|
||||
|
||||
elements.sweetwater = {
|
||||
color: "#8ae7eb",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "water",
|
||||
reactions: {
|
||||
"sugar": { elem1: null, elem2: "syrup" }
|
||||
},
|
||||
};
|
||||
|
||||
elements.syrup = {
|
||||
color: "#d9d2c3",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "fire",
|
||||
reactions: {
|
||||
"cell": {elem1: null, elem2: "incubationjuice"}
|
||||
}
|
||||
};
|
||||
|
||||
elements.orangesoda = {
|
||||
color: "#b8820d",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "water",
|
||||
reactions: {
|
||||
"deadflyingcreature": { elem1: "dirty_orangesoda" },
|
||||
"deadcreature": { elem1: "dirty_orangesoda" },
|
||||
"dirty_water": { elem1: "dirty_orangesoda" },
|
||||
"infection": { elem1: "dirty_orangesoda" },
|
||||
"dirty_orangesoda": { elem1: "dirty_orangesoda" },
|
||||
}
|
||||
};
|
||||
|
||||
elements.dirty_orangesoda = {
|
||||
color: "#20991a",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: null,
|
||||
state: "liquid",
|
||||
tempHigh: 80,
|
||||
stateHigh: "orangesoda",
|
||||
};
|
||||
|
||||
elements.orange = {
|
||||
color: "#eda813",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
breakInto: "juice",
|
||||
tempHigh: 100,
|
||||
stateHigh: "charcoal",
|
||||
reactions: {
|
||||
"syrup": { elem1: null, elem2: "orangesoda" }
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
elements.incubationjuice = {
|
||||
color: "#daf5ef",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "life",
|
||||
state: "liquid",
|
||||
breakInto: "blood",
|
||||
reactions: {
|
||||
"flydna": { elem1: "blood", elem2: "flyingcreature"},
|
||||
"antdna": { elem1: "blood", elem2: "creature"},
|
||||
"alcohol": { elem1: "cancer", elem2: "antiartificialjuice"}
|
||||
},
|
||||
};
|
||||
|
||||
elements.creature = {
|
||||
color: "#d073d9",
|
||||
behavior: behaviors.CRAWLER,
|
||||
category: "life",
|
||||
state: "crawler",
|
||||
tempHigh: 175,
|
||||
stateHigh: "deadcreature",
|
||||
breakInto: "deadcreature",
|
||||
reactions: {
|
||||
"ant": { elem2: "meat" },
|
||||
"meat": { elem2: "creature" },
|
||||
"artificialmeat": { elem2: "cell" },
|
||||
"syrup": { elem2: "creature" },
|
||||
"cell": { elem2: "creature" },
|
||||
},
|
||||
};
|
||||
|
||||
elements.flyingcreature = {
|
||||
color: "#d073d9",
|
||||
behavior: behaviors.FLY,
|
||||
category: "life",
|
||||
state: "fly",
|
||||
tempHigh: 175,
|
||||
stateHigh: "deadflyingcreature",
|
||||
breakInto: "deadflyingcreature",
|
||||
reactions: {
|
||||
"antiartificialjuice": { elem1: "deadflyingcreature", elem2: null },
|
||||
"fly": { elem2: "meat" },
|
||||
"meat": { elem2: "flyingcreature" },
|
||||
"artificialmeat": { elem2: "cell" },
|
||||
"syrup": { elem2: "flyingcreature" },
|
||||
"cell": { elem2: "flyingcreature" },
|
||||
},
|
||||
};
|
||||
|
||||
elements.deadcreature = {
|
||||
color: "#86428c",
|
||||
behavior: behaviors.POWDER,
|
||||
category: null,
|
||||
state: "powder",
|
||||
tempHigh: 225,
|
||||
stateHigh: "smoke",
|
||||
breakInto: "artificialmeat",
|
||||
reactions: {
|
||||
"antiartificialjuice": { elem1: "artificialmeat", elem2: "dna" },
|
||||
"ant": { elem1: "artificialmeat" },
|
||||
},
|
||||
};
|
||||
|
||||
elements.deadflyingcreature = {
|
||||
color: "#86428c",
|
||||
behavior: behaviors.POWDER,
|
||||
category: null,
|
||||
state: "powder",
|
||||
tempHigh: 225,
|
||||
stateHigh: "smoke",
|
||||
breakInto: "artificialmeat",
|
||||
reactions: {
|
||||
"antiartificialjuice": { elem1: "artificialmeat", elem2: "dna" },
|
||||
"fly": { elem1: "artificialmeat" },
|
||||
},
|
||||
};
|
||||
|
||||
elements.artificialmeat = {
|
||||
color: "#b38a5f",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
tempHigh: 215,
|
||||
stateHigh: "smoke",
|
||||
reactions: {
|
||||
"antiartificialjuice": { elem1: null, elem2: null },
|
||||
"ant": { elem1: null },
|
||||
"rat": { elem1: null },
|
||||
},
|
||||
};
|
||||
|
||||
elements.antiartificialjuice = {
|
||||
color: "#b38a5f",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "life",
|
||||
state: "liquid",
|
||||
tempHigh: 215,
|
||||
stateHigh: "smoke",
|
||||
reactions: {
|
||||
"flyingcreature": { elem1: "alcohol", elem2: "deadflyingcreature" },
|
||||
"creature": { elem1: "alcohol", elem2: "deadcreature" },
|
||||
},
|
||||
};
|
||||
|
||||
elements.antiartificialspray = {
|
||||
color: "#b38a5f",
|
||||
behavior: behaviors.DGAS,
|
||||
category: "life",
|
||||
state: "gas",
|
||||
tempHigh: 215,
|
||||
density: 4000,
|
||||
stateHigh: "smoke",
|
||||
reactions: {
|
||||
"flyingcreature": { elem1: "alcohol", elem2: "deadflyingcreature" },
|
||||
"creature": { elem1: "alcohol", elem2: "deadcreature" },
|
||||
},
|
||||
};
|
||||
|
||||
elements.antdna = {
|
||||
color: "#b38a5f",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "life",
|
||||
state: "powder",
|
||||
tempHigh: 215,
|
||||
stateHigh: "smoke",
|
||||
};
|
||||
|
||||
elements.flydna = {
|
||||
color: "#b38a5f",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "life",
|
||||
state: "powder",
|
||||
tempHigh: 215,
|
||||
stateHigh: "smoke",
|
||||
};
|
||||
|
||||
elements.waterpowder = {
|
||||
color: elements.water.color,
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "powder",
|
||||
tempHigh: 40,
|
||||
stateHigh: "water",
|
||||
};
|
||||
|
||||
elements.waterpowderer = {
|
||||
color: "#e3e1dc",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "powder",
|
||||
reactions: {
|
||||
"water": { elem1: null, elem2: "waterpowder" }
|
||||
}
|
||||
};
|
||||
|
||||
elements.ant.breakInto = "antdna"
|
||||
elements.fly.breakInto = "flydna"
|
||||
elements.water.reactions["sugar"] = { elem1: null, elem2: "sweetwater" };
|
||||
elements.water.reactions["deadflyingcreature"] = { elem1: "dirty_water"};
|
||||
elements.water.reactions["deadcreature"] = { elem1: "dirty_water"};
|
||||
elements.water.reactions["dirty_water"] = { elem1: "dirty_water"};
|
||||
|
|
@ -592,6 +592,7 @@ elements.cocaine = {
|
|||
};
|
||||
|
||||
elements.zombie = {
|
||||
excludeRandom: true,
|
||||
tempHigh: 500,
|
||||
stateHigh: "ash",
|
||||
color: "#114700",
|
||||
|
|
@ -784,6 +785,7 @@ elements.fart = {
|
|||
behavior: behaviors.DGAS,
|
||||
category: "joke",
|
||||
state: "gas",
|
||||
excludeRandom: true
|
||||
};
|
||||
|
||||
elements.chips = {
|
||||
|
|
@ -998,7 +1000,7 @@ elements.incinerator = {
|
|||
insulate: true,
|
||||
excludeRandom: true,
|
||||
reactions: {
|
||||
"fart": { elem1: null, elem2: "ohio" },
|
||||
"fart": { elem1: null, elem2: "kaboom" },
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1211,7 +1213,7 @@ elements.dark_energy = {
|
|||
excludeRandom: true
|
||||
};
|
||||
|
||||
elements.ohio = {
|
||||
elements.kaboom = {
|
||||
hidden: true,
|
||||
hardness: 1,
|
||||
hidden: true,
|
||||
|
|
@ -1380,15 +1382,6 @@ elements.yoylecake = {
|
|||
state: "liquid",
|
||||
};
|
||||
|
||||
elements.banana = {
|
||||
tempHigh: 300,
|
||||
stateHigh: "ash",
|
||||
color: "#f06c0e",
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
};
|
||||
|
||||
elements.cool_ray = {
|
||||
color: ["#0cdaed","#baf9ff"],
|
||||
tick: function(pixel) {
|
||||
|
|
@ -1692,7 +1685,8 @@ elements.liquid_filler = {
|
|||
"M1|M1 AND CH:liquid_filler%50|M1",
|
||||
],
|
||||
category: "special",
|
||||
state: "liquid"
|
||||
state: "liquid",
|
||||
excludeRandom: true
|
||||
};
|
||||
|
||||
elements.antimony = {
|
||||
|
|
@ -1736,12 +1730,93 @@ elements.unstain = {
|
|||
state: "solid",
|
||||
};
|
||||
|
||||
elements.antmatter = {
|
||||
color: "#5f4a4a",
|
||||
behavior: [
|
||||
"M2|DB%50 AND M2 AND EX:8>ant%10|M2",
|
||||
"M1|XX|M1",
|
||||
"M1|DB%50 AND M1 AND EX:8>ant%10|M1",
|
||||
],
|
||||
category: "others",
|
||||
state: "gas",
|
||||
density: 6.9,
|
||||
desc: "first ever others category element i guess"
|
||||
};
|
||||
|
||||
elements.thermal_paste = {
|
||||
viscosity: 10000,
|
||||
tempHigh: 200,
|
||||
stateHigh: [null, "thermal_paste"],
|
||||
color: "#c5cfd3",
|
||||
behavior: [
|
||||
"XX|CO:1|XX",
|
||||
"CO:1 AND M2|XX|CO:1 AND M2",
|
||||
"M1|CO:1 AND M1|M1",
|
||||
],
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
};
|
||||
|
||||
elements.sam = {
|
||||
name: "sam's sperm i think",
|
||||
viscosity: 10000,
|
||||
color: "#0e0e0e",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "joke",
|
||||
state: "liquid",
|
||||
desc: "begs the question; did he censor himself?"
|
||||
};
|
||||
|
||||
elements.glitch = {
|
||||
color: ["#ff0000", "#c300ff", "#bbff00", "#1100ff", "#00ffaa"],
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|CC:ff0000,c300ff,bbff00,1100ff,00ffaa|XX",
|
||||
"XX|XX|XX"
|
||||
],
|
||||
category: "special",
|
||||
conduct: 0.5,
|
||||
movable: false
|
||||
};
|
||||
|
||||
elements.sound = {
|
||||
color: ["#1464b4","#aeeb82"],
|
||||
currentSound: null,
|
||||
onSelect: function() {
|
||||
var file = document.createElement("input");
|
||||
file.type = "file";
|
||||
file.accept = "audio/*";
|
||||
file.onchange = function() {
|
||||
setTimeout(function(){
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
if (elements.sound.currentSound) {
|
||||
elements.sound.currentSound.pause();
|
||||
}
|
||||
elements.sound.currentSound = new Audio();
|
||||
elements.sound.currentSound.src = e.target.result;
|
||||
elements.sound.currentSound.play();
|
||||
file.value = "";
|
||||
}
|
||||
reader.readAsDataURL(file.files[0]);
|
||||
},500);
|
||||
}
|
||||
file.click();
|
||||
},
|
||||
onUnselect: function() {},
|
||||
tool: function() {},
|
||||
category: "special",
|
||||
};
|
||||
|
||||
elements.incinerate.category = "tools",
|
||||
elements.cook.category = "tools",
|
||||
elements.room_temp.category = "tools",
|
||||
|
||||
elements.beans.tempHigh = 349,
|
||||
elements.beans.stateHigh = "burnt_beans"
|
||||
elements.grass.onSelect = function() {
|
||||
logMessage("go touch this");
|
||||
}
|
||||
|
||||
if (!elements.radiation.reactions) elements.egg.reactions = {};
|
||||
elements.radiation.reactions.meat = { elem1: null, elem2: "radioactive_meat" },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
let currentVideoFrames = [];
|
||||
let videoFrame = 0;
|
||||
let processed = 0;
|
||||
let started = false;
|
||||
let videoWidth = 0;
|
||||
let videoHeight = 0;
|
||||
let FPS = tps / 2;
|
||||
|
||||
const splitHex = (hex) => hex.slice(1).match(/../g).map(a => Math.floor(parseInt(a, 16)));
|
||||
const hexify = (rgb) => "#" + rgb.map(a => Math.floor(a).toString(16).padStart(2, "0")).join("");
|
||||
function colorLerp(color_, color2_, t) {
|
||||
const color = splitHex(color_);
|
||||
const color2 = splitHex(color2_);
|
||||
const r = (1 - t) * color[0] + t * color2[0];
|
||||
const g = (1 - t) * color[1] + t * color2[1];
|
||||
const b = (1 - t) * color[2] + t * color2[2];
|
||||
return hexify([r, g, b]);
|
||||
}
|
||||
|
||||
elements.video_pixel = {
|
||||
color: "#ffffff",
|
||||
hidden: true,
|
||||
category: "special",
|
||||
canPlace: false,
|
||||
tool: () => {},
|
||||
tick: (pixel) => {
|
||||
if (started && pixelTicks % (tps / FPS) == 0) {
|
||||
processed++;
|
||||
if (processed >= videoWidth * videoHeight) {
|
||||
videoFrame++;
|
||||
processed = 0;
|
||||
}
|
||||
if (videoFrame >= currentVideoFrames.length) {
|
||||
started = false;
|
||||
processed = 0;
|
||||
currentVideoFrames = [];
|
||||
videoFrame = 0;
|
||||
}
|
||||
|
||||
pixel.color = currentVideoFrames[videoFrame % currentVideoFrames.length][pixel.y][pixel.x - Math.floor((width - videoWidth) / 2)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const chunk = (arr, size) => arr.map((_, i) => i % size == 0 ? arr.slice(i, i + size) : null).filter(a => a)
|
||||
|
||||
elements.video = {
|
||||
color: ["#78bbff","#5bb81a"],
|
||||
onSelect: () => {
|
||||
if (!localStorage.getItem("video.js/tutorial")) {
|
||||
alert("Videos might take a while (up to a few minutes with larger videos) to load. During that time, do not delete any video pixels");
|
||||
localStorage.setItem("video.js/tutorial", true);
|
||||
}
|
||||
const file = document.createElement("input");
|
||||
file.type = "file";
|
||||
file.accept = "video/*";
|
||||
file.click();
|
||||
file.onchange = () => {
|
||||
setTimeout(() => {
|
||||
const video = document.createElement("video");
|
||||
video.preload = "auto";
|
||||
const url = URL.createObjectURL(file.files[0]);
|
||||
video.src = url;
|
||||
video.load();
|
||||
|
||||
let canvas = document.createElement("canvas", {
|
||||
willReadFrequently: true
|
||||
});
|
||||
let ctx = canvas.getContext("2d");
|
||||
video.onloadeddata = async () => {
|
||||
const w = video.videoWidth;
|
||||
const h = video.videoHeight;
|
||||
const newHeight = height;
|
||||
const newWidth = Math.floor((w / h) * newHeight);
|
||||
canvas.width = video.videoWidth;
|
||||
canvas.height = video.videoHeight;
|
||||
videoWidth = newWidth;
|
||||
videoHeight = newHeight;
|
||||
|
||||
const videoLength = video.duration * FPS;
|
||||
const seekBy = video.duration / videoLength;
|
||||
|
||||
for (let i = 0; i < newWidth; i++) {
|
||||
for (let y = 0; y < newHeight; y++) {
|
||||
const x = Math.floor((width - newWidth) / 2) + i;
|
||||
if (pixelMap[x][y]) deletePixel(x, y);
|
||||
createPixel("video_pixel", x, y);
|
||||
}
|
||||
};
|
||||
|
||||
video.currentTime = 0;
|
||||
|
||||
video.onseeked = () => {
|
||||
ctx.drawImage(video, 0, 0, newWidth, newHeight);
|
||||
const imageData = chunk(chunk(Array.from(ctx.getImageData(0, 0, newWidth, newHeight).data), 4), newWidth);
|
||||
const frame = [];
|
||||
for (let y = 0; y < newHeight; y++) {
|
||||
frame[y] = [];
|
||||
for (let x = 0; x < newWidth; x++) {
|
||||
frame[y][x] = `#${imageData[y][x].slice(0, 3).map(a => a.toString(16).padStart(2, "0")).join("")}`
|
||||
}
|
||||
}
|
||||
currentVideoFrames.push(frame);
|
||||
|
||||
if (currentVideoFrames.length >= videoLength) {
|
||||
const audio = new Audio();
|
||||
audio.src = url;
|
||||
audio.play();
|
||||
|
||||
started = true;
|
||||
videoFrame = 0;
|
||||
} else {
|
||||
video.currentTime += seekBy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
tool: () => {},
|
||||
category: "special"
|
||||
}
|
||||
}
|
||||
|
|
@ -185,4 +185,70 @@ elements.left_bullet = {
|
|||
state: "solid",
|
||||
conduct: 1,
|
||||
density: 1300,
|
||||
},
|
||||
elements.auto_rocket_launcher_left = {
|
||||
color: "#C0C0C0",
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"CR:left_rocket|XX|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 1300,
|
||||
},
|
||||
elements.auto_rocket_launcher_right = {
|
||||
color: "#C0C0C0",
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|CR:right_rocket",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 1300,
|
||||
},
|
||||
elements.left_rocket = {
|
||||
color: "#4c4e42",
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"M1 AND EX:10|XX|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category:"weapons",
|
||||
},
|
||||
elements.right_rocket = {
|
||||
color: "#4c4e42",
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|M1 AND EX:10",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category:"weapons",
|
||||
},
|
||||
elements.e_rocket_launcher_left = {
|
||||
color: "#C0C0C0",
|
||||
behavior: behaviors.WALL,
|
||||
behaviorOn: [
|
||||
"XX|XX|XX",
|
||||
"CR:left_rocket|XX|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
conduct: 1,
|
||||
density: 1300,
|
||||
},
|
||||
elements.e_rocket_launcher_right = {
|
||||
color: "#C0C0C0",
|
||||
behavior: behaviors.WALL,
|
||||
behaviorOn: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|CR:right_rocket",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
conduct: 1,
|
||||
density: 1300,
|
||||
};
|
||||
Loading…
Reference in New Issue