1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-09 23:00:57 -05:00

initial framework for gsc + iw4madmin integration

improvements to script plugin capabilities and error feedback
This commit is contained in:
RaidMax
2022-02-07 18:43:36 -06:00
parent 04b5bd0e73
commit 3001a92a78
16 changed files with 820 additions and 163 deletions

View File

@ -10,7 +10,7 @@ namespace SharedLibraryCore.Interfaces
bool IsParser => false;
Task OnLoadAsync(IManager manager);
Task OnUnloadAsync();
Task OnEventAsync(GameEvent E, Server S);
Task OnEventAsync(GameEvent gameEvent, Server server);
Task OnTickAsync(Server S);
}
}

View File

@ -18,6 +18,6 @@ namespace SharedLibraryCore.Interfaces
/// discovers the script plugins
/// </summary>
/// <returns>initialized script plugin collection</returns>
IEnumerable<IPlugin> DiscoverScriptPlugins();
IEnumerable<IPlugin> DiscoverScriptPlugins(IServiceProvider serviceProvider);
}
}
}

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace SharedLibraryCore.Interfaces
{
@ -18,8 +19,10 @@ namespace SharedLibraryCore.Interfaces
/// <param name="isTargetRequired">target required or not</param>
/// <param name="args">command arguments (name, is required)</param>
/// <param name="executeAction">action to peform when commmand is executed</param>
/// <param name="supportedGames"></param>
/// <returns></returns>
IManagerCommand CreateScriptCommand(string name, string alias, string description, string permission,
bool isTargetRequired, IEnumerable<(string, bool)> args, Action<GameEvent> executeAction);
bool isTargetRequired, IEnumerable<(string, bool)> args, Func<GameEvent, Task> executeAction,
Server.Game[] supportedGames);
}
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Threading;
namespace SharedLibraryCore.Interfaces;
public interface IScriptPluginTimerHelper
{
void Start(int delay, int interval);
void Start(int interval);
void Start();
void Stop();
void OnTick(Delegate action, string actionName);
bool IsRunning { get; }
void SetDependency(SemaphoreSlim dependentSemaphore);
}