sandboxels/mods/building.js

119 lines
2.9 KiB
JavaScript
Raw Normal View History

Version 1.11 - February 21, 2025 - Everyone's Update [Version 1.11 - February 21, 2025 - Everyone's Update] + Portals! + Portal In and Portal Out elements + Portals teleport pixels and electricity + Coral + Grows in Water + Bleaches in high temperatures + Adobe, made from Mud and Straw + Element translations for Turkish and Hungarian [Electricity Rework] ~ Electricity is now more consistent in highly conductive material ~ Sensors give out a single charge instead of 4 ~ Pixels now store when they were charged ~ Note: Effects on existing builds should be limited but please report any issues [Changes] + Liquid pixels of the same element move around + Tiny canvas size + Molten elements oscillate color (Experimental) ~ Pixels can now exist along the border of the canvas ~ Disabling Staining will clear all existing pixel stains + Dye, Paint, etc. retain their selected color independently + Radioactive Tornado variant + Humans panic when shocked ~ Humans are less heat-resistant ~ Pipes are no longer unbreakable + Smoke rises in normal air density ~ Tweaked Fire and Cold Fire behavior + Sabatier process for producing Methane + Bergius process for producing Oil + Acid reacts with Potassium ~ Increased Methane autoignition point + Uranium radiates Glass on contact + Burning Lamp Oil explodes in Water + Liquid Ozone explodes when broken or shocked + Molten Gallium can react with Gold Coins + Slaked Lime reacts with Carbon Dioxide + Molten Plastic evaporates + Glue turns Color Sand into Stained Glass + Butter and Caustic Potash make Soap + Neutrons radiate Glass, Clouds, and Water ~ Light absorbed by LEDs is deleted ~ Foam made from Oxygen + Water releases the Oxygen ~ Tweaked Bleach and Acid reaction ~ Increased Molten Sulfur freezing point ~ Tweaked Smash tool + Cyanide dirties Water variants + Infection dirties Water + Tea and Coffee bubble when hot + CO2 carbonates Salt Water instead of dirtying + Soda and Seltzer release Foam when mixed + Pilk creates Foam + Cells can ferment Milk variants ~ Cells ferment Milk slower ~ Cheese keeps color when breaking into powder (Pilk Powder?) ~ Caramel is more heat-resistant ~ Acid turns Humans into Bone ~ Birds are less flammable + Fish turn to white meat when cooked + Worms can compost Petal, Pistil, and Vine + Rats can eat Hard Yolk + Alcohol calms Humans + Humans panic from bad smells + Smog breaks into Dirty Water ~ Fireworks create less Carbon Dioxide + Bless can fix Brick Rubble + Midas Touch converts some metals to Gold variants + Malware can affect Snake ~ Pointer retains same speed at any TPS ~ Optimized Cell and Cancer ~ Recolored Pipe Wall ~ Improved Slug, Brick, and Ruins buttons ~ Hid Liquid Oxygen ~ Unhid Liquid Hydrogen ~ Moved Liquid Hydrogen to Liquids ~ Moved Poison Gas to Gases + Liquid Nitrogen alias 'LN2' + Electric alias 'Electron' + Light alias 'Photon' + Nut Oil alias 'Cooking Oil' + Epsom Salt alias 'Magnesium Sulfate' + Pyrite alias 'Iron Sulfide' + Limestone alias 'Calcium Carbonate' + Quicklime alias 'Calcium Oxide' + Slaked Lime alias 'Calcium Hydroxide' ~ Petal displays with dark text ~ Slightly moved Porcelain + Built-in dialog boxes ~ Canvas touches the top of the page ~ Wide canvas size takes up more screen space ~ White border no longer shown on wide canvas size ~ Buttons, menus, and the canvas have thicker borders ~ "Elem" in stats bar is no longer uppercase ~ Unknown has no grain - Loading a save no longer changes your selected element + Ctrl+S to bring up save prompt + Ctrl+Shift+S to instantly save canvas + Retroactive changelogs for versions v0.1-v0.4 + Bluesky social link + Partial translations for Ukrainian, Toki Pona, and Halacae + Finished translations for Spanish and Russian [Bug Fixes] ~ Fixed: Oxygen from hydrolysis immediately turns to Foam ~ Fixed: Menu heights vary dramatically with long categories ~ Fixed: Mod Manager and Info Screen text boxes don't stick to bottom ~ Fixed: Lattice Wars appear without borders ~ Fixed: Smash tool breaks harder elements faster ~ Fixed: Error in console on page load ~ Fixed: Artifacts above stats bar text on Chrome ~ Fixed: Console logging when Hail breaks a pixel ~ Fixed: Milk variants still heat into Yogurt ~ Fixed: Controls still show Smooth View keybind ~ Fixed: "Save to File" button cut off on some small screens ~ Fixed: Many aliases can't be used in Element Select ~ Fixed: Prop tool doesn't change pixel state when changing temperature ~ Fixed: Grenades stop moving while charged ~ Fixed: Lightning doesn't reach bottom on large canvases ~ Fixed: Ghost pixels when placing Foam with low air temperature set ~ Fixed: 'CR' behavior cell errors with low air temperature set [Technical] + Portal 'channel' property can be set with the Prop tool (Integer) + runAfterReset function + isBreakable function + 'breakIntoColorMultiplier' element property + 'onMoveInto' element property, called when another pixel moves into it (function(pixel1,pixel2)) + 'chargeStart' pixel property ~ 'breakIntoColor' element property can be used without 'breakInto' + 'sense' sensor property to detect a certain element ~ Optimized electricity ~ Fire is affected by air density + View setting dropdown includes views added by mods ~ currentSaveData is now always defined, and holds metadata about the current canvas, even non-saves + currentSaveData always contains a UUID for seeded randomness ~ Default max pixel count slightly increased ~ Save version is now sb3 ~ Canvas border width is now stored (Default 1 for old saves) ~ Pixel properties with value "undefined" are skipped + Error message in console for broken translation files + GUI translation support + More GUI elements have IDs + Future standalone mode
2025-02-21 13:47:50 -05:00
// elements.mud_brick = {
// color: "#8a6249",
// colorPattern: textures.BRICK,
// colorKey: {
// "l": "#986c51",
// "r": "#8a6249",
// "d": "#7f5943",
// "w": "#634933"},
// behavior: behaviors.WALL,
// category: "solids",
// state: "solid",
// tempHigh: 1200,
// stateHigh: "molten_dirt",
// hardness: 0.33,
// breakInto: "dirt"
// }
Sandboxels v1.9.5 - Update of the Summer [Version 1.9.5 - May 15, 2024 - Update of the Summer] + Mixer + Grinder + Kelp + Freeze Ray + Cloth, made from glueing Feathers + Aurora Borealis, when Protons excite Oxygen high up [Quality of Life] + Mobile Shift button + Intensified tools and line drawing on mobile + Canvas Size setting + Lookup tool can have a bigger radius [Changes] + Tornado Fire, Sand, and Water variant + Tornaodes, Earthquakes, and Tsunamis can merge ~ Tsunamis no longer clone molten and other dense liquids + Sand and Ash in Tornadoes create Cloud variants + Tornadoes are immune to explosions + Disasters are immune to Acid + Bless can remove disasters + Bless turns Rotten Cheese to a blue variant + Pipes retain color in saves + Silver absorbs Neutrons (Nuclear control rods) ~ Room Temp tool now uses air temperature in Settings ~ Unhid Lattice ~ Oil burns slower + Rocks will trample Grass + Glue can convert Cellulose to Paper + Fleas will eat Plant + Salt powder slowly kills Plant + Alcohol Gas ignites at high temperatures + Liquid Light is immune to Acid + Cement neutralizes Acid ~ Gallium reaction breaks down some Aluminum again + Charcoal breaks down at extreme temperatures ~ Hydrogen reaction now depletes Sulfur ~ Water reaction now depletes Caramel + Juice Ice breaks into Slush + Ink mixes with Dye + Sugar dissolves in Juice + Fruit Milk dissolves in Tea + Nut Milk can wet soil + Humans burn on the Sun + Humans steal Diamonds + Bees and Cyanide irritate Skin + Mycelium breaks down dead matter + Mycelium and Hyphae will rot Meat + Rats eat Cured Meat + Ketchup-Baking Soda reaction is more fizzy ~ Snails turn to Limestone instead of Quicklime + Slaked Lime-Seltzer reaction + Limestone-Acid reaction creates byproducts ~ Cooled Quicklime forms a Limestone layer ~ Quicklime-Water reaction produces more heat ~ Lowered Quicklime melting point + Hot Quicklime produces Flash ~ Potassium-Chlorine reaction produces Fire + Potassium Salt reacts with hot Sodium + Potassium Gas (Hidden) + Bless cleans stains left by reactions + Bless cures Meat + Bless removes Dust and Grease ~ Improved Dead Plant coalification ~ Rockets no longer expel Cloners + Lattice reacts with Cold Fire + Gray Goo can melt + Virus is killed by Liquid Light + Static mouseover effect + Static breaks into Malware ~ Moved Ball to Special ~ Moved Pop when unhidden ~ Border element button shows stripes ~ Recolored Glitter ~ Recolored fermented Grape ~ Hid Clone Powder + Potassium Salt alias 'Potassium Chloride' ~ Tweaked electricity for low-conductivity elements ~ Updated Settings menu + Maximum pixel count, with red indicator ~ Optimized very large explosions [Bug Fixes] ~ Fixed: Gaps when drawing fast on mobile ~ Fixed: Middle clicking empty space causes freeze ~ Fixed: Bless and Rock Wall can't be drawn in a line ~ Fixed: Gapes when drawing Bless and Rock Wall fast ~ Fixed: Bless and Rock Wall don't display info ~ Fixed: Bless and Rock can't use Replace Mode ~ Fixed: Brown Dwarf Suns can emit Light when eclipsed ~ Fixed: Language selector doesn't update on refresh ~ Fixed: Mouse size continues increasing past max size ~ Fixed: Uncharge tool doesn't put out LEDs ~ Fixed: Water extinguishes Greek Fire and Firework over and over ~ Fixed: Dragging at tick 0 freezes pixels in place ~ Fixed: Evergreen info page displays NaN ~ Fixed: Spawned Molten Magnesium behaves strange when heated ~ Fixed: Copper Sulfate freezing point is too low ~ Fixed: Stained Glass doesn't retain color when exploded ~ Fixed: Stained Glass placed at tick 0 doesn't retain color ~ Fixed: Antimatter and Antimatter Bomb trigger each other ~ Fixed: Strange Matter destroys Cloners ~ Fixed: Nothing can clone Wire ~ Fixed: TPS prompt displays error after canceling ~ Fixed: Decimal coordinates when resetting with odd canvas size ~ Fixed: No double state change when spawning at high airTemp ~ Fixed: Pixels retain clone property when changed ~ Fixed: Crash when mod deletes Sand ~ Fixed: Elements with single-color arrays have black buttons ~ Fixed: 'perTick' error when loading page ~ Fixed: 'fillStyle' error when loading page [Technical] + Behavior grids bigger than 3x3 are centered + Behavior grids can be smaller than 3x3 + Moddable behavior rules ~ Behavior rules are stored in new behaviorRules object + SM (Smash) behavior rule + MX (Mix) behavior rule (MX:true to mix solids) + CC (Change Color) can now take a target, e.g. CC:sand>#00ffff ~ CC (Change Color) no longer applies grain + EX (Explode) follows element 'ignore' property ~ Placed Paint and Shock tools are removed by Unpaint and Uncharge
2024-05-15 12:53:21 -04:00
var materials = ["brick","concrete","wood","glass","steel"];
elements.tower = {
color: [],
behavior: [
"XX|XX|XX",
"XX|CH:"+materials.join("_tower,")+"_tower|XX",
"XX|XX|XX",
],
category: "spawners",
maxSize: 1,
cooldown: defaultCooldown,
}
materials.forEach((elem) => {
if (Array.isArray(elements[elem].color)) {
elements.tower.color.push(elements[elem].color[0]);
}
else {
elements.tower.color.push(elements[elem].color);
}
elements[elem+"_tower"] = {
color: elements[elem].color,
behavior: [
`XX|M2|XX`,
`XX|C2:${elem}_room|XX`,
`XX|M1|XX`,
],
maxSize: 1,
cooldown: defaultCooldown,
category: "spawners"
}
elements[elem+"_room"] = {
color: elements[elem].color,
behavior: [
`XX|XX|CR:${elem}_room,${elem}_room,${elem}_room,${elem}_room,tower_antenna,wood_roof%80|XX|XX`,
`XX|XX|XX|XX|XX`,
`CR:${elem}|CR:${elem}|CR:${elem}|CR:${elem}|CR:${elem}`,
`CR:glass|XX|XX|CR:human%25|CR:glass`,
`CR:glass|CR:human%25|DL|CR:human%25|CR:glass`,
`CR:${elem}|XX|XX|XX|CR:${elem}`,
`CR:${elem}|CR:${elem}|CR:${elem}|CR:${elem}|CR:${elem}`,
`XX|XX|XX|XX|XX`,
`XX|XX|XX|XX|XX`
],
maxSize: 1,
cooldown: defaultCooldown,
category: "spawners",
hidden: true
}
})
elements.tower.color = elements.tower.color.sort();
elements.tower_antenna = {
color: "#bababa",
behavior: [
"CR:steel%30",
"CR:steel",
"CR:steel",
"CR:steel",
"CH:steel",
"CR:steel",
"XX",
"XX",
"XX",
"XX",
],
maxSize: 1,
cooldown: defaultCooldown,
category: "spawners",
hidden: true
}
elements.wood_roof = {
color: "#965829",
behavior: [
"XX|XX|XX|XX|XX|XX|XX",
"XX|XX|XX|CR:wood|XX|XX|XX",
"XX|XX|CR:wood|CH:wood|CR:wood|XX|XX",
"XX|CR:wood|XX|XX|XX|CR:wood|XX",
"CR:wood|XX|XX|XX|XX|XX|CR:wood",
],
maxSize: 1,
cooldown: defaultCooldown,
category: "spawners",
hidden: true
}
worldgentypes.city = {
layers: [
[0.95, "grass"],
[0.50, "dirt"],
[0.05, "rock"],
[0, "basalt"],
],
decor: [ // [element, chance, distance from top]
["tower", 0.08],
// ["bird", 0.025, 10],
],
baseHeight: 0.25
}