Black market: anonymous hash merchant names with type tag
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
96d8b7cf3b
commit
4422bd99ab
5 files changed
+26
-11
No files matched your search
@@ -419,6 +419,8 @@ namespace Decentralized
|
||||
Open();
|
||||
}
|
||||
|
||||
private static string MerchantLabel(BmSeller s) => "[" + L.T("merchant." + s.Type) + "] " + s.Name;
|
||||
|
||||
private static int _merchant;
|
||||
private static int _qty = 1;
|
||||
private static readonly int[] Qtys = { 1, 5, 10 };
|
||||
@@ -442,13 +444,13 @@ namespace Decentralized
|
||||
for (int k = i; k < Math.Min(sellers.Count, i + 3); k++)
|
||||
{
|
||||
int idx = k;
|
||||
string n = L.T("merchant." + sellers[k].Type) + " " + sellers[k].Name;
|
||||
b.AddButton(idx == _merchant ? $"[{n}]" : n, () => { _merchant = idx; Open(); });
|
||||
string n = MerchantLabel(sellers[k]);
|
||||
b.AddButton(idx == _merchant ? "> " + n : n, () => { _merchant = idx; Open(); });
|
||||
}
|
||||
b.End();
|
||||
}
|
||||
var seller = sellers[_merchant];
|
||||
b.AddLabel(L.T("black.seller", seller.Name, seller.Trades, seller.Rating) + " " + L.T("black.days", seller.Days));
|
||||
b.AddLabel(L.T("black.seller", MerchantLabel(seller), seller.Trades, seller.Rating) + " " + L.T("black.days", seller.Days));
|
||||
var goods = d.Black.Catalog.Where(l => l.Seller == _merchant).Cast<BmGood>().ToList();
|
||||
if (goods.Count == 0) { b.AddLabel(L.T("black.empty")); return; }
|
||||
Shelf(b, goods, (c, g) =>
|
||||
@@ -541,13 +543,13 @@ namespace Decentralized
|
||||
if (sale.State == SaleState.Listed) l.AddButton(L.T("black.sell.delist"), () => Delist(sale));
|
||||
}
|
||||
foreach (var o in d.Black.Orders.OrderByDescending(x => x.PlacedDay))
|
||||
l.AddLabel(L.T("black.mine.line", ItemName(o.Item) + (o.Count > 1 ? " ×" + o.Count : ""), o.Seller, L.T("black.mode." + o.Mode), L.T("black.state." + o.State + (o.Why != null && o.State != OrderState.Done ? "." + o.Why : "")), o.DueDay));
|
||||
l.AddLabel(L.T("black.mine.line", ItemName(o.Item) + (o.Count > 1 ? " ×" + o.Count : ""), BlackDelivery.DisplayName(o.Seller), L.T("black.mode." + o.Mode), L.T("black.state." + o.State + (o.Why != null && o.State != OrderState.Done ? "." + o.Why : "")), o.DueDay));
|
||||
}, r =>
|
||||
{
|
||||
r.AddHeader(L.T("black.forum.h"));
|
||||
if (d.Black.Forum.Count == 0) r.AddLabel(L.T("black.forum.quiet"));
|
||||
foreach (var f in d.Black.Forum)
|
||||
r.AddLabel(f.StartsWith("scam:") ? L.T("black.forum.scam", f.Substring(5)) : f.StartsWith("busted:") ? L.T("black.forum.busted", f.Substring(7)) : L.T("black.forum." + f));
|
||||
r.AddLabel(f.StartsWith("scam:") ? L.T("black.forum.scam", BlackDelivery.DisplayName(f.Substring(5))) : f.StartsWith("busted:") ? L.T("black.forum.busted", f.Substring(7)) : L.T("black.forum." + f));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user