Black market: elite shop for expensive goods, private sellers, weekly catalog value ~20k
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
61ec91b34d
commit
96d8b7cf3b
7 files changed
+88
-34
No files matched your search
@@ -20,12 +20,15 @@ namespace Decentralized
|
||||
ModHook.OnGenerateCustomerNormal -= OnGenerate;
|
||||
}
|
||||
|
||||
private static readonly System.Collections.Generic.Dictionary<string, long> ValueCache = new System.Collections.Generic.Dictionary<string, long>();
|
||||
|
||||
public static long Value(string id)
|
||||
{
|
||||
if (ValueCache.TryGetValue(id, out var cached)) return cached;
|
||||
var it = ModHelper.SpawnItem(id);
|
||||
if (it == null) return 0;
|
||||
long v = it.GetBaseValue();
|
||||
it.Destroy();
|
||||
long v = 0;
|
||||
if (it != null) { v = it.GetBaseValue(); it.Destroy(); }
|
||||
ValueCache[id] = v;
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
@@ -332,3 +332,5 @@ merchant.Storage,Storage
|
||||
merchant.Tools,Tools
|
||||
merchant.Luxury,Luxury
|
||||
black.kind.Goods,Goods
|
||||
merchant.Elite,Elite shop
|
||||
merchant.Personal,Private seller
|
||||
|
@@ -331,3 +331,5 @@ merchant.Storage,仓储
|
||||
merchant.Tools,工具
|
||||
merchant.Luxury,奢侈品
|
||||
black.kind.Goods,商品
|
||||
merchant.Elite,尖端店铺
|
||||
merchant.Personal,个人卖家
|
||||
|
Reference in new issue
Block a user