diff --git a/mods/hidden_ground.js b/mods/hidden_ground.js new file mode 100644 index 00000000..94b8534e --- /dev/null +++ b/mods/hidden_ground.js @@ -0,0 +1,40 @@ +// Hidden Ground v1.0 +// Author: Melecie + +runAfterLoad(function() { + if (enabledMods.includes("mods/the_ground.js")) { + let regexRocks = /(granite)|(rhyolite)|(pumice)|(obsidian)|(dacite)|(dacidian)|(andesite)|(diorite)|(scoria)|(andesidian)|(gabbro)|(basalt)|(basalidian)|(peridotite)|(komatiite)|(komatidian)/ + let regexType = /(_gravel)|(_sand)|(_dust)|(_shard)|(hot_)/ + let toHide = ["dry_permafrost", "hot_sand", "hot_dirt", "hot_rock", "hot_rock_wall", "hot_gravel", "hot_limestone", "hot_calcium_carbonate_dust", "sandy_water", "clay_water", "dry_clay_loam"] + + // hides all elements part of both rocks and type + // false positives *can* be hit because this doesn't check if it comes from The Ground (it can't), but ideally none given how specific it is + for (elem in elements) { + if (regexRocks.test(elem)) { + // move wall to solids to not make land too big + if (/_wall/.test(elem)) { + elements[elem].category = "solids" + } + // hide the rest + if (regexType.test(elem)) { + elements[elem].hidden = true; + } + } + } + + // manual hiding + for (elem in toHide) { + elements[toHide[elem]].hidden = true; + } + + // while i'm here, might as well fix Sandstone's color + elements.sandstone.color = "#dbbe80"; + } + + else { + enabledMods.splice(enabledMods.indexOf("mods/hidden_ground.js"), 1); + localStorage.setItem("enabledMods", JSON.stringify(enabledMods)); + alert("Hidden Ground: This mod requires The Ground mod. Removing mod and reloading."); + window.location.reload(); + } +}) \ No newline at end of file diff --git a/mods/random_things.js b/mods/random_things.js index d1ed8e04..6c7755ee 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -16,6 +16,7 @@ elements.legendary_energy = { reactions: { "magma": { "elem1": "armageddon", "elem2": null }, "void": { "elem1": "light", "elm2": null }, + }, } runAfterLoad(function() { @@ -33,10 +34,11 @@ runAfterLoad(function() { state: "liquid", density: 2000, excludeRandom: true, - reactions" { + reactions: { "magma": { "elem1": "armageddon", "elem2": null }, - "void": { "elem1": "light", "elm2": null } - } + "void": { "elem1": "light", "elm2": null }, + }, + }, elements.banana_juice = { name: "banana juice", color: "#e0f542", diff --git a/mods/vibranium.js b/mods/vibranium.js new file mode 100644 index 00000000..e29faf4d --- /dev/null +++ b/mods/vibranium.js @@ -0,0 +1,19 @@ +}; +elements.vibranium + color:"#455357", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + tempHigh: 1000000000, + conduct: Infinity, + hardness: 1, +}; +elements.uru + color: "#719aa6", + behavior: behaviors.WALL, + catagory: "solids", + state: "solid", + tempHigh: 1000000000, + conduct: 0, + Hardness: 1, +}; diff --git a/yumcherries.js b/mods/yumcherries.js. similarity index 97% rename from yumcherries.js rename to mods/yumcherries.js. index 90b335ae..1d4b786d 100644 --- a/yumcherries.js +++ b/mods/yumcherries.js. @@ -540,4 +540,4 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod); localStorage.setItem("enabledMods", JSON.stringify(enabledMods)); alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`); -}; \ No newline at end of file +};