From ff8e8b934d845d6d85086d945a8f463b1696cdfd Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Thu, 18 Jan 2024 17:46:16 -0500 Subject: [PATCH] defineworldgen types now save to localStorage --- mods/a_mod_by_alice.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 624c9b92..553aacc1 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -4078,7 +4078,7 @@ color1 and color2 spread through striped paint like dye does with itself. col "category": "special", "breakInto": ["molten_ash","carbon_dioxide","charcoal","electric","magic"], "tempLow": 8000, - "stateLow": "plasma_torch", + "stateLow": new Array(99).fill("mystic_torch").concat("plasma_torch"), //1 in 100 chance to cool to a plasma torch, to mitigate inexplicable explosive cooling's tendency to cause the torch to spontaneously "downgrade" "hardness": 0.999 }; elements.mystic_fire.state = "gas"; @@ -26263,6 +26263,16 @@ Pixel size (rendering only): (Use if the save looks cut o //PRIMITIVE IN-GAME CONSOLE ## //featuring stars + customWorldTypes = {}; + if(localStorage.getItem("customWorldTypes") == null) { + localStorage.setItem("customWorldTypes",JSON.stringify(customWorldTypes)) + } else { + customWorldTypes = JSON.parse(localStorage.getItem("customWorldTypes")); + for(var name in customWorldTypes) { + worldgentypes[name] = customWorldTypes[name] + }; + rebuildWorldgenList() + }; var promptInputNullishes = ["null","none","","n/a"]; var eightSpaces = " ".repeat(8); @@ -27445,6 +27455,8 @@ height: ${height} }; }; worldgentypes[presetName] = newPreset; + customWorldTypes[presetName] = newPreset; + localStorage.setItem("customWorldTypes",JSON.stringify(customWorldTypes)); settings.worldgen = presetName; rebuildWorldgenList();