S4-07 process 1
This commit is contained in:
@@ -43,7 +43,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +72,8 @@ namespace GeometryTD.UI
|
||||
item.Name,
|
||||
BuildComponentTypeText(item.SlotType),
|
||||
ItemDescUtility.BuildMuzzleDesc(item) ?? string.Empty,
|
||||
TagDisplayUtility.BuildTagTexts(item.Tags));
|
||||
item.Tags,
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +101,8 @@ namespace GeometryTD.UI
|
||||
item.Name,
|
||||
BuildComponentTypeText(item.SlotType),
|
||||
ItemDescUtility.BuildBearingDesc(item) ?? string.Empty,
|
||||
TagDisplayUtility.BuildTagTexts(item.Tags));
|
||||
item.Tags,
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +130,8 @@ namespace GeometryTD.UI
|
||||
item.Name,
|
||||
BuildComponentTypeText(item.SlotType),
|
||||
ItemDescUtility.BuildBaseDesc(item) ?? string.Empty,
|
||||
TagDisplayUtility.BuildTagTexts(item.Tags));
|
||||
item.Tags,
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +173,13 @@ namespace GeometryTD.UI
|
||||
_compAreaTowerIds.Add(itemContext.InstanceId);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -181,7 +191,8 @@ namespace GeometryTD.UI
|
||||
Title = string.IsNullOrWhiteSpace(title) ? $"Item {itemId}" : title,
|
||||
TypeText = typeText ?? string.Empty,
|
||||
Description = description ?? string.Empty,
|
||||
TagTexts = tagTexts != null ? (string[])tagTexts.Clone() : Array.Empty<string>()
|
||||
Tags = CloneTags(tags),
|
||||
TagRuntimes = CloneTagRuntimes(tagRuntimes)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using GeometryTD.CustomEvent;
|
||||
using GeometryTD.CustomUtility;
|
||||
using GeometryTD.Definition;
|
||||
using GameFramework.Event;
|
||||
using UnityEngine;
|
||||
@@ -22,7 +23,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.RepoForm;
|
||||
@@ -151,10 +153,21 @@ 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)
|
||||
});
|
||||
}
|
||||
|
||||
private static TagType[] CloneTags(TagType[] tags)
|
||||
{
|
||||
return tags != null ? (TagType[])tags.Clone() : System.Array.Empty<TagType>();
|
||||
}
|
||||
|
||||
private static TagRuntimeData[] CloneTagRuntimes(TagRuntimeData[] tagRuntimes)
|
||||
{
|
||||
return InventoryCloneUtility.CloneTagRuntimes(tagRuntimes);
|
||||
}
|
||||
|
||||
private void OnRepoItemDragEnded(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!IsEventFromCurrentForm(sender))
|
||||
|
||||
Reference in New Issue
Block a user