new mods, bug fixes
mods: pocket universe, plasma field range, Hawking radiation added trackpad mode
This commit is contained in:
13
js/index.js
13
js/index.js
@@ -244,6 +244,9 @@ if (localSettings) {
|
||||
game.isBodyDamage = localSettings.isBodyDamage
|
||||
document.getElementById("body-damage").checked = localSettings.isBodyDamage
|
||||
|
||||
game.isEasyToAimMode = localSettings.isEasyToAimMode
|
||||
document.getElementById("track-pad-mode").checked = localSettings.isEasyToAimMode
|
||||
|
||||
game.difficultyMode = localSettings.difficultyMode
|
||||
document.getElementById("difficulty-select").value = localSettings.difficultyMode
|
||||
|
||||
@@ -256,11 +259,13 @@ if (localSettings) {
|
||||
} else {
|
||||
localSettings = {
|
||||
isBodyDamage: true,
|
||||
isEasyToAimMode: false,
|
||||
difficultyMode: '1',
|
||||
fpsCapDefault: '72',
|
||||
fpsCapDefault: 'max',
|
||||
};
|
||||
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
document.getElementById("body-damage").checked = localSettings.isBodyDamage
|
||||
document.getElementById("track-pad-mode").checked = localSettings.isEasyToAimMode
|
||||
document.getElementById("difficulty-select").value = localSettings.difficultyMode
|
||||
document.getElementById("fps-select").value = localSettings.fpsCapDefault
|
||||
}
|
||||
@@ -358,6 +363,12 @@ document.getElementById("body-damage").addEventListener("input", () => {
|
||||
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
});
|
||||
|
||||
document.getElementById("track-pad-mode").addEventListener("input", () => {
|
||||
game.isEasyToAimMode = document.getElementById("track-pad-mode").checked
|
||||
localSettings.isEasyToAimMode = game.isEasyToAimMode
|
||||
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
});
|
||||
|
||||
// difficulty-select-custom event listener is set in build.makeGrid
|
||||
document.getElementById("difficulty-select").addEventListener("input", () => {
|
||||
game.difficultyMode = Number(document.getElementById("difficulty-select").value)
|
||||
|
||||
Reference in New Issue
Block a user