diff options
| author | historia <[not public]> | 2026-06-15 00:03:55 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-15 00:03:55 -0400 |
| commit | b6fdde0aa6fcefd735e7c550aaa7fca879023f1c (patch) | |
| tree | 924be72a906522d60512213cdbaba1f55e694bd3 /internal/game/cmd_option.go | |
| parent | eb37418b933d7bd996658209e867ea3f3e3806ec (diff) | |
| download | thehouseoficarus-b6fdde0aa6fcefd735e7c550aaa7fca879023f1c.tar.gz | |
feat: unicode option, fixed up options and tables
Diffstat (limited to 'internal/game/cmd_option.go')
| -rw-r--r-- | internal/game/cmd_option.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/game/cmd_option.go b/internal/game/cmd_option.go index 49085db..9302baa 100644 --- a/internal/game/cmd_option.go +++ b/internal/game/cmd_option.go @@ -14,11 +14,16 @@ func (g *Game) doOption(sess *net.Session, input string) { if input == "" { sess.WriteLine("") - sess.WriteLine(fmt.Sprintf(" %-14s %-10s %-22s %s", "Option", "Value", "Valid", "Description")) + table := &Table{ + Columns: []string{"Option", "Value", "Valid", "Description"}, + } for _, def := range player.OptionDefs { val := formatOptionValue(p, &def) valid := formatValidValues(&def) - sess.WriteLine(fmt.Sprintf(" %-14s %-10s %-22s %s", def.Name, val, valid, def.Description)) + table.Rows = append(table.Rows, []string{def.Name, val, valid, def.Description}) + } + for _, line := range table.Render(p.OptionBool("unicode")) { + sess.WriteLine(line) } return } |
