mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
add ability to register custom event generators for event parsers / truncate long client names fix
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using static SharedLibraryCore.Server;
|
||||
using System;
|
||||
using static SharedLibraryCore.Server;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
@ -33,8 +34,16 @@ namespace SharedLibraryCore.Interfaces
|
||||
string URLProtocolFormat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the text name of the game the parser is for
|
||||
/// specifies the text name of the game the parser is for
|
||||
/// </summary>
|
||||
string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// registers a custom event subtype to be triggered when a value is detected
|
||||
/// </summary>
|
||||
/// <param name="eventSubtype">subtype assigned to the event when generated</param>
|
||||
/// <param name="eventTriggerValue">event keyword to trigger an event generation</param>
|
||||
/// <param name="eventModifier">function pointer that modifies the generated game event</param>
|
||||
void RegisterCustomEvent(string eventSubtype, string eventTriggerValue, Func<string, IEventParserConfiguration, GameEvent, GameEvent> eventModifier);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Globalization;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
|
19
SharedLibraryCore/Interfaces/IRegisterEvent.cs
Normal file
19
SharedLibraryCore/Interfaces/IRegisterEvent.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// interface defining the capabilities of a custom event registration
|
||||
/// </summary>
|
||||
public interface IRegisterEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// collection of custom event registrations
|
||||
/// <remarks>
|
||||
/// (Subtype, trigger value, event generator)
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
IEnumerable<(string, string, Func<string, IEventParserConfiguration, GameEvent, GameEvent>)> Events { get; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user