Files
SabreTools/SabreTools.DatItems/Machine.cs

534 lines
18 KiB
C#
Raw Normal View History

2017-01-27 16:42:24 -08:00
using System;
2020-09-07 14:47:27 -07:00
using System.Xml.Serialization;
using Newtonsoft.Json;
2020-08-24 13:53:53 -07:00
using Newtonsoft.Json.Converters;
2023-08-14 15:12:26 -04:00
using SabreTools.Core;
using SabreTools.Core.Tools;
2020-12-08 15:15:41 -08:00
namespace SabreTools.DatItems
{
/// <summary>
/// Represents the information specific to a set/game/machine
/// </summary>
2020-09-08 10:12:41 -07:00
[JsonObject("machine"), XmlRoot("machine")]
public class Machine : ICloneable
{
2020-08-20 13:17:14 -07:00
#region Fields
2020-09-07 22:00:02 -07:00
#region Common
2020-08-20 14:36:36 -07:00
/// <summary>
/// Name of the machine
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Include)]
2020-09-07 22:00:02 -07:00
[XmlElement("name")]
2023-08-14 15:12:26 -04:00
public string? Name
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.NameKey);
set => _machine[Models.Metadata.Machine.NameKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Additional notes
/// </summary>
/// <remarks>Known as "Extra" in AttractMode</remarks>
2020-08-24 11:56:49 -07:00
[JsonProperty("comment", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("comment")]
2023-08-14 15:12:26 -04:00
public string? Comment
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.CommentKey);
set => _machine[Models.Metadata.Machine.CommentKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Extended description
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("description", DefaultValueHandling = DefaultValueHandling.Include)]
2020-09-07 14:47:27 -07:00
[XmlElement("description")]
2023-08-14 15:12:26 -04:00
public string? Description
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.DescriptionKey);
set => _machine[Models.Metadata.Machine.DescriptionKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Year(s) of release/manufacture
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("year", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("year")]
2023-08-14 15:12:26 -04:00
public string? Year
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.YearKey);
set => _machine[Models.Metadata.Machine.YearKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Manufacturer, if available
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("manufacturer", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("manufacturer")]
2023-08-14 15:12:26 -04:00
public string? Manufacturer
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.ManufacturerKey);
set => _machine[Models.Metadata.Machine.ManufacturerKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Publisher, if available
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("publisher", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("publisher")]
2023-08-14 15:12:26 -04:00
public string? Publisher
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.PublisherKey);
set => _machine[Models.Metadata.Machine.PublisherKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Category, if available
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("category", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("category")]
2023-08-14 15:12:26 -04:00
public string? Category
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.CategoryKey);
set => _machine[Models.Metadata.Machine.CategoryKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// fomof parent
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("romof", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 22:00:02 -07:00
[XmlElement("romof")]
2023-08-14 15:12:26 -04:00
public string? RomOf
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.RomOfKey);
set => _machine[Models.Metadata.Machine.RomOfKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// cloneof parent
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("cloneof", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 22:00:02 -07:00
[XmlElement("cloneof")]
2023-08-14 15:12:26 -04:00
public string? CloneOf
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.CloneOfKey);
set => _machine[Models.Metadata.Machine.CloneOfKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// sampleof parent
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("sampleof", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 22:00:02 -07:00
[XmlElement("sampleof")]
2023-08-14 15:12:26 -04:00
public string? SampleOf
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.SampleOfKey);
set => _machine[Models.Metadata.Machine.SampleOfKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
/// <summary>
/// Type of the machine
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-08-24 13:53:53 -07:00
[JsonConverter(typeof(StringEnumConverter))]
2020-09-07 22:00:02 -07:00
[XmlElement("type")]
2023-08-14 15:12:26 -04:00
public MachineType MachineType
{
get
{
2023-09-04 23:51:37 -04:00
bool? isBios = _machine.ReadBool(Models.Metadata.Machine.IsBiosKey);
bool? isDevice = _machine.ReadBool(Models.Metadata.Machine.IsDeviceKey);
bool? isMechanical = _machine.ReadBool(Models.Metadata.Machine.IsMechanicalKey);
2023-08-14 15:12:26 -04:00
MachineType machineType = MachineType.None;
if (isBios == true)
machineType |= MachineType.Bios;
if (isDevice == true)
machineType |= MachineType.Device;
if (isMechanical == true)
machineType |= MachineType.Mechanical;
return machineType;
}
set
{
if (value.HasFlag(MachineType.Bios))
2023-09-04 23:51:37 -04:00
_machine[Models.Metadata.Machine.IsBiosKey] = "yes";
2023-08-14 15:12:26 -04:00
if (value.HasFlag(MachineType.Device))
2023-09-04 23:51:37 -04:00
_machine[Models.Metadata.Machine.IsDeviceKey] = "yes";
2023-08-14 15:12:26 -04:00
if (value.HasFlag(MachineType.Mechanical))
2023-09-04 23:51:37 -04:00
_machine[Models.Metadata.Machine.IsMechanicalKey] = "yes";
2023-08-14 15:12:26 -04:00
}
}
2020-09-07 22:00:02 -07:00
[JsonIgnore]
2023-04-20 10:34:37 -04:00
public bool MachineTypeSpecified { get { return MachineType != 0x0 && MachineType != MachineType.None; } }
2020-09-07 22:00:02 -07:00
2020-08-20 14:36:36 -07:00
#endregion
2020-09-07 22:00:02 -07:00
#region AttractMode
2020-08-20 14:36:36 -07:00
/// <summary>
/// Player count
/// </summary>
2020-08-20 22:42:04 -07:00
/// <remarks>Also in Logiqx EmuArc</remarks>
2020-08-24 11:56:49 -07:00
[JsonProperty("players", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("players")]
2023-08-14 15:12:26 -04:00
public string? Players
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.PlayersKey);
set => _machine[Models.Metadata.Machine.PlayersKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
/// <summary>
/// Screen rotation
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("rotation", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("rotation")]
2023-08-14 15:12:26 -04:00
public string? Rotation
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.RotationKey);
set => _machine[Models.Metadata.Machine.RotationKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
/// <summary>
/// Control method
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("control", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("control")]
2023-08-14 15:12:26 -04:00
public string? Control
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.ControlKey);
set => _machine[Models.Metadata.Machine.ControlKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Support status
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("status", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("status")]
2023-08-14 15:12:26 -04:00
public string? Status
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.StatusKey);
set => _machine[Models.Metadata.Machine.StatusKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
2020-08-20 14:36:36 -07:00
/// Display count
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("displaycount", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("displaycount")]
2023-08-14 15:12:26 -04:00
public string? DisplayCount
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.DisplayCountKey);
set => _machine[Models.Metadata.Machine.DisplayCountKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
2020-08-20 14:36:36 -07:00
/// Display type
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("displaytype", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("displaytype")]
2023-08-14 15:12:26 -04:00
public string? DisplayType
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.DisplayTypeKey);
set => _machine[Models.Metadata.Machine.DisplayTypeKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
2020-08-20 14:36:36 -07:00
/// Number of input buttons
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("buttons", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("buttons")]
2023-08-14 15:12:26 -04:00
public string? Buttons
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.ButtonsKey);
set => _machine[Models.Metadata.Machine.ButtonsKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
#endregion
2020-09-07 22:00:02 -07:00
#region ListXML
2020-12-28 10:22:40 -08:00
/// <summary>
/// History.dat entry for the machine
/// </summary>
[JsonProperty("history", DefaultValueHandling = DefaultValueHandling.Ignore)]
[XmlElement("history")]
2023-08-14 15:12:26 -04:00
public string? History
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.HistoryKey);
set => _machine[Models.Metadata.Machine.HistoryKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-12-28 10:22:40 -08:00
/// <summary>
2020-08-20 14:36:36 -07:00
/// Emulator source file related to the machine
/// </summary>
/// <remarks>Also in Logiqx</remarks>
2020-08-24 11:56:49 -07:00
[JsonProperty("sourcefile", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 22:00:02 -07:00
[XmlElement("sourcefile")]
2023-08-14 15:12:26 -04:00
public string? SourceFile
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.SourceFileKey);
set => _machine[Models.Metadata.Machine.SourceFileKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
/// <summary>
/// Machine runnable status
/// </summary>
/// <remarks>Also in Logiqx</remarks>
2020-08-24 11:56:49 -07:00
[JsonProperty("runnable", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 22:00:02 -07:00
[XmlElement("runnable")]
2023-08-14 15:12:26 -04:00
public Runnable Runnable
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.RunnableKey).AsRunnable();
set => _machine[Models.Metadata.Machine.RunnableKey] = value.FromRunnable();
2023-08-14 15:12:26 -04:00
}
2020-09-07 22:00:02 -07:00
[JsonIgnore]
public bool RunnableSpecified { get { return Runnable != Runnable.NULL; } }
2020-08-20 14:36:36 -07:00
#endregion
2020-09-07 22:00:02 -07:00
#region Logiqx
2020-08-20 14:36:36 -07:00
/// <summary>
/// Machine board name
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("board", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 22:00:02 -07:00
[XmlElement("board")]
2023-08-14 15:12:26 -04:00
public string? Board
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.BoardKey);
set => _machine[Models.Metadata.Machine.BoardKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
/// <summary>
/// Rebuild location if different than machine name
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("rebuildto", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 22:00:02 -07:00
[XmlElement("rebuildto")]
2023-08-14 15:12:26 -04:00
public string? RebuildTo
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.RebuildToKey);
set => _machine[Models.Metadata.Machine.RebuildToKey] = value;
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
2023-03-26 21:47:17 -04:00
/// <summary>
/// No-Intro ID for the game
/// </summary>
[JsonProperty("nointroid", DefaultValueHandling = DefaultValueHandling.Ignore)]
[XmlElement("nointroid")]
2023-08-14 15:12:26 -04:00
public string? NoIntroId
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.IdKey);
set => _machine[Models.Metadata.Machine.IdKey] = value;
2023-08-14 15:12:26 -04:00
}
2023-03-26 21:47:17 -04:00
2023-04-03 11:57:06 -04:00
/// <summary>
/// No-Intro ID for the game
/// </summary>
[JsonProperty("nointrocloneofid", DefaultValueHandling = DefaultValueHandling.Ignore)]
[XmlElement("nointrocloneofid")]
2023-08-14 15:12:26 -04:00
public string? NoIntroCloneOfId
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.CloneOfIdKey);
set => _machine[Models.Metadata.Machine.CloneOfIdKey] = value;
2023-08-14 15:12:26 -04:00
}
2023-04-03 11:57:06 -04:00
2020-08-20 14:36:36 -07:00
#endregion
2020-08-24 22:25:47 -07:00
// TODO: Should this be a separate object for TruRip?
2020-09-07 22:00:02 -07:00
#region Logiqx EmuArc
2020-08-20 22:42:04 -07:00
/// <summary>
/// Title ID
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("titleid", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("titleid")]
public string? TitleID { get; set; } = null;
2020-08-20 22:42:04 -07:00
/// <summary>
/// Machine developer
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("developer", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("developer")]
public string? Developer { get; set; } = null;
2020-08-20 22:42:04 -07:00
/// <summary>
/// Game genre
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("genre", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("genre")]
public string? Genre { get; set; } = null;
2020-08-20 22:42:04 -07:00
/// <summary>
/// Game subgenre
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("subgenre", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("subgenre")]
public string? Subgenre { get; set; } = null;
2020-08-20 22:42:04 -07:00
/// <summary>
/// Game ratings
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("ratings", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("ratings")]
public string? Ratings { get; set; } = null;
2020-08-20 22:42:04 -07:00
/// <summary>
/// Game score
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("score", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("score")]
public string? Score { get; set; } = null;
2020-08-20 22:42:04 -07:00
/// <summary>
/// Is the machine enabled
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("enabled", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("enabled")]
public string? Enabled { get; set; } = null; // bool?
2020-08-20 22:42:04 -07:00
/// <summary>
/// Does the game have a CRC check
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("hascrc", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("hascrc")]
2020-08-25 22:13:49 -07:00
public bool? Crc { get; set; } = null;
2020-08-20 22:42:04 -07:00
2020-09-07 22:00:02 -07:00
[JsonIgnore]
public bool CrcSpecified { get { return Crc != null; } }
2020-08-20 22:42:04 -07:00
/// <summary>
/// Machine relations
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("relatedto", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("relatedto")]
public string? RelatedTo { get; set; } = null;
2020-08-20 22:42:04 -07:00
#endregion
2020-09-07 22:00:02 -07:00
#region OpenMSX
/// <summary>
/// Generation MSX ID
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("genmsxid", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("genmsxid")]
2023-08-14 15:12:26 -04:00
public string? GenMSXID
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.GenMSXIDKey);
set => _machine[Models.Metadata.Machine.GenMSXIDKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// MSX System
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("system", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("system")]
2023-08-14 15:12:26 -04:00
public string? System
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.SystemKey);
set => _machine[Models.Metadata.Machine.SystemKey] = value;
2023-08-14 15:12:26 -04:00
}
/// <summary>
/// Machine country of origin
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("country", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("country")]
2023-08-14 15:12:26 -04:00
public string? Country
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.CountryKey);
set => _machine[Models.Metadata.Machine.CountryKey] = value;
2023-08-14 15:12:26 -04:00
}
#endregion
2020-09-07 22:00:02 -07:00
#region SoftwareList
2020-08-20 14:36:36 -07:00
/// <summary>
/// Support status
/// </summary>
2020-08-24 11:56:49 -07:00
[JsonProperty("supported", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-09-07 14:47:27 -07:00
[XmlElement("supported")]
2023-08-14 15:12:26 -04:00
public Supported Supported
{
2023-09-04 23:51:37 -04:00
get => _machine.ReadString(Models.Metadata.Machine.SupportedKey).AsSupported();
set => _machine[Models.Metadata.Machine.SupportedKey] = value.FromSupported(verbose: true);
2023-08-14 15:12:26 -04:00
}
2020-08-20 14:36:36 -07:00
2020-09-07 14:47:27 -07:00
[JsonIgnore]
public bool SupportedSpecified { get { return Supported != Supported.NULL; } }
#endregion
2023-08-14 15:12:26 -04:00
/// <summary>
/// Internal Machine model
/// </summary>
[JsonIgnore]
2023-09-04 23:51:37 -04:00
private Models.Metadata.Machine _machine = new();
2023-08-14 15:12:26 -04:00
2020-09-07 22:00:02 -07:00
#endregion // Fields
#region Constructors
/// <summary>
/// Create a new Machine object
/// </summary>
public Machine()
{
}
/// <summary>
/// Create a new Machine object with the included information
/// </summary>
/// <param name="name">Name of the machine</param>
/// <param name="description">Description of the machine</param>
public Machine(string name, string description)
{
Name = name;
Description = description;
}
#endregion
#region Cloning methods
/// <summary>
/// Create a clone of the current machine
/// </summary>
/// <returns>New machine with the same values as the current one</returns>
public object Clone()
{
return new Machine()
{
#region Common
2023-09-04 23:51:37 -04:00
_machine = this._machine.Clone() as Models.Metadata.Machine ?? new Models.Metadata.Machine(),
2020-08-20 14:36:36 -07:00
#endregion
2020-08-20 22:42:04 -07:00
#region Logiqx EmuArc
TitleID = this.TitleID,
Developer = this.Developer,
Genre = this.Genre,
Subgenre = this.Subgenre,
Ratings = this.Ratings,
Score = this.Score,
Enabled = this.Enabled,
2020-08-25 22:13:49 -07:00
Crc = this.Crc,
2020-08-20 22:42:04 -07:00
RelatedTo = this.RelatedTo,
#endregion
};
}
#endregion
}
}