Stamp migration ledger entries with the real time
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
656693cc84
commit
568e61799d
2 changed files with 5 additions and 4 deletions
3
app.py
3
app.py
|
|
@ -56,7 +56,8 @@ class Store:
|
|||
db.execute("CREATE TABLE IF NOT EXISTS world (id INTEGER PRIMARY KEY CHECK (id = 1), data TEXT NOT NULL)")
|
||||
row = db.execute("SELECT data FROM world WHERE id = 1").fetchone()
|
||||
if row:
|
||||
self.world = game.migrate(json.loads(row[0]))
|
||||
world = json.loads(row[0])
|
||||
self.world = game.migrate(world, time.time() + world["config"].get("clock_offset", 0))
|
||||
self.world["config"]["speed"] = speed
|
||||
else:
|
||||
self.world = game.new_world(time.time(), speed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue