S4 收尾
This commit is contained in:
@@ -24,10 +24,14 @@ namespace GeometryTD.DataTable
|
||||
|
||||
public TagType TagType => (TagType)m_Id;
|
||||
|
||||
public string TagGroupText { get; private set; }
|
||||
|
||||
public RarityType MinRarity { get; private set; }
|
||||
|
||||
public int Weight { get; private set; }
|
||||
|
||||
public bool IsImplemented { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
@@ -41,8 +45,22 @@ namespace GeometryTD.DataTable
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
Name = columnStrings[index++];
|
||||
MinRarity = EnumUtility<RarityType>.Get(columnStrings[index++]);
|
||||
Weight = int.Parse(columnStrings[index++]);
|
||||
|
||||
bool hasExtendedColumns = columnStrings.Length - index >= 4;
|
||||
if (hasExtendedColumns)
|
||||
{
|
||||
TagGroupText = columnStrings[index++];
|
||||
MinRarity = EnumUtility<RarityType>.Get(columnStrings[index++]);
|
||||
Weight = int.Parse(columnStrings[index++]);
|
||||
IsImplemented = bool.Parse(columnStrings[index++]);
|
||||
}
|
||||
else
|
||||
{
|
||||
TagGroupText = string.Empty;
|
||||
MinRarity = EnumUtility<RarityType>.Get(columnStrings[index++]);
|
||||
Weight = int.Parse(columnStrings[index++]);
|
||||
IsImplemented = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user