mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Filter Abstraction (#25)
* Add category, back filters by dictionary * Complete internal filter set * Fix AreaSize filter * Populate filter object the hard way * Manipulation flags should not be filters * None of them need to be public * Convert to partial helper method * Better method use * Field, not string; no dictionary * Add FilterTo method for later * More naming options (easier conversion) * Update README
This commit is contained in:
@@ -206,6 +206,32 @@ namespace SabreTools.Library.DatItems
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Machine category, if available
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string Category
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_machine == null)
|
||||
{
|
||||
_machine = new Machine();
|
||||
}
|
||||
|
||||
return _machine.Category;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_machine == null)
|
||||
{
|
||||
_machine = new Machine();
|
||||
}
|
||||
|
||||
_machine.Category = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Machine romof parent
|
||||
/// </summary>
|
||||
@@ -633,6 +659,9 @@ namespace SabreTools.Library.DatItems
|
||||
case Field.Publisher:
|
||||
fieldValue = this.Publisher;
|
||||
break;
|
||||
case Field.Category:
|
||||
fieldValue = this.Category;
|
||||
break;
|
||||
case Field.RomOf:
|
||||
fieldValue = this.RomOf;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user