Add automatic versioning and server configuration XML in preparation for services

This commit is contained in:
John Gross
2017-02-05 08:26:48 -08:00
parent fa63f3d811
commit d5159dc72a
33 changed files with 501 additions and 216 deletions

View File

@@ -9,6 +9,6 @@ namespace Torch.API
{
void UpdatePlugins();
void Init();
void UnloadPlugins();
void DisposePlugins();
}
}

View File

@@ -8,10 +8,13 @@ namespace Torch.API
{
public interface ITorchBase
{
event Action SessionLoading;
event Action SessionLoaded;
event Action SessionUnloading;
event Action SessionUnloaded;
IMultiplayer Multiplayer { get; }
IPluginManager Plugins { get; }
Version Version { get; }
Version TorchVersion { get; }
void Invoke(Action action);
void InvokeBlocking(Action action);
Task InvokeAsync(Action action);

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace Torch.API
{
public interface ITorchPlugin
public interface ITorchPlugin : IDisposable
{
Guid Id { get; }
Version Version { get; }
@@ -23,10 +23,5 @@ namespace Torch.API
/// Called after each game tick. Not thread safe, use invocation methods in <see cref="ITorchBase"/>.
/// </summary>
void Update();
/// <summary>
/// Called when the game exits.
/// </summary>
void Unload();
}
}