aboutsummaryrefslogtreecommitdiff
path: root/internal/player/player.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/player/player.go')
-rw-r--r--internal/player/player.go42
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:"-"`