food mod compilation
This commit is contained in:
parent
65966dd0b7
commit
3242e064af
|
|
@ -0,0 +1,15 @@
|
||||||
|
var mods_to_include = ["mods/sbstuff.js","mods/ketchup_mod.js","mods/morefoodsmod.js","mods/weAllScreamFor.js","mods/soups.js","mods/pizzasstuff.js","mods/community_desserts.js","mods/plants.js","mods/aChefsDream.js"]
|
||||||
|
|
||||||
|
var mods_included = mods_to_include.map(mod => enabledMods.includes(mod));
|
||||||
|
var all_mods_included = mods_included.reduce(function(a,b) { return a && b });
|
||||||
|
|
||||||
|
if(!all_mods_included) {
|
||||||
|
var mods_needed = mods_to_include.filter(function(modPath) { return !(enabledMods.includes(modPath)) });
|
||||||
|
|
||||||
|
mods_needed.forEach(function(modPath) {
|
||||||
|
enabledMods.splice(enabledMods.indexOf("mods/food_mods"),0,modPath);
|
||||||
|
});
|
||||||
|
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||||
|
alert(`The following mods have been inserted: ${mods_needed.join(", ")}
|
||||||
|
Reload the page for the mods to take effect. Happy cooking!`)
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue