mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add a remaining ListXML-specific objects
Also fixes the usage of some other objects, adds proper objects for certain cases, and adds a bunch of TODOs around the new objects. There will be a lot of overhauls needed to properly support things like Devices and Slots
This commit is contained in:
@@ -313,7 +313,7 @@ namespace SabreTools.Library.DatFiles
|
||||
SourceFile = reader.GetAttribute("sourcefile"),
|
||||
Board = reader.GetAttribute("board"),
|
||||
RebuildTo = reader.GetAttribute("rebuildto"),
|
||||
Runnable = reader.GetAttribute("runnable").AsYesNo(), // Listxml-specific, used by older DATs
|
||||
Runnable = reader.GetAttribute("runnable").AsRunnable(), // Used by older DATs
|
||||
|
||||
Comment = string.Empty,
|
||||
|
||||
@@ -982,10 +982,18 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
if (!Header.ExcludeFields.Contains(Field.Runnable) && datItem.Machine.Runnable != null)
|
||||
{
|
||||
if (datItem.Machine.Runnable == true)
|
||||
xtw.WriteAttributeString("runnable", "yes");
|
||||
else if (datItem.Machine.Runnable == false)
|
||||
xtw.WriteAttributeString("runnable", "no");
|
||||
switch (datItem.Machine.Runnable)
|
||||
{
|
||||
case Runnable.No:
|
||||
xtw.WriteAttributeString("runnable", "no");
|
||||
break;
|
||||
case Runnable.Partial:
|
||||
xtw.WriteAttributeString("runnable", "partial");
|
||||
break;
|
||||
case Runnable.Yes:
|
||||
xtw.WriteAttributeString("runnable", "yes");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(datItem.GetField(Field.CloneOf, Header.ExcludeFields)) && !string.Equals(datItem.Machine.Name, datItem.Machine.CloneOf, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
Reference in New Issue
Block a user