sandboxels/mods/spring.js

282 lines
7.7 KiB
JavaScript
Raw Normal View History

2023-04-22 10:40:04 -04:00
elements.sakura_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.sakura_branch = {
color: "#632e1f",
behavior: [
"CR:sakura,sakura_branch%2|CR:sakura,sakura,sakura,sakura_branch%2|CR:sakura,sakura_branch%2",
"XX|XX|XX",
"XX|XX|XX",
],
tempHigh: 100,
stateHigh: "sakura_wood",
tempLow: -30,
stateLow: "sakura_wood",
category: "life",
burn: 40,
burnTime: 50,
burnInto: ["sap","ember","charcoal"],
hidden: true,
state: "solid",
density: 1500,
hardness: 0.15,
breakInto: ["sap","sawdust"],
seed: "sakura_seed"
}
elements.sakura = {
color: ["#ff7ad3","#ff94db","#ffa6f0"],
behavior: [
"XX|XX|XX",
"XX|XX|XX",
"XX|CR:sakura_blossom%0.25|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,
seed: "sakura_seed",
hidden: true
}
elements.sakura_blossom = {
color: ["#ff7ad3","#ff94db","#ffa6f0"],
behavior: [
"XX|XX|XX",
"XX|FX%0.25 AND DL%0.65|XX",
"M2%10|M1%10|M1%10",
],
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,
seed: "sakura_seed",
hidden: true
}
elements.sakura_seed = {
color: ["#ff7ad3","#ff94db","#ffa6f0"],
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 ? "sakura_wood" : "sakura_branch",pixel.x,pixel.y+1);
}
}
else if (pixel.age > 1000) {
changePixel(pixel,"sakura_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
};
v1.9.3 [Version 1.9.3 - February 2, 2024 - Mix & Munch] + Potassium + Magnesium + Antibomb + Nut Oil + Cured Meat, from mixing with Salt + Grease, from cooking Meat + (BETA) Support for British, German, French, Hungarian, Polish, Portuguese, Vietnamese, Chinese [Chemistry] + Water and Foam can extinguish small fires (Outer pixels) + Hydrogen is explosive when burning ~ Improved Calcium-Water reaction + Calcium reacts with Water variants ~ Recolored Calcium + Calcium-Acid reaction + Calcium exposed to air turns to Quicklime + Quicklime is an insecticide + Limestone can break into Gravel ~ Many things no longer turn to raw Calcium ~ Tweaked Quicklime-Water rection + Oil distills into Propane, Plastic, and Lamp Oil at certain temperatures + Cells break down Oil into Methane + Propane Ice (Hidden) ~ Copper no longer oxidizes in Water + Soap recipe + Potassium Salt recipe + Glue can be made from Bones + Acid reacts with Zinc and Sugar + Blue and Rose Gold can break ~ Recolored Electrum for consistency with other Golds ~ Anesthesia requires heat for production ~ AlGa reaction creates proper amounts ~ Aluminum flame color ~ Foam deletes when frozen + Caustic Potash (Hidden) [Life] + Evergreen breaks into Sap + Sap is flammable + Flowers have more color variety (Light & dark) ~ Spawned Petals are multicolor again + Pollen requires soil to germinate + Pollen will sometimes fail to germinate ~ Bees drop Pollen less often if plants are nearby ~ Bees lose their Pollen when dropping it + Bees warm Hive to at least 33°C + Ant Walls can be damaged by Fire + Rats can eat Worms, Ants, Frogs, Snails, and Slugs + Worms, Fish, and Grass die in Alcohol ~ Fish Eggs are colored black ~ Fish no longer eat Meat ~ Snails and Slugs no longer die in Salt Water ~ Snails consume Limestone slower + Humans eat Pickles and Sauce ~ Humans won't rot while being defibrillated + Cancer kills Grass ~ Ocean worldgen uses Salt Water [Cooking] ~ Mixing Dough and Batter changes color without deleting ingredients + Yeast, Cream, Baking Soda, and Quicklime help Dough and Batter rise + Deep-fried color when cooking Dough or Batter in hot Nut Oil, Butter, or Grease + Cooking Nut Meat makes some Nut Oil + Dough can be made with Vinegar + Cheese can be made with Yogurt + Yeast can ferment Milk into Cheese + Honey, Caramel, and Molasses can sweeten Water + Mixing Honey and Sugar Water creates Wax + Coffee Pumpkin Spice color variant ~ Tea and Coffee spawn warm ~ Moved Cream slightly ~ Moved Rad Cloud and Rad Steam slightly + Fat (Hidden) [Other] + Save menu includes Author and Description inputs + Save menu remembers your name for later + Save menu autofills info from current save + Some elements will forcefully save with color ~ Settings don't save when in a loaded save + Image tool works with Replace Mode + Image tool replaces pixels when holding Shift + Hidden count goes down in real time when unlocking + Clay Soil heats up into Brick + Clay and Dirt or Gravel makes Clay Soil + Clay freezes into Clay Soil + Nitro and Clay or TNT makes Dynamite ~ Dynamite must be broken or shocked to explode ~ Gunpowder is less powerful than Dynamite + Bubbles pop when broken + Soap removes Glue ~ Soap reactions are less instant + Mercury dirties Seltzer + Uranium dirties Slush + Uranium slowly melts Snow + Ozone pops Balloons + Greek Fire ignites on contact with Plasma + Bless removes Liquid Stench + Virus-infected pixels can be restored with Soap or Bless + Virus ignores Plasma + Malware can interrupt Virus restoration ~ Virus optimizations + Vertical and Horizontal can swap when given opposite energies + Heat Ray and God Ray have densities + Pyrite, Electrum, and Yogurt aliases ~ Hid Clay Shard ~ Moved Ball to Special ~ Updated Cheerful Mode description - Removed Sticky Bomb, Cluster Bomb, Electro Bomb, and Water Bomb - Instead available in new classic_explosives.js mod [Bug Fixes] ~ Fixed: Repairing with Glue duplicates material ~ Fixed: Painted Plant turns Light green ~ Fixed: Molten Sodium and Sodium Gas burn with too much Fire ~ Fixed: Melted and Rotten Cheese densities inconsistent ~ Fixed: Molasses boils into Sugar which immediately burns ~ Fixed: Single Dirty Water pixel turns infinite Snow to Slush ~ Fixed: Rad Steam doesn't form Rad Cloud when touching Cloud ~ Fixed: TPS accepts negative values ~ Fixed: Hive is draggable ~ Fixed: Nut Milk can't be mixed into Batter/Dough [Technical] + Shift-Picking a pixel copies its properties + Z key swaps to secondary element + Backspace swaps to previous element + Prop tool supports NaN and lowercase Infinity values ~ Unhid Prop + 'extinguish' element property (true/false) + 'forceSaveColor' element property (true/false) ~ Custom element names and spaces are normalized in buttons
2024-02-02 14:54:29 -05:00
/* Beehive deprecated, Hive exists in base game
2023-04-22 10:40:04 -04:00
elements.beehive = {
color: ["#ab985e","#948454"],
tick: function(pixel){
if (!pixel.pollen) { return; }
if (isEmpty(pixel.x,pixel.y+1)) {
if (Math.random() < 0.25) {
createPixel("honey",pixel.x,pixel.y+1);
pixel.pollen--;
}
}
else {
if (!outOfBounds(pixel.x,pixel.y+1) && pixelMap[pixel.x][pixel.y+1].element === "beehive") {
pixelMap[pixel.x][pixel.y+1].pollen += pixel.pollen;
pixel.pollen = 0;
}
}
2023-04-22 11:27:46 -04:00
doDefaults(pixel);
2023-04-22 10:40:04 -04:00
},
properties: {
"pollen": 0,
},
tempHigh: 248,
stateHigh: ["fire","fire","ash"],
burn: 70,
burnTime: 300,
burnInto: "ash",
category: "life",
state: "solid",
density: 1201
}
elements.bee.reactions.beehive = {
func: function(bee,hive) {
if (bee.pollen) {
hive.pollen++;
}
bee.pollen = null;
}
}
v1.9.3 [Version 1.9.3 - February 2, 2024 - Mix & Munch] + Potassium + Magnesium + Antibomb + Nut Oil + Cured Meat, from mixing with Salt + Grease, from cooking Meat + (BETA) Support for British, German, French, Hungarian, Polish, Portuguese, Vietnamese, Chinese [Chemistry] + Water and Foam can extinguish small fires (Outer pixels) + Hydrogen is explosive when burning ~ Improved Calcium-Water reaction + Calcium reacts with Water variants ~ Recolored Calcium + Calcium-Acid reaction + Calcium exposed to air turns to Quicklime + Quicklime is an insecticide + Limestone can break into Gravel ~ Many things no longer turn to raw Calcium ~ Tweaked Quicklime-Water rection + Oil distills into Propane, Plastic, and Lamp Oil at certain temperatures + Cells break down Oil into Methane + Propane Ice (Hidden) ~ Copper no longer oxidizes in Water + Soap recipe + Potassium Salt recipe + Glue can be made from Bones + Acid reacts with Zinc and Sugar + Blue and Rose Gold can break ~ Recolored Electrum for consistency with other Golds ~ Anesthesia requires heat for production ~ AlGa reaction creates proper amounts ~ Aluminum flame color ~ Foam deletes when frozen + Caustic Potash (Hidden) [Life] + Evergreen breaks into Sap + Sap is flammable + Flowers have more color variety (Light & dark) ~ Spawned Petals are multicolor again + Pollen requires soil to germinate + Pollen will sometimes fail to germinate ~ Bees drop Pollen less often if plants are nearby ~ Bees lose their Pollen when dropping it + Bees warm Hive to at least 33°C + Ant Walls can be damaged by Fire + Rats can eat Worms, Ants, Frogs, Snails, and Slugs + Worms, Fish, and Grass die in Alcohol ~ Fish Eggs are colored black ~ Fish no longer eat Meat ~ Snails and Slugs no longer die in Salt Water ~ Snails consume Limestone slower + Humans eat Pickles and Sauce ~ Humans won't rot while being defibrillated + Cancer kills Grass ~ Ocean worldgen uses Salt Water [Cooking] ~ Mixing Dough and Batter changes color without deleting ingredients + Yeast, Cream, Baking Soda, and Quicklime help Dough and Batter rise + Deep-fried color when cooking Dough or Batter in hot Nut Oil, Butter, or Grease + Cooking Nut Meat makes some Nut Oil + Dough can be made with Vinegar + Cheese can be made with Yogurt + Yeast can ferment Milk into Cheese + Honey, Caramel, and Molasses can sweeten Water + Mixing Honey and Sugar Water creates Wax + Coffee Pumpkin Spice color variant ~ Tea and Coffee spawn warm ~ Moved Cream slightly ~ Moved Rad Cloud and Rad Steam slightly + Fat (Hidden) [Other] + Save menu includes Author and Description inputs + Save menu remembers your name for later + Save menu autofills info from current save + Some elements will forcefully save with color ~ Settings don't save when in a loaded save + Image tool works with Replace Mode + Image tool replaces pixels when holding Shift + Hidden count goes down in real time when unlocking + Clay Soil heats up into Brick + Clay and Dirt or Gravel makes Clay Soil + Clay freezes into Clay Soil + Nitro and Clay or TNT makes Dynamite ~ Dynamite must be broken or shocked to explode ~ Gunpowder is less powerful than Dynamite + Bubbles pop when broken + Soap removes Glue ~ Soap reactions are less instant + Mercury dirties Seltzer + Uranium dirties Slush + Uranium slowly melts Snow + Ozone pops Balloons + Greek Fire ignites on contact with Plasma + Bless removes Liquid Stench + Virus-infected pixels can be restored with Soap or Bless + Virus ignores Plasma + Malware can interrupt Virus restoration ~ Virus optimizations + Vertical and Horizontal can swap when given opposite energies + Heat Ray and God Ray have densities + Pyrite, Electrum, and Yogurt aliases ~ Hid Clay Shard ~ Moved Ball to Special ~ Updated Cheerful Mode description - Removed Sticky Bomb, Cluster Bomb, Electro Bomb, and Water Bomb - Instead available in new classic_explosives.js mod [Bug Fixes] ~ Fixed: Repairing with Glue duplicates material ~ Fixed: Painted Plant turns Light green ~ Fixed: Molten Sodium and Sodium Gas burn with too much Fire ~ Fixed: Melted and Rotten Cheese densities inconsistent ~ Fixed: Molasses boils into Sugar which immediately burns ~ Fixed: Single Dirty Water pixel turns infinite Snow to Slush ~ Fixed: Rad Steam doesn't form Rad Cloud when touching Cloud ~ Fixed: TPS accepts negative values ~ Fixed: Hive is draggable ~ Fixed: Nut Milk can't be mixed into Batter/Dough [Technical] + Shift-Picking a pixel copies its properties + Z key swaps to secondary element + Backspace swaps to previous element + Prop tool supports NaN and lowercase Infinity values ~ Unhid Prop + 'extinguish' element property (true/false) + 'forceSaveColor' element property (true/false) ~ Custom element names and spaces are normalized in buttons
2024-02-02 14:54:29 -05:00
*/
2023-04-22 10:40:04 -04:00
elements.dollar = {
color: ["#324a26","#4e8732","#54803d","#698a58","#8aa87b"],
behavior: [
"XX|XX|XX",
"XX|FX%0.25|XX",
"M2%10|M1%10|M1%10",
],
category: "powders",
tempHigh: 400,
stateHigh: ["ash","smoke","smoke","smoke"],
burn:50,
burnTime:200,
burnInto: ["ash","smoke","smoke","smoke"],
state: "solid",
density: 500
}
elements.butterfly = {
color: ["#ff562b","#ff7226","#ffdf2b","#2bfbff","#2134ff","#c226ff"],
tick: behaviors.FLY,
reactions: {
"sugar_water": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
"honey": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
"sap": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
"sugar": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
"soda": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
"caramel": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
"juice": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
},
foodNeed: 5,
tempHigh: 100,
stateHigh: "ash",
tempLow: 0,
stateLow: "dead_bug",
breakInto: "dead_bug",
category:"life",
burn:95,
burnTime:25,
state: "solid",
density: 600,
conduct: 1,
baby: "caterpillar",
}
elements.caterpillar = {
color: "#4b7847",
behavior: [
"XX|XX|XX",
"XX|FX%8|M2%1 AND BO",
"XX|M1|XX",
],
tick: function(pixel) {
if (pixelTicks - pixel.start > 500) {
changePixel(pixel,"butterfly");
}
},
reactions: {
"plant": { elem2:null, chance:0.1 },
"grass": { elem2:null, chance:0.1 },
"dead_plant": { elem2:null, chance:0.1 },
"sapling": { elem2:null, chance:0.1 },
"sakura": { elem2:null, chance:0.1 },
"sakura_seed": { elem2:null, chance:0.1 },
"sakura_blossom": { elem2:null, chance:0.1 },
"petal": { elem2:null, chance:0.1 },
"flower_seed": { elem2:null, chance:0.1 },
"wheat": { elem2:null, chance:0.1 },
"vine": { elem2:null, chance:0.1 },
"bamboo": { elem2:null, chance:0.1 },
"bamboo_plant": { elem2:null, chance:0.1 },
"evergreen": { elem2:null, chance:0.1 },
},
tempHigh: 100,
stateHigh: "ash",
tempLow: 0,
stateLow: "dead_bug",
breakInto: "dead_bug",
category:"life",
burn:95,
burnTime:25,
state: "solid",
density: 500,
conduct: 0.15
}
worldgentypes.spring = {
layers: [
[0.85, "dirt"],
[0.05, "rock"],
[0, "basalt"],
],
decor: [
["sakura_seed", 0.04, 20],
["sapling", 0.04, 20],
["pinecone", 0.04, 20],
["grass", 0.25, 30],
["butterfly", 0.02, 25],
["bee", 0.02, 25],
["firefly", 0.02, 25],
["rain_cloud", 1, 2],
["rain_cloud", 1, 6],
["rain_cloud", 1, 10],
],
baseHeight: 0.25
}
//if (!settings.bg) {settings.bg = "#00bfff";}