1
Fork 0
mirror of https://github.com/xivdev/EXDSchema.git synced 2025-06-06 16:17:46 +00:00
EXDSchema/SchemaConverter/ColumnInfo.cs

36 lines
No EOL
1.1 KiB
C#

using Lumina.Data.Structs.Excel;
using SchemaConverter.New;
namespace SchemaConverter;
public class ColumnInfo
{
public int BitOffset { get; set; }
public string Name { get; set; }
public int Index;
public string? Type { get; set; } // icon, color etc
public ExcelColumnDataType DataType { get; set; }
public bool IsArrayMember { get; set; }
public int? ArrayIndex { get; set; }
public Condition? Condition { get; set; }
public List<string>? Targets { get; set; }
public ColumnInfo() { }
public ColumnInfo(Old.Definition def, int index, bool isArrayMember, int? arrayIndex, Condition? condition, List<string>? targets)
{
var converterType = def.Converter?.Type;
var nameSuffix = isArrayMember ? $"[{arrayIndex}]" : "";
Name = Util.StripDefinitionName(def.Name);// + nameSuffix;
Index = index;
Type = converterType;
IsArrayMember = isArrayMember;
ArrayIndex = arrayIndex;
Condition = condition;
Targets = targets;
}
public override string ToString() => $"{Name} ({Index}@{BitOffset / 8}&{BitOffset % 8}) {Type} {IsArrayMember} {ArrayIndex}";
}