mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Wire up partial support for dipswitches
This commit is contained in:
@@ -257,10 +257,16 @@ namespace SabreTools.Library.DatItems
|
||||
/// <summary>
|
||||
/// List of shared feature items
|
||||
/// </summary>
|
||||
/// <remarks>Also in SoftwareList</remarks>
|
||||
[JsonProperty("sharedfeat")]
|
||||
public List<SoftwareListSharedFeature> SharedFeatures { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of shared feature items
|
||||
/// </summary>
|
||||
/// <remarks>Also in SoftwareList</remarks>
|
||||
[JsonProperty("dipswitches")]
|
||||
public List<SoftwareListDipSwitch> DipSwitches { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
@@ -414,6 +420,10 @@ namespace SabreTools.Library.DatItems
|
||||
case Field.SharedFeatures:
|
||||
fieldValue = string.Join(";", (SharedFeatures ?? new List<SoftwareListSharedFeature>()).Select(i => $"{i.Name}={i.Value}"));
|
||||
break;
|
||||
case Field.DipSwitches:
|
||||
// TODO: There is no possible way this will work... use placeholder for now
|
||||
fieldValue = "dipswitches";
|
||||
break;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -596,6 +606,14 @@ namespace SabreTools.Library.DatItems
|
||||
}
|
||||
}
|
||||
|
||||
if (mappings.Keys.Contains(Field.DipSwitches))
|
||||
{
|
||||
if (DipSwitches == null)
|
||||
DipSwitches = new List<SoftwareListDipSwitch>();
|
||||
|
||||
// TODO: There's no way this will work... just create the new list for now
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -696,6 +714,7 @@ namespace SabreTools.Library.DatItems
|
||||
|
||||
Supported = this.Supported,
|
||||
SharedFeatures = this.SharedFeatures,
|
||||
DipSwitches = this.DipSwitches,
|
||||
|
||||
#endregion
|
||||
};
|
||||
@@ -1104,6 +1123,9 @@ namespace SabreTools.Library.DatItems
|
||||
if (fields.Contains(Field.SharedFeatures))
|
||||
SharedFeatures = null;
|
||||
|
||||
if (fields.Contains(Field.DipSwitches))
|
||||
DipSwitches = null;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -1252,6 +1274,9 @@ namespace SabreTools.Library.DatItems
|
||||
if (fields.Contains(Field.SharedFeatures))
|
||||
SharedFeatures = machine.SharedFeatures;
|
||||
|
||||
if (fields.Contains(Field.DipSwitches))
|
||||
DipSwitches = machine.DipSwitches;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user