Inspection overlays designed by agy; appearance dimensions tied to value, wear and death
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dd95aad7aa
commit
6b2d394023
76 files changed
+1221
-11
No files matched your search
@@ -58,6 +58,34 @@ namespace Decentralized
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>检视大图的叠加层。五个维度各自对应一种或几种细节,组合时再加几处同源的小细节(磕碰、开过壳的螺丝、重新粘过的封条)。</summary>
|
||||
public static List<string> BigOverlays(GameItem item)
|
||||
{
|
||||
var o = new List<string>();
|
||||
var u = Items.ToUnit(item);
|
||||
if (u.Dead) return o;
|
||||
var l = u.Look;
|
||||
string P = "gpu_big_ov_";
|
||||
if (!Items.IsBack(item))
|
||||
{
|
||||
if (l.Fan == 1) o.Add(P + (l.Fingers > 0 ? "fan_dust2" : "fan_dust1"));
|
||||
if (l.Fan == 2) { o.Add(P + "fan_chip"); if (l.Fingers == 2) o.Add(P + "fan_oil"); }
|
||||
if (l.Fingers == 1) o.Add(P + "fin_dim");
|
||||
if (l.Fingers == 2) o.Add(P + "fin_oxide");
|
||||
if (l.Bracket == 1) { o.Add(P + "brk_scratch"); if (l.Fan > 0) o.Add(P + "shroud_chip"); }
|
||||
if (l.Bracket == 2) o.Add(P + "brk_port");
|
||||
}
|
||||
else
|
||||
{
|
||||
string model = (l.Print == 1 && u.FakeOf != null ? u.FakeOf : u.Model).ToLowerInvariant();
|
||||
o.Add(P + "print_" + (l.Print == 2 ? "skew_" : l.Print == 1 ? "stamp_" : "normal_") + model);
|
||||
if (l.Print == 2) o.Add(P + "screw_opened"); // 重印过,说明拆开过
|
||||
if (l.Sticker == 1) o.Add(P + "sticker_hand");
|
||||
if (l.Sticker == 2) o.Add(P + (l.Print != 0 ? "seal_reglued" : "seal_missing"));
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
private void Build(InspectionUIManager m)
|
||||
{
|
||||
root = new GameObject("_PdGpuInspection", typeof(RectTransform)).GetComponent<RectTransform>();
|
||||
@@ -92,12 +120,11 @@ namespace Decentralized
|
||||
{
|
||||
foreach (Transform c in cardRoot) Destroy(c.gameObject);
|
||||
var keys = new List<string>();
|
||||
string baseKey = Items.LookKeys(item, keys);
|
||||
keys.Insert(0, baseKey);
|
||||
foreach (var small in keys)
|
||||
string baseKey = Items.LookKeys(item, keys); // 小图键名只用来取底图(品牌与正反面)
|
||||
var layers = new List<string> { "gpu_big_" + baseKey.Substring("gpu_".Length) };
|
||||
layers.AddRange(BigOverlays(item));
|
||||
foreach (var k in layers)
|
||||
{
|
||||
// 检视用大图:键名对应小图(gpu_probidia_f → gpu_big_probidia_f,gpu_ov_fan1 → gpu_big_ov_fan1)
|
||||
string k = small.StartsWith("gpu_ov_") ? "gpu_big_ov_" + small.Substring("gpu_ov_".Length) : "gpu_big_" + small.Substring("gpu_".Length);
|
||||
var sprite = Items.ModSprite(k);
|
||||
if (sprite == null) continue;
|
||||
var go = new GameObject(k, typeof(RectTransform), typeof(Image));
|
||||
|
||||
Reference in new issue
Block a user