1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

define new event types

This commit is contained in:
RaidMax
2023-02-11 21:03:35 -06:00
parent 36cca2f93b
commit 2b6720d4e2
36 changed files with 320 additions and 0 deletions

View File

@ -0,0 +1,9 @@
using System.Collections.Generic;
using SharedLibraryCore.Database.Models;
namespace SharedLibraryCore.Events.Server;
public class ClientDataUpdateEvent : GameServerEvent
{
public IReadOnlyCollection<EFClient> Clients { get; init; }
}

View File

@ -0,0 +1,6 @@
namespace SharedLibraryCore.Events.Server;
public class ConnectionInterruptEvent : GameServerEvent
{
}

View File

@ -0,0 +1,6 @@
namespace SharedLibraryCore.Events.Server;
public class ConnectionRestoreEvent : GameServerEvent
{
}

View File

@ -0,0 +1,8 @@
using SharedLibraryCore.Interfaces;
namespace SharedLibraryCore.Events.Server;
public abstract class GameServerEvent : CoreEvent
{
public IGameServer Server { get; init; }
}

View File

@ -0,0 +1,5 @@
namespace SharedLibraryCore.Events.Server;
public class MonitorStartEvent : GameServerEvent
{
}

View File

@ -0,0 +1,6 @@
namespace SharedLibraryCore.Events.Server;
public class MonitorStopEvent : GameServerEvent
{
}

View File

@ -0,0 +1,7 @@
namespace SharedLibraryCore.Events.Server;
public class ServerCommandExecuteEvent : GameServerEvent
{
public string Command { get; init; }
public string[] Output { get; init; }
}

View File

@ -0,0 +1,7 @@
namespace SharedLibraryCore.Events.Server;
public class ServerValueReceiveEvent : GameServerEvent
{
public Dvar<string> Response { get; init; }
public bool Success { get; init; }
}

View File

@ -0,0 +1,17 @@
using SharedLibraryCore.Interfaces;
namespace SharedLibraryCore.Events.Server;
public class ServerValueRequestEvent : GameServerEvent
{
public ServerValueRequestEvent(string valueName, IGameServer server)
{
ValueName = valueName;
Server = server;
}
public string ValueName { get; init; }
public int? DelayMs { get; init; }
public int? TimeoutMs { get; init; }
public string FallbackValue { get; init; }
}

View File

@ -0,0 +1,8 @@
namespace SharedLibraryCore.Events.Server;
public class ServerValueSetCompleteEvent : GameServerEvent
{
public bool Success { get; init; }
public string ValueName { get; init; }
public string Value { get; set; }
}

View File

@ -0,0 +1,18 @@
using SharedLibraryCore.Interfaces;
namespace SharedLibraryCore.Events.Server;
public class ServerValueSetRequestEvent : GameServerEvent
{
public ServerValueSetRequestEvent(string valueName, string value, IGameServer server)
{
ValueName = valueName;
Server = server;
Value = value;
}
public string ValueName { get; init; }
public string Value { get; init; }
public int? DelayMs { get; init; }
public int? TimeoutMs { get; init; }
}