aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_stats.go')
-rw-r--r--internal/game/cmd_stats.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/game/cmd_stats.go b/internal/game/cmd_stats.go
index 906abf2..333d535 100644
--- a/internal/game/cmd_stats.go
+++ b/internal/game/cmd_stats.go
@@ -20,8 +20,10 @@ func (g *Game) doStats(sess *net.Session) {
attackType := "crush"
weaponName := "unarmed"
var weaponType object.WeaponType
+ var weaponDef *object.ItemDef
if itemID, ok := p.Equipment[object.SlotMainHand]; ok {
if def, err := g.ItemStore.Load(itemID); err == nil {
+ weaponDef = def
weaponName = def.Name
weaponType = def.WeaponType
if def.AttackType != "" {
@@ -34,6 +36,9 @@ func (g *Game) doStats(sess *net.Session) {
}
}
+ if weaponDef != nil {
+ weaponName = g.itemColorize(sess, weaponDef, weaponName)
+ }
sess.WriteLines(
"",
fmt.Sprintf("Weapon: %s (attack type: %s)", weaponName, attackType),