sandboxels/mods/devtests.js

142 lines
4.1 KiB
JavaScript
Raw Normal View History

2023-07-31 23:34:58 -04:00
elements.earthquake = {
color: ["#bda791","#997756","#613d19"],
tick: function(pixel) {
if (pixel.stage) {
var coords = circleCoords(pixel.x,pixel.y,pixel.stage);
if (pixel.stage >= pixel.mag) {
deletePixel(pixel.x,pixel.y);
return;
}
coords.forEach(function(coord){
var x = coord.x;
var y = coord.y;
if (!isEmpty(x,y,true)) {
var p = pixelMap[x][y];
if (p.element === "earthquake") { return }
if (elements[p.element].breakInto) {
// times 0.25 if not shiftDown else 1
if (Math.random() < (elements[p.element].hardness || 1) * (shiftDown ? 1 : 0.25)) {
var breakInto = elements[p.element].breakInto;
// if breakInto is an array, pick one
if (Array.isArray(breakInto)) {
breakInto = breakInto[Math.floor(Math.random() * breakInto.length)];
}
if (breakInto === null) {
deletePixel(p.x,p.y);
return;
}
var oldelement = p.element;
changePixel(p,breakInto);
if (elements[oldelement].breakIntoColor) {
p.color = pixelColorPick(p, elements[oldelement].breakIntoColor);
}
}
}
if (!elements[p.element].movable) { return }
tryMove(p,p.x,p.y-1);
}
})
pixel.stage++;
}
else if (!tryMove(pixel,pixel.x,pixel.y+1)) {
// random 10 to 20
pixel.mag = Math.floor(Math.random() * 10) + 20;
pixel.stage = 1;
}
},
category: "weapons",
state: "solid",
density: 100000000,
maxSize: 1,
cooldown: defaultCooldown,
excludeRandom: true,
Version 1.8.6 - Reaction Overload [Version 1.8.6 - August 21, 2023 - Reaction Overload] + Tomato + Sauce + Sensor - Detects movable pixels + Tuff - Formed from Ash and Magma + Clicking on an element again will deselect it + Sun world gen type [Changes] ~ Moved Salt to Food category [Feedback?] + Supernovae create many more elements + Stench now dissipates over time + Humans can drink Soda + Worms turn Ash and Crumbs into some Dirt + Birds can eat Crumbs + Birds and Rats spawn at body temperature + Flies can eat Honey + Grapes can be crushed by Limestone + Grapes will stick to Vine on all sides + Some Vines can grow Grapes or Tomatoes + Ketchup can be radiated + Eggs will crack if Rocks land on them + Seeds element can spawn Cacti + Candy breaks into Sugar + Snails break into Calcium + Lichen and Pollen break into Dust + Fleas and Termites die when broken + All seeds can be broken or frozen + Mercury can turn to Gold when hit with Neutrons + Mercury kills Plant and Grass + Grass can photosynthesize + Yogurt color variants for milk variants + Foam freezes into Dry Ice + Steel and Bronze can oxidize + Brass can corrode on contact with Ammonia + Confetti slowly breaks down in Water + Pool Water, Steam, Primordial Soup, and Fire can oxidize things + Charcoal purifies Pool Water + Charcoal desaturates Alcohol + Dioxins are absorbed by Ash and soils + Dioxin, Lead, and Solder dirty Water + Baking Soda and Acid reaction + Calcium and Water reaction + Limestone releases some Carbon Dioxide when heated + Quicklime can be converted back to Limestone with CO₂ + Slaked Lime with Milk can make Glue + Lamp Oil starts burning at 220°C + Lamp Oil breaks down Wax + Lasers can break into Light ~ Liquid Light dissipates much slower + Light hitting Oxygen high up can form Ozone + Ozone forms when Lightning hits a body of Water + Ozone can kill Cells, Cancer, Infection, Plague, and small animals ~ Ozone oxidizes things faster than Oxygen + Ozone removes Chlorine + Chlorine can damage Tree Branches, Roots, and Pistils + Chlorine and burning Oil reaction + Chlorine and Baking Soda reaction + Chlorine and Sodium reaction + Greek Fire ignites on contact with water + Greek Fire recipe ~ Greek Fire no longer is burning by default + Sand and Vinegar can put out Greek Fire + Greek Fire and Vinegar can wet soil + Vinegar and Sodium also produces Hydrogen + Vinegar boils into Carbon Dioxide and Methane + Methane and Propane can be ignited with electricity + Sodium and Water also produces Hydrogen ~ Tweaked Sodium and Water reaction + Sodium can react with Pool Water and Primordial Soup + Uranium radiates Primordial Soup slowly + Primordial Soup is killed by Soap, Alcohol, and Mercury + Fish and Worms can swim in Primordial Soup + Primordial Soup converts Blood to Antibodies + Bleach deletes Blood + Bleach turns Poison into a gas + Skin wound healing + Skin will sweat to regulate temperature + Skin will bleed on contact with Acid + Skin will convert Cells ~ Infection no longer turns Cells to Cancer + Skin can spread Cancer + Skin and Hair can be radiated + Skin and Hair can break into Dust + Hair can burn into some Stench + Hair can be poisoned + Antidote deleting Poison is more random ~ Cement is more random when hardening + Nitro explodes on smash ~ Ammonia and Methane reaction also makes Hydrogen and Water ~ Tweaked Lead color + Molten Metal Scrap + Ammonia Ice + Oxidized Copper alias Copper Carbonate + Oil alias Petroleum + Alcohol, Cement, Concrete, and Cloners display with dark text + JavaScript disabled message + Unmixable elements specified in info page ~ Tweaked Drag color ~ Reordered Machines category ~ Randomized social link at bottom [Bug Fixes] ~ Fixed: Mods don't show in Mod Manager and can't be removed after crash ~ Fixed: Scroll disabled on fullscreen ~ Fixed: Pixels float if Drag is unselected by middle click or E prompt ~ Fixed: Border and Rainbow can be moved by Drag ~ Fixed: Border can be destroyed by Strange Matter ~ Fixed: Tools can be placed with Image tool ~ Fixed: Heat Ray doesn't make single pixels change state ~ Fixed: Bless doesn't remove Poison Gas or Poison Ice ~ Fixed: Heads don't fall through gases ~ Fixed: Rotten Meat at abs zero creates living abs zero flies ~ Fixed: Charcoal dirties Salt Water ~ Fixed: Pistils don't conduct heat or spread burning ~ Fixed: Density too high for Poison Gas, Dioxin, Liquid Ammonia, and Gallium Gas ~ Fixed: Sodium Acetate foams forever ~ Fixed: Lettuce can't be mixed into Dough or Batter [Technical] + Special Unknown element + Used when no element is selected + Replaces pixels created with invalid element + Will show the invalid element in Debug
2023-08-21 16:08:55 -04:00
}
elements.rad_fluid = {
behavior: behaviors.LIQUID,
category: "liquids",
density: 1500,
state: "liquid",
}
elements.rad_fluid.color = elements.radiation.color;
Sandboxels v1.9.1 [Version 1.9.1 - December 1, 2023 - Cozy Solstice] + Pipe 1. Draw a line with Pipe, maybe while paused 2. Wait for walls to form around it 3. Erase an exit point and allow Pipe to generate + Mayo + Mulch + Porcelain Shard (Hidden) + Jelly (Hidden) [Coffee] + Coffee Bean + Coffee Ground (Hidden) + Coffee (Hidden) [Nuts] + Nuts + Nut Meat (Hidden, from crushing) + Nut Butter (Hidden, from cooking) + Nut Milk (Hidden, from soaking) [Festivities] + Candy is candy cane-colored + Mashed Potato (Hidden) + Skin will warm itself up when cold [Other Changes] + Roots grow through Grass ~ Saplings no longer turn to wood all at once ~ Tree Branches no longer grow when burning ~ Tree Branches, Plant, and Grass are less flammable + Soda deoxidizes Rust and Copper + Balloons pop near absolute zero + Balloons pop when touching Clouds + Humans can consume Tomatoes, Pumpkin Seeds, and Cream + Humans get gas when eating Beans + Humans can take Gold Coins + Skin spawns at average body temperature ~ Skin no longer heals wounds + Snails can eat Lettuce + Tadpoles and Evergreen can be smashed ~ Rats no longer eat Rotten Meat + Rats can drink Milk + Lichen convert Gravel and Rock Wall to Dirt + Yeast ferments Sugar Water and Soda + Caramel freezes into Candy much colder + Baked Batter breaks into Crumbs + Rotten Meat or Cheese and Flies remove Fragrance + Primordial Soup spawns at a warmer temperature + Ammonia affects Pumpkin Seeds, Herbs, and Tomatoes + Glue can fix shards + Salt makes Water colder + Water breaks down Confetti into Cellulose + Hydrogen burns into some Steam + Hydrogen fusion releases Neutrons + Anesthesia breaks down to Oxygen at high temperatures + Castner–Kellner process + Sodium and Mercury reaction shocks and releases heat + Sulfur burns into Stench + Sugar dissolves in Milk + Salt dissolves in Sauce and Melted Cheese + Juice can be radiated + Carbonating Juice makes Soda + Seltzer can dissolve Limestone over time + Water can weather Limestone into Sand + Vinegar slowly dissolves the shell of Eggs + Baking Soda releases CO₂ when heated + Tuff melts into Magma + E-cloner ignores Wire, Sensor, and Battery + Cloners ignore Wall + Incense recipe ~ Fragrance now dissipates over time ~ Oxygen spreads Fragrance and Stench slower ~ Molten Solder no longer makes Fire ~ Recolored Molten Solder ~ Recolored Gold Coin + Insulation won't mix unless Shift is held + LEDs can break into Glass Shards + Cloners display element on hover + Author name appears if present in loaded save + Pressing ; toggles Replace mode + Methane Ice - Removed Molten Baking Soda [Bug Fixes] ~ Fixed: Flicker when stepping frame ~ Fixed: Lamp Oil burns forever ~ Fixed: Mushroom Gills don't conduct heat ~ Fixed: Pumpkin, Stained Glass, Skin, Sponge, E-cloner can be dragged ~ Fixed: God Raying Gray Goo makes Rainbow ~ Fixed: Soda deletes Salt Water quickly ~ Fixed: Juice Ice darkens when melting ~ Fixed: Sand from Water weathering Tuff uses wrong color ~ Fixed: Hail doesn't apply color variants when breaking ~ Fixed: Confirmation appears when dropping save onto empty canvas ~ Fixed: Sauce density too high ~ Fixed: Hail is way too cold ~ Fixed: Humans continue panicking after extinguished ~ Fixed: Cloned pixels don't change state based on Cloner temperature ~ Fixed: Antifire doesn't react with Antifluid right ~ Fixed: Porcelain reforms immediately after breaking when hot ~ Fixed: Hot Bomb often melts itself ~ Fixed: Hard Yolk can't be mixed into Batter/Dough [Technical] + Prop tool + Option for uncompressed raw save data ~ Save version is now sb2 ~ New saves may not work in older versions ~ Old saves will work fine + Version handling system, warnings + Random will work when placed by cheating ~ FW_Ember no longer has a long name + runAfterAutogen function
2023-12-01 17:26:30 -05:00
elements.rad_fluid.reactions = elements.radiation.reactions;
elements.time_reverse = {
color: "#ffffff",
perTick: function() {
pixelTicks -= 2;
},
rotatable: true,
category: "special",
canPlace: false,
}
elements.steam_train = {
color: "#DFDFDF",
behavior: [
"XX|CR:smoke|XX",
"BO AND M1|XX|CR:smoke",
"XX|CR:smoke|XX",
],
category: "gases",
density: 99999,
state: "gas",
}
elements.polish = {
color: "#aba593",
tool: function(pixel) {
if (elements.polish.reactions[pixel.element] && Math.random()<0.25) {
var r = elements.polish.reactions[pixel.element];
var color2 = r.color2;
if (color2 !== undefined) {
if (Array.isArray(color2)) { color2 = color2[Math.floor(Math.random()*color2.length)]; }
var rgb = hexToRGB(color2);
pixel.color = "rgb("+rgb.r+","+rgb.g+","+rgb.b+")";
}
}
},
behavior: [
"M2|M1|M2",
"M1|DL%10|M1",
"M2|M1|M2",
],
reactions: {
"wood": { color2:"#872b00" },
"glass": { color2:"#526158" },
},
burn: 100,
burnTime: 2,
state: "gas",
canPlace: true,
category: "gases",
stain: -0.5
}
window.addEventListener("load", function() {
eLists.FOOD = [];
for (var element in elements) {
if (elements[element].isFood) {
eLists.FOOD.push(element);
}
}
})
elements.food = {
color: ["#359100","#74b332","#b9d461","#dede7a"],
tick: function(pixel) {
// Choose randomly from eLists.SEEDS
changePixel(pixel,eLists.FOOD[Math.floor(Math.random()*eLists.FOOD.length)]);
},
category: "food"
}
2023-12-14 15:20:52 -05:00
elements.liquid = {
behavior: [
"XX|XX|XX",
"M2|XX|M2",
"M1|M1|M1",
],
category: "special"
}