World: one city among many under cities, no gameplay change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-11-04 15:02:19 +00:00
parent 7dc780352c
commit 11e4d98d49
3 changed files with 100 additions and 7 deletions

2
app.py
View file

@ -67,7 +67,7 @@ class Store:
return time.time() + self.world["config"]["clock_offset"]
def save(self) -> None:
data = json.dumps(self.world, separators=(",", ":"))
data = json.dumps(self.world.doc, separators=(",", ":"))
with closing(sqlite3.connect(self.path)) as db, db:
db.execute("INSERT INTO world (id, data) VALUES (1, ?) ON CONFLICT (id) DO UPDATE SET data = excluded.data",
(data,))