From 889d07b35514b19717eaea20d7e38f62dcd5e4cb Mon Sep 17 00:00:00 2001 From: KPhoenix Date: Fri, 12 Apr 2024 21:08:57 -0400 Subject: [PATCH] Clean up store inferface --- Source/stores.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/stores.cpp b/Source/stores.cpp index 0cdd99e44..baa6afb9a 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -310,18 +310,18 @@ void PrintStoreItem(const Item &item, int l, UiFlags flags, bool cursIndent = fa else if (item._iClass == ICLASS_ARMOR) productLine = fmt::format(fmt::runtime(_("Armor: {:d} ")), item._iAC); if (item._iMaxDur != DUR_INDESTRUCTIBLE && item._iMaxDur != 0) - productLine += fmt::format(fmt::runtime(_("Dur: {:d}/{:d}, ")), item._iDurability, item._iMaxDur); + productLine += fmt::format(fmt::runtime(_("Dur: {:d}/{:d}")), item._iDurability, item._iMaxDur); else - productLine.append(_("Indestructible, ")); + productLine.append(_("Indestructible")); } int8_t str = item._iMinStr; uint8_t mag = item._iMinMag; int8_t dex = item._iMinDex; - if (str == 0 && mag == 0 && dex == 0) { - productLine.append(_("No required attributes")); - } else { + if (str != 0 || mag != 0 || dex != 0) { + if (!productLine.empty()) + productLine.append(_(", ")); productLine.append(_("Required:")); if (str != 0) productLine.append(fmt::format(fmt::runtime(_(" {:d} Str")), str));