mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add 4 missing fields to Archive
This commit is contained in:
@@ -601,6 +601,10 @@ namespace SabreTools.Core
|
||||
Clone,
|
||||
RegParent,
|
||||
Languages,
|
||||
DevStatus,
|
||||
Physical,
|
||||
Complete,
|
||||
Categories,
|
||||
|
||||
// BiosSet
|
||||
Description,
|
||||
|
||||
@@ -549,6 +549,19 @@ namespace SabreTools.Core.Tools
|
||||
case "languages":
|
||||
return DatItemField.Languages;
|
||||
|
||||
case "devstatus":
|
||||
case "dev_status":
|
||||
return DatItemField.DevStatus;
|
||||
|
||||
case "physical":
|
||||
return DatItemField.Physical;
|
||||
|
||||
case "complete":
|
||||
return DatItemField.Complete;
|
||||
|
||||
case "categories":
|
||||
return DatItemField.Categories;
|
||||
|
||||
// BiosSet
|
||||
case "description":
|
||||
case "biosdescription":
|
||||
|
||||
@@ -480,6 +480,18 @@ namespace SabreTools.DatFiles
|
||||
|
||||
if (DatItemMappings.Keys.Contains(DatItemField.Languages))
|
||||
archive.Languages = DatItemMappings[DatItemField.Languages];
|
||||
|
||||
if (DatItemMappings.Keys.Contains(DatItemField.DevStatus))
|
||||
archive.DevStatus = DatItemMappings[DatItemField.DevStatus];
|
||||
|
||||
if (DatItemMappings.Keys.Contains(DatItemField.Physical))
|
||||
archive.Physical = DatItemMappings[DatItemField.Physical];
|
||||
|
||||
if (DatItemMappings.Keys.Contains(DatItemField.Complete))
|
||||
archive.Complete = DatItemMappings[DatItemField.Complete];
|
||||
|
||||
if (DatItemMappings.Keys.Contains(DatItemField.Categories))
|
||||
archive.Categories = DatItemMappings[DatItemField.Categories];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -26,33 +26,63 @@ namespace SabreTools.DatItems.Formats
|
||||
public string Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Clone
|
||||
/// Clone value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
[JsonProperty("clone"), XmlElement("clone")]
|
||||
public string CloneValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Regional parent
|
||||
/// Regional parent value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
[JsonProperty("regparent"), XmlElement("regparent")]
|
||||
public string RegParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Region
|
||||
/// Region value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
[JsonProperty("region"), XmlElement("region")]
|
||||
public string Region { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Region
|
||||
/// Languages value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
[JsonProperty("languages"), XmlElement("languages")]
|
||||
public string Languages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Development status value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
[JsonProperty("devstatus"), XmlElement("devstatus")]
|
||||
public string DevStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Physical value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
/// <remarks>TODO: Is this numeric or a flag?</remarks>
|
||||
[JsonProperty("physical"), XmlElement("physical")]
|
||||
public string Physical { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Complete value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
/// <remarks>TODO: Is this numeric or a flag?</remarks>
|
||||
[JsonProperty("complete"), XmlElement("complete")]
|
||||
public string Complete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Categories value
|
||||
/// </summary>
|
||||
/// <remarks>No-Intro database export only</remarks>
|
||||
[JsonProperty("categories"), XmlElement("categories")]
|
||||
public string Categories { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Accessors
|
||||
@@ -97,6 +127,10 @@ namespace SabreTools.DatItems.Formats
|
||||
RegParent = this.RegParent,
|
||||
Region = this.Region,
|
||||
Languages = this.Languages,
|
||||
DevStatus = this.DevStatus,
|
||||
Physical = this.Physical,
|
||||
Complete = this.Complete,
|
||||
Categories = this.Categories,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -120,7 +154,11 @@ namespace SabreTools.DatItems.Formats
|
||||
&& CloneValue == newOther.CloneValue
|
||||
&& RegParent == newOther.RegParent
|
||||
&& Region == newOther.Region
|
||||
&& Languages == newOther.Languages);
|
||||
&& Languages == newOther.Languages
|
||||
&& DevStatus == newOther.DevStatus
|
||||
&& Physical == newOther.Physical
|
||||
&& Complete == newOther.Complete
|
||||
&& Categories == newOther.Categories);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -88,6 +88,10 @@ namespace SabreTools.Filtering
|
||||
public FilterItem<string> Clone { get; private set; } = new FilterItem<string>();
|
||||
public FilterItem<string> RegParent { get; private set; } = new FilterItem<string>();
|
||||
public FilterItem<string> Languages { get; private set; } = new FilterItem<string>();
|
||||
public FilterItem<string> DevStatus { get; private set; } = new FilterItem<string>();
|
||||
public FilterItem<string> Physical { get; private set; } = new FilterItem<string>();
|
||||
public FilterItem<string> Complete { get; private set; } = new FilterItem<string>();
|
||||
public FilterItem<string> Categories { get; private set; } = new FilterItem<string>();
|
||||
|
||||
// BiosSet
|
||||
public FilterItem<string> Description { get; private set; } = new FilterItem<string>();
|
||||
@@ -457,6 +461,22 @@ namespace SabreTools.Filtering
|
||||
SetStringFilter(Languages, value, negate);
|
||||
break;
|
||||
|
||||
case DatItemField.DevStatus:
|
||||
SetStringFilter(DevStatus, value, negate);
|
||||
break;
|
||||
|
||||
case DatItemField.Physical:
|
||||
SetStringFilter(Physical, value, negate);
|
||||
break;
|
||||
|
||||
case DatItemField.Complete:
|
||||
SetStringFilter(Complete, value, negate);
|
||||
break;
|
||||
|
||||
case DatItemField.Categories:
|
||||
SetStringFilter(Categories, value, negate);
|
||||
break;
|
||||
|
||||
// BiosSet
|
||||
case DatItemField.Description:
|
||||
SetStringFilter(Description, value, negate);
|
||||
@@ -985,6 +1005,22 @@ namespace SabreTools.Filtering
|
||||
if (!PassStringFilter(Languages, archive.Languages))
|
||||
return false;
|
||||
|
||||
// Filter on dev status
|
||||
if (!PassStringFilter(DevStatus, archive.DevStatus))
|
||||
return false;
|
||||
|
||||
// Filter on physical
|
||||
if (!PassStringFilter(Physical, archive.Physical))
|
||||
return false;
|
||||
|
||||
// Filter on complete
|
||||
if (!PassStringFilter(Complete, archive.Complete))
|
||||
return false;
|
||||
|
||||
// Filter on categories
|
||||
if (!PassStringFilter(Categories, archive.Categories))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -321,6 +321,18 @@ namespace SabreTools.Filtering
|
||||
|
||||
if (DatItemFields.Contains(DatItemField.Languages))
|
||||
archive.Languages = null;
|
||||
|
||||
if (DatItemFields.Contains(DatItemField.DevStatus))
|
||||
archive.DevStatus = null;
|
||||
|
||||
if (DatItemFields.Contains(DatItemField.Physical))
|
||||
archive.Physical = null;
|
||||
|
||||
if (DatItemFields.Contains(DatItemField.Complete))
|
||||
archive.Complete = null;
|
||||
|
||||
if (DatItemFields.Contains(DatItemField.Categories))
|
||||
archive.Categories = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -277,6 +277,18 @@ namespace SabreTools.Filtering
|
||||
|
||||
if (datItemFields.Contains(DatItemField.Languages))
|
||||
archive.Languages = newItem.Languages;
|
||||
|
||||
if (datItemFields.Contains(DatItemField.DevStatus))
|
||||
archive.DevStatus = newItem.DevStatus;
|
||||
|
||||
if (datItemFields.Contains(DatItemField.Physical))
|
||||
archive.Physical = newItem.Physical;
|
||||
|
||||
if (datItemFields.Contains(DatItemField.Complete))
|
||||
archive.Complete = newItem.Complete;
|
||||
|
||||
if (datItemFields.Contains(DatItemField.Categories))
|
||||
archive.Categories = newItem.Categories;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user