diff options
| author | historia <[not public]> | 2026-09-16 14:41:15 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-16 14:41:15 -0400 |
| commit | 9192d94dea6be5498ab080f3e2df5667af871d7a (patch) | |
| tree | e7aef3089d5d1e8da686c6b6ca9d4faeacb8b20b /internal/player/player.go | |
| parent | 2f34e75f27e5f99cfc1c5f8eaf6ab4ff2fddb1d9 (diff) | |
| download | thehouseoficarus-9192d94dea6be5498ab080f3e2df5667af871d7a.tar.gz | |
fix: casino room eviction, session close race fix, open-payout recovery evidence
Diffstat (limited to 'internal/player/player.go')
| -rw-r--r-- | internal/player/player.go | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/internal/player/player.go b/internal/player/player.go index ae147b2..daa7799 100644 --- a/internal/player/player.go +++ b/internal/player/player.go @@ -158,27 +158,33 @@ func GetOptionDef(name string) *OptionDef { } type Player struct { - Name string `yaml:"name"` + Name string `yaml:"name"` // ID is a stable identifier assigned at creation. Filenames are // renameable; the ID is not, so cached references authorize by ID. - ID string `yaml:"id,omitempty"` + ID string `yaml:"id,omitempty"` // Account is the owning account name (case-canonical at write time). - Account string `yaml:"account,omitempty"` - Skills map[SkillName]int `yaml:"skills"` - Inventory map[int]*InventorySlot `yaml:"inventory"` - Bank map[int]*InventorySlot `yaml:"bank"` - Equipment map[item.EquipSlot]string `yaml:"equipment"` - EquipQuality map[string]int `yaml:"equip_quality,omitempty"` - RoomID int `yaml:"room_id"` - HP int `yaml:"hp"` - Credits int `yaml:"credits"` - BankedCredits int `yaml:"banked_credits"` - Description string `yaml:"description"` - AttackStyle AttackStyle `yaml:"attack_style"` - Prompt string `yaml:"prompt"` - Options map[string]any `yaml:"-"` - Flags map[string]any `yaml:"flags"` - PendingSequence *PendingSequence `yaml:"pending_sequence,omitempty"` + Account string `yaml:"account,omitempty"` + Skills map[SkillName]int `yaml:"skills"` + Inventory map[int]*InventorySlot `yaml:"inventory"` + Bank map[int]*InventorySlot `yaml:"bank"` + Equipment map[item.EquipSlot]string `yaml:"equipment"` + EquipQuality map[string]int `yaml:"equip_quality,omitempty"` + RoomID int `yaml:"room_id"` + HP int `yaml:"hp"` + Credits int `yaml:"credits"` + BankedCredits int `yaml:"banked_credits"` + // OpenPayouts is durable evidence for the economy journal (see + // internal/game/economy.go): the IDs of journaled payout records whose + // amounts are ALREADY INCLUDED in this file's credit balance. Recovery + // uses membership to prove a payout became durable instead of guessing + // from balance checkpoints, which unrelated credit changes can fake. + OpenPayouts []string `yaml:"open_payouts,omitempty"` + Description string `yaml:"description"` + AttackStyle AttackStyle `yaml:"attack_style"` + Prompt string `yaml:"prompt"` + Options map[string]any `yaml:"-"` + Flags map[string]any `yaml:"flags"` + PendingSequence *PendingSequence `yaml:"pending_sequence,omitempty"` RegenerateTick int AmmoQty int `yaml:"ammo_qty,omitempty"` Action *behavior.Action `yaml:"-"` |
