Add custom sound theme support
This commit is contained in:
@@ -349,14 +349,20 @@ namespace Filtration.Parser.Services
|
||||
RemoveExistingBlockItemsOfType<SoundBlockItem>(block);
|
||||
RemoveExistingBlockItemsOfType<PositionalSoundBlockItem>(block);
|
||||
|
||||
var match = Regex.Match(trimmedLine, @"\S+\s+""(\S+)""");
|
||||
var match = Regex.Match(trimmedLine, @"\S+\s+""(\S+)""\s*([#]?)(.*)");
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
var blockItemValue = new CustomSoundBlockItem
|
||||
{
|
||||
Value = match.Groups[1].Value
|
||||
};
|
||||
};
|
||||
|
||||
if(match.Groups[2].Value == "#" && !string.IsNullOrWhiteSpace(match.Groups[3].Value))
|
||||
{
|
||||
ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.CustomSound, match.Groups[3].Value.Trim(), blockItemValue.Value);
|
||||
blockItemValue.ThemeComponent = themeComponent;
|
||||
}
|
||||
block.BlockItems.Add(blockItemValue);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user