diff options
Diffstat (limited to 'internal/player')
| -rw-r--r-- | internal/player/account.go | 1 | ||||
| -rw-r--r-- | internal/player/player.go | 15 | ||||
| -rw-r--r-- | internal/player/store.go | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/internal/player/account.go b/internal/player/account.go index 36fab43..99a052c 100644 --- a/internal/player/account.go +++ b/internal/player/account.go @@ -6,4 +6,5 @@ type Account struct { Characters []string `yaml:"characters"` Aliases map[string]string `yaml:"aliases"` Colors map[string]string `yaml:"colors"` + Options map[string]any `yaml:"options"` } diff --git a/internal/player/player.go b/internal/player/player.go index e0c7ab9..1cd8677 100644 --- a/internal/player/player.go +++ b/internal/player/player.go @@ -1,7 +1,7 @@ package player -import "thirdcollapse/internal/action" -import "thirdcollapse/internal/object" +import "thehouseoficarus/internal/action" +import "thehouseoficarus/internal/object" type SkillName string @@ -115,7 +115,7 @@ var OptionDefs = []OptionDef{ {"reserve", OptBool, true, nil, "Show full reserved item details"}, {"depletion", OptBool, false, nil, "Show depletion and despawn timers"}, {"despawn", OptBool, false, nil, "Show ground item despawn timers"}, - {"color", OptString, "ansi", []string{"none", "ansi", "xterm256"}, "Color output mode"}, + {"color", OptString, "xterm256", []string{"none", "ansi", "xterm256"}, "Color output mode"}, {"mapwidth", OptInt, 30, nil, "Map width for the map command"}, {"mapheight", OptInt, 20, nil, "Map height for the map command"}, {"mappadding", OptString, "none", []string{"none", "x", "y", "xy"}, "Map output padding mode"}, @@ -123,7 +123,6 @@ var OptionDefs = []OptionDef{ {"queue_silently", OptBool, true, nil, "Suppress messages for queued tick actions"}, {"room_desc_width", OptInt, 70, nil, "Maximum width for room descriptions"}, {"unicode", OptBool, true, nil, "Unicode box-drawing characters"}, - {"prompt", OptString, "> ", nil, "Custom command prompt"}, } var optionByName map[string]*OptionDef @@ -150,7 +149,8 @@ type Player struct { Credits int `yaml:"credits"` Description string `yaml:"description"` AttackStyle AttackStyle `yaml:"attack_style"` - Options map[string]any `yaml:"options"` + Prompt string `yaml:"prompt"` + Options map[string]any `yaml:"-"` Flags map[string]any `yaml:"flags"` RegenerateTick int Action *action.Action `yaml:"-"` @@ -258,12 +258,9 @@ func New(name string) *Player { Skills: make(map[SkillName]int), Equipment: make(map[object.EquipSlot]string), AttackStyle: Accurate, - Options: make(map[string]any), + Prompt: "> ", RoomID: 0, } - for _, def := range OptionDefs { - p.Options[def.Name] = def.Default - } for _, s := range AllSkills { p.Skills[s] = 0 } diff --git a/internal/player/store.go b/internal/player/store.go index c19d9fb..04af594 100644 --- a/internal/player/store.go +++ b/internal/player/store.go @@ -6,7 +6,7 @@ import ( "path/filepath" "strings" - "thirdcollapse/internal/object" + "thehouseoficarus/internal/object" "gopkg.in/yaml.v3" ) |
