Add temporary block type for new type

This commit is contained in:
azakhi
2018-08-21 17:03:42 +03:00
parent 780081263c
commit c0e9c534de
20 changed files with 250 additions and 5 deletions

View File

@@ -297,6 +297,23 @@ namespace Filtration.Parser.Services
AddBooleanItemToBlockItems<DisableDropSoundBlockItem>(block, trimmedLine);
break;
}
case "Icon":
{
// Only ever use the last PlayAlertSound item encountered as multiples aren't valid.
RemoveExistingBlockItemsOfType<IconBlockItem>(block);
var match = Regex.Match(trimmedLine, @"\S+\s+(\S+)");
if (match.Success)
{
var blockItemValue = new IconBlockItem
{
Value = match.Groups[1].Value,
};
block.BlockItems.Add(blockItemValue);
}
break;
}
}
}