Create descriptions.js

It's a mod that adds descriptions to most sandboxels elements.
This commit is contained in:
MollTheCoder 2023-07-03 12:46:13 -04:00 committed by GitHub
parent 8312033862
commit 4b069a9422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

12
mods/descriptions.js Normal file
View File

@ -0,0 +1,12 @@
console.log("descriptions.js: Loading vanilla descriptions...");
fetch("https://sandboxels-mods.mollthecoder.repl.co/descriptions/vanilla.json")
.then(res=>{
res.json().then(json=>{
for(const element in json) {
// If the element doesn't exist (for example, nocancer2.js) then don't try to change it.
if(!elements.hasOwnProperty(element)) continue;
elements[element].desc = json[element];
}
console.log("descriptions.js: Loaded vanilla descriptions!");
});
});