コード例 #1
0
 private string WriteInventory(ArcadeUser user)
 => InventoryViewer.Write(user, false);
コード例 #2
0
        private static string WriteCatalogEntry(Item item, int amount, bool isSpecial, int discountUpper = 0)
        {
            var entry = new StringBuilder();

            entry.Append($"\n> {(isSpecial ? "🍀 " : "")}`{item.Id}` ");

            string icon = item.GetIcon();

            if (!string.IsNullOrWhiteSpace(icon))
            {
                entry.Append($"{icon} ");
            }

            entry.Append($"**{(!string.IsNullOrWhiteSpace(icon) ? item.Name : item.GetName())}** ({item.Rarity})");

            if (amount > 1)
            {
                entry.Append($" (x**{amount:##,0}**)");
            }

            entry.AppendLine();

            if (Check.NotNullOrEmpty(item.Quotes))
            {
                entry.AppendLine($"> *\"{item.GetQuote()}\"*");
            }

            entry.Append($"> {WriteItemValue(item, discountUpper, ShopMode.Buy, true)} • {InventoryViewer.WriteCapacity(item.Size)}");
            return(entry.ToString());
        }