Refine Archive World navigation and gate progression
All checks were successful
Build Org Website / build (push) Successful in 38s
All checks were successful
Build Org Website / build (push) Successful in 38s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user