[Enums, DatFile, Machine] Machine types never overlap

This commit is contained in:
Matt Nadareski
2017-01-08 22:48:19 -08:00
parent 6419f8af5f
commit 37b6a4303d
3 changed files with 27 additions and 23 deletions

View File

@@ -1249,9 +1249,11 @@ namespace SabreTools.Helper.Dats
CloneOf = xtr.GetAttribute("cloneof") ?? "",
SampleOf = xtr.GetAttribute("sampleof") ?? "",
IsBios = xtr.GetAttribute("isbios") == "yes",
IsDevice = xtr.GetAttribute("isdevice") == "yes",
IsMechanical = xtr.GetAttribute("ismechanical") == "yes",
MachineType =
xtr.GetAttribute("isbios") == "yes" ? MachineType.Bios :
xtr.GetAttribute("isdevice") == "yes" ? MachineType.Device :
xtr.GetAttribute("ismechanical") == "yes" ? MachineType.Mechanical :
MachineType.None,
Runnable = xtr.GetAttribute("runnable") == "yes",
};
@@ -1268,6 +1270,7 @@ namespace SabreTools.Helper.Dats
}
}
if (superdat && !keep)
{
string tempout = Regex.Match(machine.Name, @".*?\\(.*)").Groups[1].Value;