sandboxels/mods/devtests.js

62 lines
2.4 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;
elements.rad_fluid.reactions = elements.radiation.reactions;