This commit is contained in:
slweeb 2023-06-04 18:38:09 -04:00
commit d23fcebae1
4 changed files with 65 additions and 4 deletions

40
mods/hidden_ground.js Normal file
View File

@ -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();
}
})

View File

@ -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",

19
mods/vibranium.js Normal file
View File

@ -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,
};

View File

@ -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).`);
};
};