From a22924c5dc88375f48da856207990d05080e3634 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sun, 16 Jan 2022 20:17:12 -0500 Subject: [PATCH] mod manager update --- changelog.txt | 16 +- index.html | 727 ++++++++++++++++++++++++++++---------------- mods/example_mod.js | 40 +++ mods/test.js | 8 +- 4 files changed, 528 insertions(+), 263 deletions(-) create mode 100644 mods/example_mod.js diff --git a/changelog.txt b/changelog.txt index 3957c934..fa89a58c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,7 +2,21 @@ + Artists' Update (Painting, Lines, Shapes, etc.) + Explosives Update + Machines Update - + Mod Manager Update + +[Version 0.9 - Mod Manager Update] + + Mod Manager Menu + + Clay Soil + + Salt Water, Sugar Water, and Dirty Water evaporate into their components + + Blood, Ketchup, Molasses, Slime, Vinegar, and Alcohol evaporate into their components + + Reactions between cloud types + + Acid Gas can form Acid Clouds + + Fire Clouds turn to Pyrocumulus when cooled + + Torches can be extinguished with water + + Some Fireballs will burn into steam + ~ Improved color of Permafrost, Dirt, Grass, Gravel, Basalt, Lamp Oil, Honey, Molasses, Chocolate Syrup, Bamboo, Corn, Corn Seed, Root, Potato Seed, Iron, Rust, Glass, Copper, Zinc, Tin, Silver, and Straw + ~ Anaesthesia now a gas + + Technical: stateHigh and stateLow can be an array, a random option is chosen + ~ Fixed: Fireball rocks continue to burn after being extinguished [Version 0.8.3] + Laser diff --git a/index.html b/index.html index 2877352e..1d40ccdb 100644 --- a/index.html +++ b/index.html @@ -76,7 +76,7 @@ -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; } - #infoScreen { + #infoScreen, #modManager { border: 1px solid #ffffff; position: absolute; left: 50%; @@ -87,18 +87,20 @@ padding: 10px; background-color: rgb(31, 31, 31); display: none; - overflow-x: scroll; + overflow-x: hidden; } - #infoTitle { + .menuTitle { font-size: 1.5em; text-decoration: underline; } - #infoText { - margin-top: 15px; - white-space: pre-wrap; + .menuText { + margin-top: 5px; line-height: 1.5em; } - #infoX { + #infoText { + white-space: pre-wrap; + } + .XButton { position: absolute; right: 0px; top: 0px; @@ -108,10 +110,10 @@ text-align:center; border: 1px solid #ffffff; } - #infoX:hover { + .XButton:hover { background-color: rgb(200, 33, 33); } - #infoSearch { + #infoSearch, #modManagerUrl { position: absolute; bottom: 0px; width: 100%; @@ -122,11 +124,46 @@ color: white; font-size: 1.5em; padding: 10px; + padding-left: 50px; font-family: 'Press Start 2P'; } - #infoSearch:focus { + #infoSearch:focus, #modManagerUrl:focus { outline: none; } + #modManagerAdd { + position: absolute; + bottom: 0px; + right: 0px; + height: 50px; + width: 50px; + transform: translate(-25%, -25%); + background-color: rgb(0, 190, 32); + color: white; + font-size: 2em; + padding: 10px; + font-family: 'Press Start 2P'; + } + #modManagerList { + margin-top: 20px; + } + #modManagerList li { + list-style-type: none; + position: relative; + } + #modManagerList li::before { + content: '•'; + position: absolute; + left: -1.5em; + font-size: 1em; + font-family: 'Press Start 2P'; + } + .removeModX { + color: red; + cursor: pointer; + } + .removeModX:hover { + color: rgb(255, 107, 107); + } .infoLink { color: rgb(116, 140, 221); cursor: pointer; @@ -278,10 +315,32 @@ + + @@ -5271,4 +5482,4 @@ for (var k = 0; k < b0.split(" AND ").length; k++) { - + \ No newline at end of file diff --git a/mods/example_mod.js b/mods/example_mod.js new file mode 100644 index 00000000..96f99aa4 --- /dev/null +++ b/mods/example_mod.js @@ -0,0 +1,40 @@ +// This is how to add a new mod to the game. + +// Create a new Javascript file like this one. +// Add the file to the mods folder on GitHub, or host it somewhere else. +// https://github.com/slweeb/sandboxels/tree/main/mods + +// To add it in the Mod Loader: +// If it is in the mods folder, you can just use the name of the file. +// If it is hosted somewhere else, you can use the full URL, including the HTTPS://. + +// Adding elements: +elements.mayo = { + color: "#ffffff", + behavior: behaviors.LIQUID, + category: "liquids", + viscosity: 100000, + state: "liquid", + density: 720, +}; + +// Changing existing elements: +elements.water.color = "#ff0000"; +elements.water.behavior = behaviors.WALL; + +// Removing elements: +// Be aware, things may break +delete elements.ketchup; + +// Adding behavior presets: +behaviors.SELFDELETE = [ + "XX|XX|XX", + "XX|DL|XX", + "XX|XX|XX", +]; + +// Creating eLists: +eLists.CONDIMENT = ["ketchup","melted_cheese","mayo"]; +// Adding elements to eLists: +eLists.CONDIMENT.push("honey"); + diff --git a/mods/test.js b/mods/test.js index 557c1b18..c1bcce8b 100644 --- a/mods/test.js +++ b/mods/test.js @@ -1,8 +1,8 @@ -elements.mustard = { - color: "#ffff00", +elements.mayo = { + color: "#ffffff", behavior: behaviors.LIQUID, category: "liquids", - viscosity: 60000, + viscosity: 100000, state: "liquid", density: 720, -} \ No newline at end of file +}; \ No newline at end of file