mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Fix CMP parsing again, add NotNodump option for filter
This commit is contained in:
@@ -819,8 +819,30 @@ namespace SabreTools.Helper
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Special case for itemStatus...
|
||||
else if (gc[i] == "itemStatus" && attrib != "status" && attrib != "flags")
|
||||
// Special cases for item statuses
|
||||
else if (gc[i] == "good" && attrib != "status" && attrib != "flags")
|
||||
{
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
((Rom)item).ItemStatus = ItemStatus.Good;
|
||||
}
|
||||
else if (item.Type == ItemType.Disk)
|
||||
{
|
||||
((Disk)item).ItemStatus = ItemStatus.Good;
|
||||
}
|
||||
}
|
||||
else if (gc[i] == "baddump" && attrib != "status" && attrib != "flags")
|
||||
{
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
((Rom)item).ItemStatus = ItemStatus.BadDump;
|
||||
}
|
||||
else if (item.Type == ItemType.Disk)
|
||||
{
|
||||
((Disk)item).ItemStatus = ItemStatus.BadDump;
|
||||
}
|
||||
}
|
||||
else if (gc[i] == "nodump" && attrib != "status" && attrib != "flags")
|
||||
{
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
@@ -831,6 +853,17 @@ namespace SabreTools.Helper
|
||||
((Disk)item).ItemStatus = ItemStatus.Nodump;
|
||||
}
|
||||
}
|
||||
else if (gc[i] == "verified" && attrib != "status" && attrib != "flags")
|
||||
{
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
((Rom)item).ItemStatus = ItemStatus.Verified;
|
||||
}
|
||||
else if (item.Type == ItemType.Disk)
|
||||
{
|
||||
((Disk)item).ItemStatus = ItemStatus.Verified;
|
||||
}
|
||||
}
|
||||
// Even number of quotes, not in a quote, not in attribute
|
||||
else if (Regex.Matches(gc[i], "\"").Count % 2 == 0 && !quote && attrib == "")
|
||||
{
|
||||
@@ -934,6 +967,48 @@ namespace SabreTools.Helper
|
||||
}
|
||||
i++;
|
||||
break;
|
||||
|
||||
// Special cases for item statuses
|
||||
case "good":
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
((Rom)item).ItemStatus = ItemStatus.Good;
|
||||
}
|
||||
else if (item.Type == ItemType.Disk)
|
||||
{
|
||||
((Disk)item).ItemStatus = ItemStatus.Good;
|
||||
}
|
||||
break;
|
||||
case "baddump":
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
((Rom)item).ItemStatus = ItemStatus.BadDump;
|
||||
}
|
||||
else if (item.Type == ItemType.Disk)
|
||||
{
|
||||
((Disk)item).ItemStatus = ItemStatus.BadDump;
|
||||
}
|
||||
break;
|
||||
case "nodump":
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
((Rom)item).ItemStatus = ItemStatus.Nodump;
|
||||
}
|
||||
else if (item.Type == ItemType.Disk)
|
||||
{
|
||||
((Disk)item).ItemStatus = ItemStatus.Nodump;
|
||||
}
|
||||
break;
|
||||
case "verified":
|
||||
if (item.Type == ItemType.Rom)
|
||||
{
|
||||
((Rom)item).ItemStatus = ItemStatus.Verified;
|
||||
}
|
||||
else if (item.Type == ItemType.Disk)
|
||||
{
|
||||
((Disk)item).ItemStatus = ItemStatus.Verified;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
attrib = "";
|
||||
|
||||
Reference in New Issue
Block a user