From 0281233cbdc76e065a812780de0325fcfbd4e660 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sun, 25 Jun 2023 18:19:26 -0400 Subject: ghost --- client/src/editor.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'client/src/editor.ts') diff --git a/client/src/editor.ts b/client/src/editor.ts index 1abaad4..0be5c68 100644 --- a/client/src/editor.ts +++ b/client/src/editor.ts @@ -1,3 +1,4 @@ +import { InitialState } from "./logic/logic.js" import { genMap, compressMap, decompressMap } from "./map.js" import { startGraphicsUpdater } from "./renderer.js" import { GameState, Vec2, Tile } from "./types.js" @@ -128,13 +129,9 @@ const runMapEditor = (width: number, height: number) => { let map = genMap(width, height, data, Tile.EMPTY) - let state: GameState = { - started: true, - input: {}, - players: {}, - items: {}, - mapId: 0 - } + let state: GameState = structuredClone(InitialState); + state.mapId = 0; + state.started = true; let frame = 0 const updateGraphics = startGraphicsUpdater() -- cgit v1.2.3-freya