mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
63 lines
1.5 KiB
C#
63 lines
1.5 KiB
C#
namespace SabreTools.Library.DatItems
|
|
{
|
|
/// <summary>
|
|
/// Represents generic archive files to be included in a set
|
|
/// </summary>
|
|
public class Archive : DatItem
|
|
{
|
|
#region Constructors
|
|
|
|
/// <summary>
|
|
/// Create a default, empty Archive object
|
|
/// </summary>
|
|
public Archive()
|
|
{
|
|
Name = string.Empty;
|
|
ItemType = ItemType.Archive;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Cloning Methods
|
|
|
|
public override object Clone()
|
|
{
|
|
return new Archive()
|
|
{
|
|
Name = this.Name,
|
|
ItemType = this.ItemType,
|
|
DupeType = this.DupeType,
|
|
|
|
PartName = this.PartName,
|
|
PartInterface = this.PartInterface,
|
|
Features = this.Features,
|
|
AreaName = this.AreaName,
|
|
AreaSize = this.AreaSize,
|
|
|
|
Machine = this.Machine.Clone() as Machine,
|
|
Source = this.Source.Clone() as Source,
|
|
Remove = this.Remove,
|
|
};
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Comparision Methods
|
|
|
|
public override bool Equals(DatItem other)
|
|
{
|
|
// If we don't have an archive, return false
|
|
if (ItemType != other.ItemType)
|
|
return false;
|
|
|
|
// Otherwise, treat it as an archive
|
|
Archive newOther = other as Archive;
|
|
|
|
// If the archive information matches
|
|
return (Name == newOther.Name);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|