mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Chip gets a promotion
This commit is contained in:
@@ -158,12 +158,6 @@ namespace SabreTools.Library.DatItems
|
||||
[JsonProperty("devicereferences", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlDeviceReference> DeviceReferences { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated chips
|
||||
/// </summary>
|
||||
[JsonProperty("chips", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<ListXmlChip> Chips { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated displays
|
||||
/// </summary>
|
||||
@@ -603,7 +597,6 @@ namespace SabreTools.Library.DatItems
|
||||
SourceFile = this.SourceFile,
|
||||
Runnable = this.Runnable,
|
||||
DeviceReferences = this.DeviceReferences,
|
||||
Chips = this.Chips,
|
||||
Displays = this.Displays,
|
||||
Sounds = this.Sounds,
|
||||
Conditions = this.Conditions,
|
||||
@@ -842,94 +835,6 @@ namespace SabreTools.Library.DatItems
|
||||
|
||||
#endregion
|
||||
|
||||
#region Chips
|
||||
|
||||
// Machine_DeviceReferences
|
||||
if (filter.Machine_Chips.MatchesNeutral(null, Chips?.Any() ?? null) == false)
|
||||
return false;
|
||||
|
||||
// Machine_Chip_Name
|
||||
if (Chips?.Any() == true)
|
||||
{
|
||||
bool anyPositive = false;
|
||||
bool anyNegative = false;
|
||||
|
||||
foreach (var chip in Chips)
|
||||
{
|
||||
if (filter.Machine_Chip_Name.MatchesPositiveSet(chip?.Name) != false)
|
||||
anyPositive = true;
|
||||
if (filter.Machine_Chip_Name.MatchesNegativeSet(chip?.Name) == true)
|
||||
anyNegative = true;
|
||||
}
|
||||
|
||||
if (!anyPositive)
|
||||
return false;
|
||||
if (anyNegative)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Machine_Chip_Tag
|
||||
if (Chips?.Any() == true)
|
||||
{
|
||||
bool anyPositive = false;
|
||||
bool anyNegative = false;
|
||||
|
||||
foreach (var chip in Chips)
|
||||
{
|
||||
if (filter.Machine_Chip_Tag.MatchesPositiveSet(chip?.Tag) != false)
|
||||
anyPositive = true;
|
||||
if (filter.Machine_Chip_Tag.MatchesNegativeSet(chip?.Tag) == true)
|
||||
anyNegative = true;
|
||||
}
|
||||
|
||||
if (!anyPositive)
|
||||
return false;
|
||||
if (anyNegative)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Machine_Chip_Type
|
||||
if (Chips?.Any() == true)
|
||||
{
|
||||
bool anyPositive = false;
|
||||
bool anyNegative = false;
|
||||
|
||||
foreach (var chip in Chips)
|
||||
{
|
||||
if (filter.Machine_Chip_Type.MatchesPositiveSet(chip?.Type) != false)
|
||||
anyPositive = true;
|
||||
if (filter.Machine_Chip_Type.MatchesNegativeSet(chip?.Type) == true)
|
||||
anyNegative = true;
|
||||
}
|
||||
|
||||
if (!anyPositive)
|
||||
return false;
|
||||
if (anyNegative)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Machine_Chip_Clock
|
||||
if (Chips?.Any() == true)
|
||||
{
|
||||
bool anyPositive = false;
|
||||
bool anyNegative = false;
|
||||
|
||||
foreach (var chip in Chips)
|
||||
{
|
||||
if (filter.Machine_Chip_Clock.MatchesPositiveSet(chip?.Clock) != false)
|
||||
anyPositive = true;
|
||||
if (filter.Machine_Chip_Clock.MatchesNegativeSet(chip?.Clock) == true)
|
||||
anyNegative = true;
|
||||
}
|
||||
|
||||
if (!anyPositive)
|
||||
return false;
|
||||
if (anyNegative)
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Displays
|
||||
|
||||
// Machine_Displays
|
||||
|
||||
Reference in New Issue
Block a user