[DatFile] Make runnable flag better

This commit is contained in:
Matt Nadareski
2017-02-02 23:04:24 -08:00
parent 4e30054d30
commit 04e5980e01
4 changed files with 19 additions and 7 deletions

View File

@@ -1274,7 +1274,6 @@ namespace SabreTools.Helper.Dats
xtr.GetAttribute("isdevice") == "yes" ? MachineType.Device :
xtr.GetAttribute("ismechanical") == "yes" ? MachineType.Mechanical :
MachineType.None,
Runnable = xtr.GetAttribute("runnable") == "yes" || xtr.GetAttribute("runnable") == null,
};
// Get the supported value from the reader
@@ -1291,6 +1290,20 @@ namespace SabreTools.Helper.Dats
}
}
// Get the runnable value from the reader
if (subreader.GetAttribute("runnable") != null)
{
switch (subreader.GetAttribute("runnable"))
{
case "no":
machine.Runnable = false;
break;
case "yes":
machine.Runnable = true;
break;
}
}
if (superdat && !keep)
{
string tempout = Regex.Match(machine.Name, @".*?\\(.*)").Groups[1].Value;