pushing current

This commit is contained in:
dingo
2026-09-07 13:44:10 -04:00
parent bc0ffbbbe5
commit 3f58de5744
15 changed files with 872 additions and 60 deletions
+1 -1
View File
@@ -217,7 +217,7 @@ func (l *Lease) SaveCommand(ctx context.Context, w *game.World, claimID string,
}
l.Revision++
for id, c := range w.Characters {
live.Characters[id].View.Titles = c.View.Titles
live.Characters[id].View = c.View
}
live.PendingTitles = nil
live.Saved()
+6
View File
@@ -5,6 +5,7 @@ import (
"database/sql"
"encoding/json"
"errors"
"maps"
"sort"
"aeternalis/server/internal/game"
@@ -19,6 +20,10 @@ func stageTitleWorld(w *game.World) *game.World {
for id, c := range w.Characters {
copy := *c
copy.View.Titles = append([]p.TitleAward{}, c.View.Titles...)
copy.View.Items = append([]p.ItemInstance{}, c.View.Items...)
copy.View.Equipment = maps.Clone(c.View.Equipment)
copy.View.AllocatedStats = maps.Clone(c.View.AllocatedStats)
copy.View.Stats = maps.Clone(c.View.Stats)
staged.Characters[id] = &copy
}
return &staged
@@ -96,6 +101,7 @@ func (d *DB) syncTitles(ctx context.Context, tx *sql.Tx, w *game.World) error {
}
if c.View.Entity.State != "dead" {
c.View.Titles = append([]p.TitleAward{}, awards...)
w.RefreshStats(c)
continue
}
// A historical dead life keeps its own record. Only awards from its death