diff options
| author | historia <[not public]> | 2026-06-17 21:13:07 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-17 21:13:07 -0400 |
| commit | ec2e94e3463654a6288464a4c070b48ef9bf7368 (patch) | |
| tree | 3c5df0f9a6a5968fa4c725a7d331825883ae798c /internal/game/cmd_look.go | |
| parent | eef5ddaa94f8cff6010d092c30fed53d2be01524 (diff) | |
| download | thehouseoficarus-ec2e94e3463654a6288464a4c070b48ef9bf7368.tar.gz | |
feat: smithing added, item/object interaction reworked. recipes and menus refactored.
Diffstat (limited to 'internal/game/cmd_look.go')
| -rw-r--r-- | internal/game/cmd_look.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/internal/game/cmd_look.go b/internal/game/cmd_look.go index 77c8776..9809e9b 100644 --- a/internal/game/cmd_look.go +++ b/internal/game/cmd_look.go @@ -469,8 +469,8 @@ func (g *Game) doLookTarget(sess *net.Session, input string) { sess.WriteLine(def.Name) } - if desc, ok := def.Props["description"].(string); ok && desc != "" { - sess.WriteLine(fmt.Sprintf(" %s", desc)) + if def.Description != "" && !strings.Contains(def.Description, "{quality}") { + sess.WriteLine(fmt.Sprintf(" %s", def.Description)) } if p.OptionBool("depletion") { @@ -491,11 +491,9 @@ func (g *Game) doLookTarget(sess *net.Session, input string) { } } for _, ist := range instances { - if ist.Quality > 0 { - if qdesc, ok := def.Props["quality_description"].(string); ok && qdesc != "" { - qdesc = strings.ReplaceAll(qdesc, "{quality}", fmt.Sprintf("%.0f", ist.Quality)) - sess.WriteLine(fmt.Sprintf(" %s", qdesc)) - } + if ist.Quality > 0 && strings.Contains(def.Description, "{quality}") { + desc := strings.ReplaceAll(def.Description, "{quality}", fmt.Sprintf("%.0f", ist.Quality)) + sess.WriteLine(fmt.Sprintf(" %s", desc)) } } return |
