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:
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
15
SharedLibraryCore/Interfaces/IScriptPluginTimerHelper.cs
Normal file
15
SharedLibraryCore/Interfaces/IScriptPluginTimerHelper.cs
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user