mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Promote Sound
This commit is contained in:
@@ -158,12 +158,6 @@ namespace SabreTools.Library.DatItems
|
||||
[JsonProperty("displays", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<Display> Displays { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated sounds
|
||||
/// </summary>
|
||||
[JsonProperty("sounds", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public List<Sound> Sounds { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of associated conditions
|
||||
/// </summary>
|
||||
@@ -553,7 +547,6 @@ namespace SabreTools.Library.DatItems
|
||||
SourceFile = this.SourceFile,
|
||||
Runnable = this.Runnable,
|
||||
Displays = this.Displays,
|
||||
Sounds = this.Sounds,
|
||||
Conditions = this.Conditions,
|
||||
Inputs = this.Inputs,
|
||||
Ports = this.Ports,
|
||||
@@ -1039,34 +1032,6 @@ namespace SabreTools.Library.DatItems
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sounds
|
||||
|
||||
// Machine_Sounds
|
||||
if (filter.Machine_Sounds.MatchesNeutral(null, Sounds?.Any() ?? null) == false)
|
||||
return false;
|
||||
|
||||
// Machine_Sound_Channels
|
||||
if (Sounds?.Any() == true)
|
||||
{
|
||||
bool anyPositive = false;
|
||||
bool anyNegative = false;
|
||||
|
||||
foreach (var sound in Sounds)
|
||||
{
|
||||
if (filter.Machine_Sound_Channels.MatchesPositiveSet(sound?.Channels) != false)
|
||||
anyPositive = true;
|
||||
if (filter.Machine_Sound_Channels.MatchesNegativeSet(sound?.Channels) == true)
|
||||
anyNegative = true;
|
||||
}
|
||||
|
||||
if (!anyPositive)
|
||||
return false;
|
||||
if (anyNegative)
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Conditions
|
||||
|
||||
// Machine_Conditions
|
||||
|
||||
Reference in New Issue
Block a user