Merge pull request #1188 from redbirdly/main

Remove w_ensureModEnabled
This commit is contained in:
slweeb 2025-07-31 21:59:42 -04:00 committed by GitHub
commit 4df3e1a9d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 24 deletions

View File

@ -1,8 +1,6 @@
"use strict"; "use strict";
// WorldEdit.js (compiled) // WorldEdit.js (compiled)
// Version: 1.0.0 // Version: 1.0.1
// Other mods
w_ensureModEnabled("mods/betterSettings.js");
// Constants // Constants
const w_accentColor = "#7cff62"; const w_accentColor = "#7cff62";
const w_style = { const w_style = {
@ -83,14 +81,6 @@ class Rect {
} }
// Functions // Functions
function w_ensureModEnabled(modName) {
if (enabledMods.includes(modName))
return;
enabledMods.unshift(modName);
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
window.location.reload();
}
function isPointInWorld(point) { function isPointInWorld(point) {
return point.x >= 0 && point.x <= width && point.y >= 0 && point.y <= height; return point.x >= 0 && point.x <= width && point.y >= 0 && point.y <= height;
} }

View File

@ -1,8 +1,5 @@
// WorldEdit.ts // WorldEdit.ts
// Version: 1.0.0 // Version: 1.0.1
// Other mods
w_ensureModEnabled("mods/betterSettings.js")
// Interfaces // Interfaces
interface WorldEditState { interface WorldEditState {
@ -124,15 +121,6 @@ class Rect {
} }
// Functions // Functions
function w_ensureModEnabled(modName: string) {
if (enabledMods.includes(modName))
return
enabledMods.unshift(modName)
localStorage.setItem("enabledMods", JSON.stringify(enabledMods))
window.location.reload()
}
function isPointInWorld(point: Vec2D): boolean { function isPointInWorld(point: Vec2D): boolean {
return point.x >= 0 && point.x <= width && point.y >= 0 && point.y <= height return point.x >= 0 && point.x <= width && point.y >= 0 && point.y <= height
} }