S4-07 process 1

This commit is contained in:
SepComet
2026-03-11 10:18:14 +08:00
parent 52f9e212b9
commit 9de2e50262
32 changed files with 803 additions and 194 deletions
@@ -18,7 +18,8 @@ namespace GeometryTD.UI
public string Title;
public string TypeText;
public string Description;
public string[] TagTexts;
public TagType[] Tags;
public TagRuntimeData[] TagRuntimes;
}
protected override UIFormType UIFormTypeId => UIFormType.CombatFinishForm;
@@ -138,7 +139,8 @@ namespace GeometryTD.UI
tower.Name,
"Tower",
ItemDescUtility.BuildTowerDesc(tower, muzzleMap, bearingMap, baseMap) ?? string.Empty,
TagDisplayUtility.BuildTowerTagTexts(tower.Stats));
tower.Stats?.Tags,
tower.Stats?.TagRuntimes);
}
}
@@ -166,7 +168,8 @@ namespace GeometryTD.UI
item.Name,
BuildComponentTypeText(item.SlotType),
ItemDescUtility.BuildMuzzleDesc(item) ?? string.Empty,
TagDisplayUtility.BuildTagTexts(item.Tags));
item.Tags,
null);
}
}
@@ -194,7 +197,8 @@ namespace GeometryTD.UI
item.Name,
BuildComponentTypeText(item.SlotType),
ItemDescUtility.BuildBearingDesc(item) ?? string.Empty,
TagDisplayUtility.BuildTagTexts(item.Tags));
item.Tags,
null);
}
}
@@ -222,7 +226,8 @@ namespace GeometryTD.UI
item.Name,
BuildComponentTypeText(item.SlotType),
ItemDescUtility.BuildBaseDesc(item) ?? string.Empty,
TagDisplayUtility.BuildTagTexts(item.Tags));
item.Tags,
null);
}
}
@@ -261,7 +266,13 @@ namespace GeometryTD.UI
return Color.white;
}
private void AddItemDescSeed(long itemId, string title, string typeText, string description, string[] tagTexts)
private void AddItemDescSeed(
long itemId,
string title,
string typeText,
string description,
TagType[] tags,
TagRuntimeData[] tagRuntimes)
{
if (itemId <= 0)
{
@@ -273,13 +284,19 @@ namespace GeometryTD.UI
Title = string.IsNullOrWhiteSpace(title) ? $"Item {itemId}" : title,
TypeText = typeText ?? string.Empty,
Description = description ?? string.Empty,
TagTexts = CloneTagTexts(tagTexts)
Tags = CloneTags(tags),
TagRuntimes = CloneTagRuntimes(tagRuntimes)
};
}
private static string[] CloneTagTexts(string[] tagTexts)
private static TagType[] CloneTags(TagType[] tags)
{
return tagTexts != null ? (string[])tagTexts.Clone() : System.Array.Empty<string>();
return tags != null ? (TagType[])tags.Clone() : System.Array.Empty<TagType>();
}
private static TagRuntimeData[] CloneTagRuntimes(TagRuntimeData[] tagRuntimes)
{
return InventoryCloneUtility.CloneTagRuntimes(tagRuntimes);
}
private static string BuildComponentTypeText(TowerCompSlotType slotType)
@@ -374,7 +391,8 @@ namespace GeometryTD.UI
Description = seed.Description ?? string.Empty,
Price = 0,
TargetPos = args.TargetPos,
TagTexts = CloneTagTexts(seed.TagTexts)
Tags = CloneTags(seed.Tags),
TagRuntimes = CloneTagRuntimes(seed.TagRuntimes)
});
}
@@ -402,6 +420,3 @@ namespace GeometryTD.UI
}
}
}