From b6fdde0aa6fcefd735e7c550aaa7fca879023f1c Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 15 Jun 2026 00:03:55 -0400 Subject: feat: unicode option, fixed up options and tables --- internal/game/cmd_option.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/game/cmd_option.go') 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 } -- cgit v1.2.3