mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 06:45:11 +00:00
Machine is now propertyful
This commit is contained in:
@@ -63,7 +63,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
CloneOf = parent.CloneOf,
|
||||
Year = parent.Year,
|
||||
Manufacturer = parent.Manufacturer,
|
||||
Category = parent.ReadString(Data.Models.Metadata.Machine.CategoryKey),
|
||||
Category = parent.Category is null ? null : string.Join(", ", parent.Category),
|
||||
Players = parent.Players,
|
||||
Rotation = parent.Rotation,
|
||||
Control = parent.Control,
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
CloneOf = item.CloneOf,
|
||||
Year = item.Year,
|
||||
Manufacturer = item.Manufacturer,
|
||||
[Data.Models.Metadata.Machine.CategoryKey] = item.Category,
|
||||
Category = item.Category is null ? null : [item.Category],
|
||||
Players = item.Players,
|
||||
Rotation = item.Rotation,
|
||||
Control = item.Control,
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
// gameBase.DriverStatus = item.ReadString(Data.Models.Metadata.Machine.DriverKey); // TODO: Needs metadata mapping
|
||||
gameBase.Year = item.Year;
|
||||
gameBase.Manufacturer = item.Manufacturer;
|
||||
gameBase.Category = item.ReadString(Data.Models.Metadata.Machine.CategoryKey);
|
||||
gameBase.Category = item.Category is null ? null : string.Join(", ", item.Category);
|
||||
gameBase.CloneOf = item.CloneOf;
|
||||
gameBase.RomOf = item.RomOf;
|
||||
gameBase.SampleOf = item.SampleOf;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
// Driver = item.DriverStatus, // TODO: Needs metadata mapping
|
||||
Year = item.Year,
|
||||
Manufacturer = item.Manufacturer,
|
||||
[Data.Models.Metadata.Machine.CategoryKey] = item.Category,
|
||||
Category = item.Category is null ? null : [item.Category],
|
||||
CloneOf = item.CloneOf,
|
||||
RomOf = item.RomOf,
|
||||
SampleOf = item.SampleOf,
|
||||
|
||||
@@ -122,12 +122,12 @@ namespace SabreTools.Serialization.CrossModel
|
||||
gameBase.Id = item.Id;
|
||||
gameBase.CloneOfId = item.CloneOfId;
|
||||
gameBase.Runnable = item.Runnable;
|
||||
gameBase.Comment = item.ReadStringArray(Data.Models.Metadata.Machine.CommentKey);
|
||||
gameBase.Comment = item.Comment;
|
||||
gameBase.Description = item.Description;
|
||||
gameBase.Year = item.Year;
|
||||
gameBase.Manufacturer = item.Manufacturer;
|
||||
gameBase.Publisher = item.Publisher;
|
||||
gameBase.Category = item.ReadStringArray(Data.Models.Metadata.Machine.CategoryKey);
|
||||
gameBase.Category = item.Category;
|
||||
|
||||
if (item.TitleID is not null
|
||||
|| item.Developer is not null
|
||||
|
||||
@@ -127,10 +127,10 @@ namespace SabreTools.Serialization.CrossModel
|
||||
var machine = new Data.Models.Metadata.Machine
|
||||
{
|
||||
Board = item.Board,
|
||||
[Data.Models.Metadata.Machine.CategoryKey] = item.Category,
|
||||
Category = item.Category,
|
||||
CloneOf = item.CloneOf ?? item.Trurip?.CloneOf,
|
||||
CloneOfId = item.CloneOfId,
|
||||
[Data.Models.Metadata.Machine.CommentKey] = item.Comment,
|
||||
Comment = item.Comment,
|
||||
CRC = item.Trurip?.CRC,
|
||||
Description = item.Description,
|
||||
Developer = item.Trurip?.Developer,
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
Language = item.Language,
|
||||
Im1CRC = item.Im1CRC,
|
||||
Im2CRC = item.Im2CRC,
|
||||
Comment = item.ReadString(Data.Models.Metadata.Machine.CommentKey),
|
||||
Comment = item.Comment is null ? null : string.Join(", ", item.Comment),
|
||||
DuplicateID = item.DuplicateID,
|
||||
};
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
Language = item.Language,
|
||||
Im1CRC = item.Im1CRC,
|
||||
Im2CRC = item.Im2CRC,
|
||||
[Data.Models.Metadata.Machine.CommentKey] = item.Comment,
|
||||
Comment = item.Comment is null ? null : [item.Comment],
|
||||
DuplicateID = item.DuplicateID,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user