diff options
| author | historia <[not public]> | 2026-06-16 23:37:50 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-16 23:37:50 -0400 |
| commit | 389e307f205f9b7edf604fb9f86e1038ead736ef (patch) | |
| tree | 595095b5877cc2b0513d31fb126303d8796cc311 /internal/player/player.go | |
| parent | 085e728d22a3369bd110b77409914cfbe9ebe611 (diff) | |
| download | thehouseoficarus-389e307f205f9b7edf604fb9f86e1038ead736ef.tar.gz | |
feat: major xterm256 color overhaul, see worldbuilding docs.
Diffstat (limited to 'internal/player/player.go')
| -rw-r--r-- | internal/player/player.go | 15 |
1 files changed, 6 insertions, 9 deletions
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 } |
