Skip to content

Commit 7d7abe1

Browse files
committed
Added configurable equipment display for mob template
Added: - UserInterface config section with Formats and Display subsections - ShowEmptyEquipmentSlots config option to control equipment display - Config method ShouldShowEmptyEquipmentSlots() for checking the setting - Template function showEmptyEquipmentSlots to access config from templates - GetUserInterfaceConfig() helper function - "xxx is not wearing anything" message when mob has no equipment and showEmpty is false Changed: - Moved TextFormats config under UserInterface.Formats for better organization - Updated mob templates to respect ShowEmptyEquipmentSlots configuration - Equipment display now shows all slots when true (default), only equipped items when false Fixed: - Template conditionals to properly handle all equipment display scenarios - Both regular and screenreader templates now correctly show equipment based on config
1 parent 2be9936 commit 7d7abe1

File tree

8 files changed

+248
-44
lines changed

8 files changed

+248
-44
lines changed

_datafiles/config.yaml

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -326,29 +326,40 @@ Integrations:
326326

327327
################################################################################
328328
#
329-
# TEXT FORMATS
330-
# Basic text strings that occur often, and may need customization
331-
#
332-
################################################################################
333-
TextFormats:
334-
# - Prompt -
335-
# Default prompt formatting.
336-
# See: "help prompt" in game to learn more about this.
337-
Prompt: '{8}[{t} {T} {255}HP:{hp}{8}/{HP} {255}MP:{13}{mp}{8}/{13}{MP}{8}]{239}{h}{8}:'
338-
# - TimeFormat -
339-
# When real world time is shown, what format should be used?
340-
# This uses a Go time format string, which is kinda weird.
341-
# See: https://go.dev/src/time/format.go
342-
Time: 'Monday, 02-Jan-2006 3:04:05PM'
343-
# - TimeFormatShort -
344-
# Same as TimeFormat, but shorter form
345-
TimeShort: 'Jan 2 ''06 3:04PM'
346-
# - EnterRoomMessageWrapper -
347-
# Decorate entrance text with this. Put a %s where the message should be.
348-
EnterRoomMessageWrapper: " <ansi fg=\"enters-message\"> >>> </ansi>%s\n"
349-
# - ExitRoomMessageWrapper -
350-
# Decorate exit text with this. Put a %s where the message should be.
351-
ExitRoomMessageWrapper: " <ansi fg=\"leaves-message\"> >>> </ansi>%s\n"
329+
# USER INTERFACE
330+
# Visual preferences and text formatting options
331+
#
332+
################################################################################
333+
UserInterface:
334+
# - Formats -
335+
# Text format strings that control how various messages appear
336+
Formats:
337+
# - Prompt -
338+
# Default prompt formatting.
339+
# See: "help prompt" in game to learn more about this.
340+
Prompt: '{8}[{t} {T} {255}HP:{hp}{8}/{HP} {255}MP:{13}{mp}{8}/{13}{MP}{8}]{239}{h}{8}:'
341+
# - Time -
342+
# When real world time is shown, what format should be used?
343+
# This uses a Go time format string, which is kinda weird.
344+
# See: https://go.dev/src/time/format.go
345+
Time: 'Monday, 02-Jan-2006 3:04:05PM'
346+
# - TimeShort -
347+
# Same as Time, but shorter form
348+
TimeShort: 'Jan 2 ''06 3:04PM'
349+
# - EnterRoomMessageWrapper -
350+
# Decorate entrance text with this. Put a %s where the message should be.
351+
EnterRoomMessageWrapper: " <ansi fg=\"enters-message\"> >>> </ansi>%s\n"
352+
# - ExitRoomMessageWrapper -
353+
# Decorate exit text with this. Put a %s where the message should be.
354+
ExitRoomMessageWrapper: " <ansi fg=\"leaves-message\"> >>> </ansi>%s\n"
355+
# - Display -
356+
# Visual display preferences
357+
Display:
358+
# - ShowEmptyEquipmentSlots -
359+
# Whether to show empty equipment slots when looking at characters/mobs
360+
# true = show all slots including empty ones (traditional MUD style)
361+
# false = only show equipped items (cleaner display)
362+
ShowEmptyEquipmentSlots: true
352363

353364
################################################################################
354365
#

_datafiles/world/default/templates/descriptions/look-mob.screenreader.template

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Description:
55
{{ .Character.GetDescription }}
66

77
Health Status: {{ .HealthStatus }}
8+
{{- $showEmpty := showEmptyEquipmentSlots }}
89
{{- $hasEquipment := false }}
910
{{- if and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
1011
{{- if and (not .Equipment.Offhand.IsDisabled) (gt .Equipment.Offhand.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
@@ -16,7 +17,59 @@ Health Status: {{ .HealthStatus }}
1617
{{- if and (not .Equipment.Ring.IsDisabled) (gt .Equipment.Ring.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
1718
{{- if and (not .Equipment.Legs.IsDisabled) (gt .Equipment.Legs.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
1819
{{- if and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
19-
{{- if $hasEquipment }}
20+
{{- if not $hasEquipment }}
21+
{{- if not $showEmpty }}
22+
23+
{{ .Character.Name }} is not wearing anything.
24+
{{- else }}
25+
26+
Equipment:
27+
{{ if or (and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0)) (and $showEmpty (not .Equipment.Weapon.IsDisabled)) }}Weapon: {{ if gt .Equipment.Weapon.ItemId 0 }}{{ .Equipment.Weapon.NameSimple }}{{ else }}nothing{{ end }}
28+
{{ end -}}
29+
{{- if or (and (not .Equipment.Offhand.IsDisabled) (gt .Equipment.Offhand.ItemId 0)) (and $showEmpty (not .Equipment.Offhand.IsDisabled)) }}Offhand: {{ if gt .Equipment.Offhand.ItemId 0 }}{{ .Equipment.Offhand.NameSimple }}{{ else }}nothing{{ end }}
30+
{{ end -}}
31+
{{- if or (and (not .Equipment.Head.IsDisabled) (gt .Equipment.Head.ItemId 0)) (and $showEmpty (not .Equipment.Head.IsDisabled)) }}Head: {{ if gt .Equipment.Head.ItemId 0 }}{{ .Equipment.Head.NameSimple }}{{ else }}nothing{{ end }}
32+
{{ end -}}
33+
{{- if or (and (not .Equipment.Neck.IsDisabled) (gt .Equipment.Neck.ItemId 0)) (and $showEmpty (not .Equipment.Neck.IsDisabled)) }}Neck: {{ if gt .Equipment.Neck.ItemId 0 }}{{ .Equipment.Neck.NameSimple }}{{ else }}nothing{{ end }}
34+
{{ end -}}
35+
{{- if or (and (not .Equipment.Body.IsDisabled) (gt .Equipment.Body.ItemId 0)) (and $showEmpty (not .Equipment.Body.IsDisabled)) }}Body: {{ if gt .Equipment.Body.ItemId 0 }}{{ .Equipment.Body.NameSimple }}{{ else }}nothing{{ end }}
36+
{{ end -}}
37+
{{- if or (and (not .Equipment.Belt.IsDisabled) (gt .Equipment.Belt.ItemId 0)) (and $showEmpty (not .Equipment.Belt.IsDisabled)) }}Belt: {{ if gt .Equipment.Belt.ItemId 0 }}{{ .Equipment.Belt.NameSimple }}{{ else }}nothing{{ end }}
38+
{{ end -}}
39+
{{- if or (and (not .Equipment.Gloves.IsDisabled) (gt .Equipment.Gloves.ItemId 0)) (and $showEmpty (not .Equipment.Gloves.IsDisabled)) }}Gloves: {{ if gt .Equipment.Gloves.ItemId 0 }}{{ .Equipment.Gloves.NameSimple }}{{ else }}nothing{{ end }}
40+
{{ end -}}
41+
{{- if or (and (not .Equipment.Ring.IsDisabled) (gt .Equipment.Ring.ItemId 0)) (and $showEmpty (not .Equipment.Ring.IsDisabled)) }}Ring: {{ if gt .Equipment.Ring.ItemId 0 }}{{ .Equipment.Ring.NameSimple }}{{ else }}nothing{{ end }}
42+
{{ end -}}
43+
{{- if or (and (not .Equipment.Legs.IsDisabled) (gt .Equipment.Legs.ItemId 0)) (and $showEmpty (not .Equipment.Legs.IsDisabled)) }}Legs: {{ if gt .Equipment.Legs.ItemId 0 }}{{ .Equipment.Legs.NameSimple }}{{ else }}nothing{{ end }}
44+
{{ end -}}
45+
{{- if or (and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0)) (and $showEmpty (not .Equipment.Feet.IsDisabled)) }}Feet: {{ if gt .Equipment.Feet.ItemId 0 }}{{ .Equipment.Feet.NameSimple }}{{ else }}nothing{{ end }}
46+
{{ end -}}
47+
{{- end }}
48+
{{- else }}
49+
{{- if $showEmpty }}
50+
51+
Equipment:
52+
{{ if or (and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0)) (and $showEmpty (not .Equipment.Weapon.IsDisabled)) }}Weapon: {{ if gt .Equipment.Weapon.ItemId 0 }}{{ .Equipment.Weapon.NameSimple }}{{ else }}nothing{{ end }}
53+
{{ end -}}
54+
{{- if or (and (not .Equipment.Offhand.IsDisabled) (gt .Equipment.Offhand.ItemId 0)) (and $showEmpty (not .Equipment.Offhand.IsDisabled)) }}Offhand: {{ if gt .Equipment.Offhand.ItemId 0 }}{{ .Equipment.Offhand.NameSimple }}{{ else }}nothing{{ end }}
55+
{{ end -}}
56+
{{- if or (and (not .Equipment.Head.IsDisabled) (gt .Equipment.Head.ItemId 0)) (and $showEmpty (not .Equipment.Head.IsDisabled)) }}Head: {{ if gt .Equipment.Head.ItemId 0 }}{{ .Equipment.Head.NameSimple }}{{ else }}nothing{{ end }}
57+
{{ end -}}
58+
{{- if or (and (not .Equipment.Neck.IsDisabled) (gt .Equipment.Neck.ItemId 0)) (and $showEmpty (not .Equipment.Neck.IsDisabled)) }}Neck: {{ if gt .Equipment.Neck.ItemId 0 }}{{ .Equipment.Neck.NameSimple }}{{ else }}nothing{{ end }}
59+
{{ end -}}
60+
{{- if or (and (not .Equipment.Body.IsDisabled) (gt .Equipment.Body.ItemId 0)) (and $showEmpty (not .Equipment.Body.IsDisabled)) }}Body: {{ if gt .Equipment.Body.ItemId 0 }}{{ .Equipment.Body.NameSimple }}{{ else }}nothing{{ end }}
61+
{{ end -}}
62+
{{- if or (and (not .Equipment.Belt.IsDisabled) (gt .Equipment.Belt.ItemId 0)) (and $showEmpty (not .Equipment.Belt.IsDisabled)) }}Belt: {{ if gt .Equipment.Belt.ItemId 0 }}{{ .Equipment.Belt.NameSimple }}{{ else }}nothing{{ end }}
63+
{{ end -}}
64+
{{- if or (and (not .Equipment.Gloves.IsDisabled) (gt .Equipment.Gloves.ItemId 0)) (and $showEmpty (not .Equipment.Gloves.IsDisabled)) }}Gloves: {{ if gt .Equipment.Gloves.ItemId 0 }}{{ .Equipment.Gloves.NameSimple }}{{ else }}nothing{{ end }}
65+
{{ end -}}
66+
{{- if or (and (not .Equipment.Ring.IsDisabled) (gt .Equipment.Ring.ItemId 0)) (and $showEmpty (not .Equipment.Ring.IsDisabled)) }}Ring: {{ if gt .Equipment.Ring.ItemId 0 }}{{ .Equipment.Ring.NameSimple }}{{ else }}nothing{{ end }}
67+
{{ end -}}
68+
{{- if or (and (not .Equipment.Legs.IsDisabled) (gt .Equipment.Legs.ItemId 0)) (and $showEmpty (not .Equipment.Legs.IsDisabled)) }}Legs: {{ if gt .Equipment.Legs.ItemId 0 }}{{ .Equipment.Legs.NameSimple }}{{ else }}nothing{{ end }}
69+
{{ end -}}
70+
{{- if or (and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0)) (and $showEmpty (not .Equipment.Feet.IsDisabled)) }}Feet: {{ if gt .Equipment.Feet.ItemId 0 }}{{ .Equipment.Feet.NameSimple }}{{ else }}nothing{{ end }}
71+
{{ end -}}
72+
{{- else }}
2073

2174
Equipment:
2275
{{ if and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0) }}Weapon: {{ .Equipment.Weapon.NameSimple }}
@@ -40,5 +93,6 @@ Equipment:
4093
{{- if and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0) }}Feet: {{ .Equipment.Feet.NameSimple }}
4194
{{ end -}}
4295
{{- end }}
96+
{{- end }}
4397

4498
Carrying: {{ .CarryingStatus }} objects

_datafiles/world/default/templates/descriptions/look-mob.template

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{{ splitstring .Character.GetDescription 72 " "}}
55
{{ .HealthStatus }}
66
└────────────────────────────────────────────────────────────────────────────┘
7+
{{- $showEmpty := showEmptyEquipmentSlots }}
78
{{- $hasEquipment := false }}
89
{{- if and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
910
{{- if and (not .Equipment.Offhand.IsDisabled) (gt .Equipment.Offhand.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
@@ -15,7 +16,56 @@
1516
{{- if and (not .Equipment.Ring.IsDisabled) (gt .Equipment.Ring.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
1617
{{- if and (not .Equipment.Legs.IsDisabled) (gt .Equipment.Legs.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
1718
{{- if and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0) }}{{ $hasEquipment = true }}{{ end }}
18-
{{- if $hasEquipment }}
19+
{{- if not $hasEquipment }}
20+
{{- if not $showEmpty }}
21+
<ansi fg="yellow">{{ .Character.Name }}</ansi> is not wearing anything.
22+
{{- else }}
23+
┌─ <ansi fg="black-bold">.:</ansi><ansi fg="20">Equipment</ansi> ──────────────────────────────────────────────────────────────┐
24+
{{ if or (and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0)) (and $showEmpty (not .Equipment.Weapon.IsDisabled)) }} <ansi fg="yellow">Weapon: </ansi>{{ if gt .Equipment.Weapon.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Weapon.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
25+
{{ end -}}
26+
{{- if or (and (not .Equipment.Offhand.IsDisabled) (gt .Equipment.Offhand.ItemId 0)) (and $showEmpty (not .Equipment.Offhand.IsDisabled)) }} <ansi fg="yellow">Offhand: </ansi>{{ if gt .Equipment.Offhand.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Offhand.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
27+
{{ end -}}
28+
{{- if or (and (not .Equipment.Head.IsDisabled) (gt .Equipment.Head.ItemId 0)) (and $showEmpty (not .Equipment.Head.IsDisabled)) }} <ansi fg="yellow">Head: </ansi>{{ if gt .Equipment.Head.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Head.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
29+
{{ end -}}
30+
{{- if or (and (not .Equipment.Neck.IsDisabled) (gt .Equipment.Neck.ItemId 0)) (and $showEmpty (not .Equipment.Neck.IsDisabled)) }} <ansi fg="yellow">Neck: </ansi>{{ if gt .Equipment.Neck.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Neck.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
31+
{{ end -}}
32+
{{- if or (and (not .Equipment.Body.IsDisabled) (gt .Equipment.Body.ItemId 0)) (and $showEmpty (not .Equipment.Body.IsDisabled)) }} <ansi fg="yellow">Body: </ansi>{{ if gt .Equipment.Body.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Body.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
33+
{{ end -}}
34+
{{- if or (and (not .Equipment.Belt.IsDisabled) (gt .Equipment.Belt.ItemId 0)) (and $showEmpty (not .Equipment.Belt.IsDisabled)) }} <ansi fg="yellow">Belt: </ansi>{{ if gt .Equipment.Belt.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Belt.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
35+
{{ end -}}
36+
{{- if or (and (not .Equipment.Gloves.IsDisabled) (gt .Equipment.Gloves.ItemId 0)) (and $showEmpty (not .Equipment.Gloves.IsDisabled)) }} <ansi fg="yellow">Gloves: </ansi>{{ if gt .Equipment.Gloves.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Gloves.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
37+
{{ end -}}
38+
{{- if or (and (not .Equipment.Ring.IsDisabled) (gt .Equipment.Ring.ItemId 0)) (and $showEmpty (not .Equipment.Ring.IsDisabled)) }} <ansi fg="yellow">Ring: </ansi>{{ if gt .Equipment.Ring.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Ring.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
39+
{{ end -}}
40+
{{- if or (and (not .Equipment.Legs.IsDisabled) (gt .Equipment.Legs.ItemId 0)) (and $showEmpty (not .Equipment.Legs.IsDisabled)) }} <ansi fg="yellow">Legs: </ansi>{{ if gt .Equipment.Legs.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Legs.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
41+
{{ end -}}
42+
{{- if or (and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0)) (and $showEmpty (not .Equipment.Feet.IsDisabled)) }} <ansi fg="yellow">Feet: </ansi>{{ if gt .Equipment.Feet.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Feet.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
43+
{{ end }} └────────────────────────────────────────────────────────────────────────────┘
44+
{{- end }}
45+
{{- else }}
46+
{{- if $showEmpty }}
47+
┌─ <ansi fg="black-bold">.:</ansi><ansi fg="20">Equipment</ansi> ──────────────────────────────────────────────────────────────┐
48+
{{ if or (and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0)) (and $showEmpty (not .Equipment.Weapon.IsDisabled)) }} <ansi fg="yellow">Weapon: </ansi>{{ if gt .Equipment.Weapon.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Weapon.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
49+
{{ end -}}
50+
{{- if or (and (not .Equipment.Offhand.IsDisabled) (gt .Equipment.Offhand.ItemId 0)) (and $showEmpty (not .Equipment.Offhand.IsDisabled)) }} <ansi fg="yellow">Offhand: </ansi>{{ if gt .Equipment.Offhand.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Offhand.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
51+
{{ end -}}
52+
{{- if or (and (not .Equipment.Head.IsDisabled) (gt .Equipment.Head.ItemId 0)) (and $showEmpty (not .Equipment.Head.IsDisabled)) }} <ansi fg="yellow">Head: </ansi>{{ if gt .Equipment.Head.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Head.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
53+
{{ end -}}
54+
{{- if or (and (not .Equipment.Neck.IsDisabled) (gt .Equipment.Neck.ItemId 0)) (and $showEmpty (not .Equipment.Neck.IsDisabled)) }} <ansi fg="yellow">Neck: </ansi>{{ if gt .Equipment.Neck.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Neck.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
55+
{{ end -}}
56+
{{- if or (and (not .Equipment.Body.IsDisabled) (gt .Equipment.Body.ItemId 0)) (and $showEmpty (not .Equipment.Body.IsDisabled)) }} <ansi fg="yellow">Body: </ansi>{{ if gt .Equipment.Body.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Body.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
57+
{{ end -}}
58+
{{- if or (and (not .Equipment.Belt.IsDisabled) (gt .Equipment.Belt.ItemId 0)) (and $showEmpty (not .Equipment.Belt.IsDisabled)) }} <ansi fg="yellow">Belt: </ansi>{{ if gt .Equipment.Belt.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Belt.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
59+
{{ end -}}
60+
{{- if or (and (not .Equipment.Gloves.IsDisabled) (gt .Equipment.Gloves.ItemId 0)) (and $showEmpty (not .Equipment.Gloves.IsDisabled)) }} <ansi fg="yellow">Gloves: </ansi>{{ if gt .Equipment.Gloves.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Gloves.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
61+
{{ end -}}
62+
{{- if or (and (not .Equipment.Ring.IsDisabled) (gt .Equipment.Ring.ItemId 0)) (and $showEmpty (not .Equipment.Ring.IsDisabled)) }} <ansi fg="yellow">Ring: </ansi>{{ if gt .Equipment.Ring.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Ring.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
63+
{{ end -}}
64+
{{- if or (and (not .Equipment.Legs.IsDisabled) (gt .Equipment.Legs.ItemId 0)) (and $showEmpty (not .Equipment.Legs.IsDisabled)) }} <ansi fg="yellow">Legs: </ansi>{{ if gt .Equipment.Legs.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Legs.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
65+
{{ end -}}
66+
{{- if or (and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0)) (and $showEmpty (not .Equipment.Feet.IsDisabled)) }} <ansi fg="yellow">Feet: </ansi>{{ if gt .Equipment.Feet.ItemId 0 }}<ansi fg="itemname">{{ .Equipment.Feet.NameSimple }}</ansi>{{ else }}<ansi fg="black-bold">-nothing-</ansi>{{ end }}
67+
{{ end }} └────────────────────────────────────────────────────────────────────────────┘
68+
{{- else }}
1969
┌─ <ansi fg="black-bold">.:</ansi><ansi fg="20">Equipment</ansi> ──────────────────────────────────────────────────────────────┐
2070
{{ if and (not .Equipment.Weapon.IsDisabled) (gt .Equipment.Weapon.ItemId 0) }} <ansi fg="yellow">Weapon: </ansi><ansi fg="itemname">{{ .Equipment.Weapon.NameSimple }}</ansi>
2171
{{ end -}}
@@ -37,5 +87,6 @@
3787
{{ end -}}
3888
{{- if and (not .Equipment.Feet.IsDisabled) (gt .Equipment.Feet.ItemId 0) }} <ansi fg="yellow">Feet: </ansi><ansi fg="itemname">{{ .Equipment.Feet.NameSimple }}</ansi>
3989
{{ end }} └────────────────────────────────────────────────────────────────────────────┘
90+
{{- end }}
4091
{{- end }}
4192
Carrying: {{ .CarryingStatus }} objects

0 commit comments

Comments
 (0)