2019-01-26 21:33:37 -05:00
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2020-01-15 19:43:52 -05:00
|
|
|
|
using System.Globalization;
|
2019-01-26 21:33:37 -05:00
|
|
|
|
|
|
|
|
|
namespace IW4MAdmin.Application.EventParsers
|
|
|
|
|
{
|
2019-02-02 20:40:37 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// generic implementation of the IEventParserConfiguration
|
|
|
|
|
/// allows script plugins to generate dynamic configurations
|
|
|
|
|
/// </summary>
|
|
|
|
|
sealed internal class DynamicEventParserConfiguration : IEventParserConfiguration
|
2019-01-26 21:33:37 -05:00
|
|
|
|
{
|
|
|
|
|
public string GameDirectory { get; set; }
|
2020-04-01 15:11:56 -04:00
|
|
|
|
public ParserRegex Say { get; set; }
|
|
|
|
|
public ParserRegex Join { get; set; }
|
|
|
|
|
public ParserRegex Quit { get; set; }
|
|
|
|
|
public ParserRegex Kill { get; set; }
|
|
|
|
|
public ParserRegex Damage { get; set; }
|
|
|
|
|
public ParserRegex Action { get; set; }
|
|
|
|
|
public ParserRegex Time { get; set; }
|
2020-01-15 19:43:52 -05:00
|
|
|
|
public NumberStyles GuidNumberStyle { get; set; } = NumberStyles.HexNumber;
|
2020-04-01 15:11:56 -04:00
|
|
|
|
|
|
|
|
|
public DynamicEventParserConfiguration(IParserRegexFactory parserRegexFactory)
|
|
|
|
|
{
|
|
|
|
|
Say = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Join = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Quit = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Kill = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Damage = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Action = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Time = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
}
|
2019-01-26 21:33:37 -05:00
|
|
|
|
}
|
|
|
|
|
}
|