Create a nil value type for DisableDropSound. (#114)
This commit is contained in:
@@ -327,7 +327,7 @@ namespace Filtration.Parser.Services
|
||||
// Only ever use the last DisableDropSound item encountered as multiples aren't valid.
|
||||
RemoveExistingBlockItemsOfType<DisableDropSoundBlockItem>(block);
|
||||
|
||||
AddBooleanItemToBlockItems<DisableDropSoundBlockItem>(block, trimmedLine);
|
||||
AddNilItemToBlockItems<DisableDropSoundBlockItem>(block, trimmedLine);
|
||||
break;
|
||||
}
|
||||
case "MinimapIcon":
|
||||
@@ -512,6 +512,13 @@ namespace Filtration.Parser.Services
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddNilItemToBlockItems<T>(IItemFilterBlock block, string inputString) where T : NilBlockItem
|
||||
{
|
||||
var blockItem = Activator.CreateInstance<T>();
|
||||
blockItem.Comment = GetTextAfterFirstComment(inputString);
|
||||
block.BlockItems.Add(blockItem);
|
||||
}
|
||||
|
||||
private static void AddNumericFilterPredicateItemToBlockItems<T>(IItemFilterBlock block, string inputString) where T : NumericFilterPredicateBlockItem
|
||||
{
|
||||
var blockItem = Activator.CreateInstance<T>();
|
||||
|
||||
Reference in New Issue
Block a user