mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add nullable context to SabreTools.DatItems
This change also starts migrating the internals of the DatItem formats to the new internal models. Right now, it's basically just acting like a wrapper around those models.
This commit is contained in:
@@ -571,7 +571,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
var item = new DipSwitch
|
||||
{
|
||||
Name = dipswitch.Name,
|
||||
Values = new List<Setting>(),
|
||||
Values = new List<DipValue>(),
|
||||
|
||||
Source = new Source
|
||||
{
|
||||
@@ -582,13 +582,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
|
||||
foreach (string entry in dipswitch.Entry ?? Array.Empty<string>())
|
||||
{
|
||||
var setting = new Setting
|
||||
var dipValue = new DipValue
|
||||
{
|
||||
Name = dipswitch.Name,
|
||||
Value = entry,
|
||||
Default = entry == dipswitch.Default,
|
||||
};
|
||||
item.Values.Add(setting);
|
||||
item.Values.Add(dipValue);
|
||||
}
|
||||
|
||||
item.CopyMachineInformation(machine);
|
||||
|
||||
Reference in New Issue
Block a user