Refine Archive World navigation and gate progression
All checks were successful
Build Org Website / build (push) Successful in 38s

This commit is contained in:
gitea-actions
2026-07-30 10:02:58 +01:00
parent c06af38d80
commit 2f125f32ae
10 changed files with 301 additions and 80 deletions

View File

@@ -51,7 +51,7 @@
const loaded = loadState();
if (loaded.state) {
controller.state = loaded.state;
controller.state = developmentAreaOverride(loaded.state);
renderHud();
startGame();
if (loaded.message) status(loaded.message);
@@ -60,6 +60,15 @@
}
}
function developmentAreaOverride(state) {
const local = ["localhost", "127.0.0.1"].includes(window.location.hostname);
const params = new URLSearchParams(window.location.search);
const areaId = params.get("collisionDebug") === "1" ? params.get("area") : null;
if (!local || !Data.AREAS[areaId]) return state;
const spawn = Data.AREAS[areaId].spawn;
return State.withPosition(state, areaId, spawn.x, spawn.y, "north", "entrance");
}
function loadState() {
try {
const rawV2 = localStorage.getItem(State.STORAGE_KEY);