Add query param to load a specific mod list

?loadTheModList
This commit is contained in:
O-01-67 2022-10-04 20:08:44 -04:00 committed by GitHub
parent cf38e9ada6
commit 81843ca301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,16 @@
urlParams = new URLSearchParams(window.location.search);
if(urlParams.get('loadTheModList') !== null) { //if the variable exists at all
loadTheModList = true
} else { //if it doesn't (and it returns null)
loadTheModList = false
}
if(loadTheModList) {
enabledMods = ["mods/adjustablepixelsize.js", "mods/boiling_rock.js", "mods/chalcopyrite.js", "mods/clone_liquid.js", "mods/conveyance.js", "mods/CrashTestDummy.js", "mods/crimson.js", "mods/delete_all_of_element.js", "mods/evenmoretemptools.js", "mods/extra_element_info.js", "mods/fairy_chain.js", "mods/fantastic_creatures.js", "mods/fey_and_more.js", "mods/glenn_gases.js", "mods/grav_mudstones.js", "mods/icb.js", "mods/iean.js", "mods/ketchup_mod.js", "mods/laetium.js", "mods/liquid_energy.js", "mods/metals.js", "mods/minecraft.js", "mods/minesweeper.js", "mods/more_breaking.js", "mods/more_fairies.js", "mods/moreliquids.js", "mods/moretools.js", "mods/move_tools.js", "mods/nested_for_reaction_example.js", "mods/Neutronium Mod.js", "mods/portal.js", "mods/pushers.js", "mods/rainbow_tests.js", "mods/random_elems.js", "mods/random_liquids.js", "mods/random_rocks.js", "mods/randomness.js", "mods/randomness_but_tick.js", "mods/randomness_but_tool.js", "mods lag_fix.js", "mods ome_tf_liquids.js", "mods tructure_test.js", "mods us.js", "mods/test.js", "mods/ticking_temp_stuff.js", "mods/time.js", "mods/toothpaste.js", "mods/troll.js", "mods/unhide.js", "mods/worldgen_test.js", "mods/page_color.js", "mods/color_tools.js", "mods/invisible_wall.js", "mods/replace_all.js", "mods/bacteria_mod.js", "mods/controllable_pixel_test.js", "mods/fire_slime.js", "mods/bioooze.js", "mods/cover_yourself_in.js", "mods/color_tools.js", "mods/cells.js", "mods/find.js", "mods/triggerable_random_powders.js", "mods/replace.js", "mods/change.js", "mods/prompt.js", "mods/miscible_psoup_and_birthpool.js", "mods/primordial_birthpool.js", "mods/liquid_void.js", "mods olid_rock.js", "mods/invisible_dye.js", "mods/alcohol.js", "mods/a_bundle_of_tests.js", "mods/paint_event.js", "mods/amogus.js", "mods/chem.js", "mods/roseyiede.js", "mods tate_voids.js", "mods/the_ground.js", "mods/lone_urea.js", "mods/fwibblen.js", "mods/zirconium.js", "mods/drawPixels_change_test.js", "mods/velocity.js", "mods/prop.js", "mods/x_dependent_change_test.js", "mods/alkahest.js", "mods pouts.js", "mods/creepers.js", "mods/tool_pixel_behavior.js"];
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
console.log("Mod list loaded. Refresh the page without the loadTheModList query parameter.");
};
function pyth(xA,yA,xB,yB) {
var a = Math.abs(xB - xA);
var b = Math.abs(yB - yA);
@ -302,4 +315,3 @@ elements.distance_display_anchor = {
function updateDistanceDisplayDescription() {
elements.distance_display.desc = `It gets more blue the closer it gets to a distance display anchor. The current scale factor is ${distanceScale} (bigger number = smaller blue radius). <span onclick=distanceScalePrompt() style=\"color: #ff00ff;\";>Click here</span> to open the scale prompt.<br/><em>Note: Info pages do not update automatically and must be closed and reopened to show the changed scale.</em>`;
};