mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
All AttractMode fields are Rom-only
This commit is contained in:
@@ -94,17 +94,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Adjuster()
|
return new Adjuster()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Default = this.Default,
|
Default = this.Default,
|
||||||
Conditions = this.Conditions,
|
Conditions = this.Conditions,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -70,16 +70,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Archive()
|
return new Archive()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,17 +88,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new BiosSet()
|
return new BiosSet()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Description = this.Description,
|
Description = this.Description,
|
||||||
Default = this.Default,
|
Default = this.Default,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -99,17 +99,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Chip()
|
return new Chip()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Tag = this.Tag,
|
Tag = this.Tag,
|
||||||
ChipType = this.ChipType,
|
ChipType = this.ChipType,
|
||||||
Clock = this.Clock,
|
Clock = this.Clock,
|
||||||
|
|||||||
@@ -96,9 +96,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -133,17 +133,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Configuration()
|
return new Configuration()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Tag = this.Tag,
|
Tag = this.Tag,
|
||||||
Mask = this.Mask,
|
Mask = this.Mask,
|
||||||
Conditions = this.Conditions,
|
Conditions = this.Conditions,
|
||||||
|
|||||||
@@ -161,9 +161,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
[JsonObject("datitem")]
|
[JsonObject("datitem")]
|
||||||
public abstract class DatItem : IEquatable<DatItem>, IComparable<DatItem>, ICloneable
|
public abstract class DatItem : IEquatable<DatItem>, IComparable<DatItem>, ICloneable
|
||||||
{
|
{
|
||||||
// TODO: Should any of these be specific to certain types?
|
|
||||||
// Most of the "weird" fields might only apply to Rom or Disk?
|
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
#region Common Fields
|
#region Common Fields
|
||||||
@@ -50,22 +48,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region AttractMode Fields
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Alternate name for the item
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("alt_romname", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
|
||||||
public string AltName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Alternate title for the item
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("alt_title", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
|
||||||
public string AltTitle { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Metadata information
|
#region Metadata information
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -291,16 +273,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
Machine = new Machine();
|
Machine = new Machine();
|
||||||
|
|
||||||
Machine.SetFields(mappings);
|
Machine.SetFields(mappings);
|
||||||
|
|
||||||
#region AttractMode
|
|
||||||
|
|
||||||
if (mappings.Keys.Contains(Field.DatItem_AltName))
|
|
||||||
AltName = mappings[Field.DatItem_AltName];
|
|
||||||
|
|
||||||
if (mappings.Keys.Contains(Field.DatItem_AltTitle))
|
|
||||||
AltTitle = mappings[Field.DatItem_AltTitle];
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -629,22 +601,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region AttractMode
|
|
||||||
|
|
||||||
// Filter on alt name
|
|
||||||
if (filter.DatItem_AltName.MatchesPositiveSet(AltName) == false)
|
|
||||||
return false;
|
|
||||||
if (filter.DatItem_AltName.MatchesNegativeSet(AltName) == true)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Filter on alt title
|
|
||||||
if (filter.DatItem_AltTitle.MatchesPositiveSet(AltTitle) == false)
|
|
||||||
return false;
|
|
||||||
if (filter.DatItem_AltTitle.MatchesNegativeSet(AltTitle) == true)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -656,16 +612,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
// Remove machine fields
|
// Remove machine fields
|
||||||
Machine.RemoveFields(fields);
|
Machine.RemoveFields(fields);
|
||||||
|
|
||||||
#region AttractMode
|
|
||||||
|
|
||||||
if (fields.Contains(Field.DatItem_AltName))
|
|
||||||
AltName = null;
|
|
||||||
|
|
||||||
if (fields.Contains(Field.DatItem_AltTitle))
|
|
||||||
AltTitle = null;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -755,15 +701,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
/// <param name="fields">List of Fields representing what should be updated</param>
|
/// <param name="fields">List of Fields representing what should be updated</param>
|
||||||
public virtual void ReplaceFields(DatItem item, List<Field> fields)
|
public virtual void ReplaceFields(DatItem item, List<Field> fields)
|
||||||
{
|
{
|
||||||
#region AttractMode
|
|
||||||
|
|
||||||
if (fields.Contains(Field.DatItem_AltName))
|
|
||||||
AltName = item.AltName;
|
|
||||||
|
|
||||||
if (fields.Contains(Field.DatItem_AltTitle))
|
|
||||||
AltTitle = item.AltTitle;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -112,9 +112,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -70,16 +70,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new DeviceReference()
|
return new DeviceReference()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,9 +155,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -227,9 +227,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
@@ -260,9 +257,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = ItemType.Rom,
|
ItemType = ItemType.Rom,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -178,9 +178,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -94,9 +94,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -70,16 +70,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Extension()
|
return new Extension()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,9 +84,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -78,17 +78,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Info()
|
return new Info()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Value = this.Value,
|
Value = this.Value,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,9 +96,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -79,17 +79,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Instance()
|
return new Instance()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
BriefName = this.BriefName,
|
BriefName = this.BriefName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,17 +87,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Location()
|
return new Location()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Number = this.Number,
|
Number = this.Number,
|
||||||
Inverted = this.Inverted,
|
Inverted = this.Inverted,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -135,17 +135,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Media()
|
return new Media()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
_md5 = this._md5,
|
_md5 = this._md5,
|
||||||
_sha1 = this._sha1,
|
_sha1 = this._sha1,
|
||||||
_sha256 = this._sha256,
|
_sha256 = this._sha256,
|
||||||
@@ -160,17 +157,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
var rom = new Rom()
|
var rom = new Rom()
|
||||||
{
|
{
|
||||||
Name = this.Name + ".aif",
|
|
||||||
ItemType = ItemType.Rom,
|
ItemType = ItemType.Rom,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name + ".aif",
|
||||||
MD5 = this.MD5,
|
MD5 = this.MD5,
|
||||||
SHA1 = this.SHA1,
|
SHA1 = this.SHA1,
|
||||||
SHA256 = this.SHA256,
|
SHA256 = this.SHA256,
|
||||||
|
|||||||
@@ -71,9 +71,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
@@ -88,17 +88,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new RamOption()
|
return new RamOption()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Default = this.Default,
|
Default = this.Default,
|
||||||
Content = this.Content,
|
Content = this.Content,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -110,17 +110,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Release()
|
return new Release()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Region = this.Region,
|
Region = this.Region,
|
||||||
Language = this.Language,
|
Language = this.Language,
|
||||||
Date = this.Date,
|
Date = this.Date,
|
||||||
|
|||||||
@@ -171,6 +171,22 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region AttractMode
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Alternate name for the item
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("alt_romname", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
|
public string AltName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Alternate title for the item
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("alt_title", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
|
public string AltTitle { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region OpenMSX
|
#region OpenMSX
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -320,6 +336,16 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region AttractMode
|
||||||
|
|
||||||
|
if (mappings.Keys.Contains(Field.DatItem_AltName))
|
||||||
|
AltName = mappings[Field.DatItem_AltName];
|
||||||
|
|
||||||
|
if (mappings.Keys.Contains(Field.DatItem_AltTitle))
|
||||||
|
AltTitle = mappings[Field.DatItem_AltTitle];
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region OpenMSX
|
#region OpenMSX
|
||||||
|
|
||||||
if (mappings.Keys.Contains(Field.DatItem_Original))
|
if (mappings.Keys.Contains(Field.DatItem_Original))
|
||||||
@@ -472,17 +498,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Original = this.Original,
|
|
||||||
OpenMSXSubType = this.OpenMSXSubType,
|
|
||||||
OpenMSXType = this.OpenMSXType,
|
|
||||||
Remark = this.Remark,
|
|
||||||
Boot = this.Boot,
|
|
||||||
|
|
||||||
LoadFlag = this.LoadFlag,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
@@ -506,7 +521,17 @@ namespace SabreTools.Library.DatItems
|
|||||||
Optional = this.Optional,
|
Optional = this.Optional,
|
||||||
Inverted = this.Inverted,
|
Inverted = this.Inverted,
|
||||||
|
|
||||||
|
AltName = this.AltName,
|
||||||
|
AltTitle = this.AltTitle,
|
||||||
|
|
||||||
|
Original = this.Original,
|
||||||
|
OpenMSXSubType = this.OpenMSXSubType,
|
||||||
|
OpenMSXType = this.OpenMSXType,
|
||||||
|
Remark = this.Remark,
|
||||||
|
Boot = this.Boot,
|
||||||
|
|
||||||
DataArea = this.DataArea,
|
DataArea = this.DataArea,
|
||||||
|
LoadFlag = this.LoadFlag,
|
||||||
Part = this.Part,
|
Part = this.Part,
|
||||||
Value = this.Value,
|
Value = this.Value,
|
||||||
};
|
};
|
||||||
@@ -815,6 +840,22 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region AttractMode
|
||||||
|
|
||||||
|
// Filter on alt name
|
||||||
|
if (filter.DatItem_AltName.MatchesPositiveSet(AltName) == false)
|
||||||
|
return false;
|
||||||
|
if (filter.DatItem_AltName.MatchesNegativeSet(AltName) == true)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Filter on alt title
|
||||||
|
if (filter.DatItem_AltTitle.MatchesPositiveSet(AltTitle) == false)
|
||||||
|
return false;
|
||||||
|
if (filter.DatItem_AltTitle.MatchesNegativeSet(AltTitle) == true)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region OpenMSX
|
#region OpenMSX
|
||||||
|
|
||||||
// Filter on original
|
// Filter on original
|
||||||
@@ -976,6 +1017,16 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region AttractMode
|
||||||
|
|
||||||
|
if (fields.Contains(Field.DatItem_AltName))
|
||||||
|
AltName = null;
|
||||||
|
|
||||||
|
if (fields.Contains(Field.DatItem_AltTitle))
|
||||||
|
AltTitle = null;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region OpenMSX
|
#region OpenMSX
|
||||||
|
|
||||||
if (fields.Contains(Field.DatItem_Original))
|
if (fields.Contains(Field.DatItem_Original))
|
||||||
@@ -1209,6 +1260,16 @@ namespace SabreTools.Library.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region AttractMode
|
||||||
|
|
||||||
|
if (fields.Contains(Field.DatItem_AltName))
|
||||||
|
AltName = newItem.AltName;
|
||||||
|
|
||||||
|
if (fields.Contains(Field.DatItem_AltTitle))
|
||||||
|
AltTitle = newItem.AltTitle;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region OpenMSX
|
#region OpenMSX
|
||||||
|
|
||||||
if (fields.Contains(Field.DatItem_Original))
|
if (fields.Contains(Field.DatItem_Original))
|
||||||
|
|||||||
@@ -70,16 +70,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Sample()
|
return new Sample()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using SabreTools.Library.Filtering;
|
using SabreTools.Library.Filtering;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using SabreTools.Library.Tools;
|
using SabreTools.Library.Tools;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace SabreTools.Library.DatItems
|
namespace SabreTools.Library.DatItems
|
||||||
{
|
{
|
||||||
@@ -102,17 +103,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Setting()
|
return new Setting()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Value = this.Value,
|
Value = this.Value,
|
||||||
Default = this.Default,
|
Default = this.Default,
|
||||||
Conditions = this.Conditions,
|
Conditions = this.Conditions,
|
||||||
|
|||||||
@@ -78,17 +78,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new SharedFeature()
|
return new SharedFeature()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Value = this.Value,
|
Value = this.Value,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,17 +78,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new Slot()
|
return new Slot()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
SlotOptions = this.SlotOptions,
|
SlotOptions = this.SlotOptions,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,17 +87,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new SlotOption()
|
return new SlotOption()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
DeviceName = this.DeviceName,
|
DeviceName = this.DeviceName,
|
||||||
Default = this.Default,
|
Default = this.Default,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -90,17 +90,14 @@ namespace SabreTools.Library.DatItems
|
|||||||
{
|
{
|
||||||
return new SoftwareList()
|
return new SoftwareList()
|
||||||
{
|
{
|
||||||
Name = this.Name,
|
|
||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|
||||||
|
Name = this.Name,
|
||||||
Status = this.Status,
|
Status = this.Status,
|
||||||
Filter = this.Filter,
|
Filter = this.Filter,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ namespace SabreTools.Library.DatItems
|
|||||||
ItemType = this.ItemType,
|
ItemType = this.ItemType,
|
||||||
DupeType = this.DupeType,
|
DupeType = this.DupeType,
|
||||||
|
|
||||||
AltName = this.AltName,
|
|
||||||
AltTitle = this.AltTitle,
|
|
||||||
|
|
||||||
Machine = this.Machine.Clone() as Machine,
|
Machine = this.Machine.Clone() as Machine,
|
||||||
Source = this.Source.Clone() as Source,
|
Source = this.Source.Clone() as Source,
|
||||||
Remove = this.Remove,
|
Remove = this.Remove,
|
||||||
|
|||||||
Reference in New Issue
Block a user