Create descriptions.js
It's a mod that adds descriptions to most sandboxels elements.
This commit is contained in:
parent
8312033862
commit
4b069a9422
|
|
@ -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!");
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue