aboutsummaryrefslogtreecommitdiff
path: root/internal/game/render_help.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-29 01:41:49 -0400
committerhistoria <[not public]>2026-06-29 01:41:49 -0400
commit12ed73f9ff9de1a145683de8a73c170613371979 (patch)
tree8b35d3dfda8231edcbc33e2fc2eb68000128e48c /internal/game/render_help.go
parente9d87838590a02c7ca028fad8cd16e42a582dd32 (diff)
downloadthehouseoficarus-12ed73f9ff9de1a145683de8a73c170613371979.tar.gz
wrap_width and table improvements, targeting 80 character default width
Diffstat (limited to 'internal/game/render_help.go')
-rw-r--r--internal/game/render_help.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/game/render_help.go b/internal/game/render_help.go
index 869d306..798eadf 100644
--- a/internal/game/render_help.go
+++ b/internal/game/render_help.go
@@ -100,8 +100,10 @@ func LoadHelp(dataDir string) ([]HelpDef, error) {
func (g *Game) doHelp(sess *net.Session, topic string) {
if topic == "" {
unicode := true
+ wrapWidth := 0
if p := sess.Player; p != nil {
unicode = p.OptionBool("unicode")
+ wrapWidth = p.OptionInt("wrap_width")
}
sess.WriteLine("")
@@ -112,7 +114,7 @@ func (g *Game) doHelp(sess *net.Session, topic string) {
for _, c := range commandList {
t.Rows = append(t.Rows, []string{c.Name, c.Type, c.Desc})
}
- for _, line := range t.Render(unicode) {
+ for _, line := range t.Render(unicode, wrapWidth) {
sess.WriteLine(line)
}
sess.WriteLine("")