My New Year's resolution is to stop making commits like these
This commit is contained in:
14
Torch.API/ILogger.cs
Normal file
14
Torch.API/ILogger.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
public interface ILogger
|
||||
{
|
||||
void Write(string message);
|
||||
void WriteException(Exception e);
|
||||
}
|
||||
}
|
@@ -1,21 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using VRage.Collections;
|
||||
using VRage.Plugins;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
public interface IPluginManager
|
||||
public interface IPluginManager : IEnumerable<ITorchPlugin>
|
||||
{
|
||||
ListReader<IPlugin> Plugins { get; }
|
||||
|
||||
string[] GetPluginFolders();
|
||||
string GetPluginName(Type pluginType);
|
||||
void LoadAllPlugins();
|
||||
void LoadPlugin(IPlugin plugin);
|
||||
void LoadPluginFolder(string folderName);
|
||||
void ReloadAll();
|
||||
void ReloadPlugin(IPlugin plugin, bool forceNonPiston = false);
|
||||
bool UnblockDll(string fileName);
|
||||
void UnloadPlugin(IPlugin plugin);
|
||||
}
|
||||
}
|
@@ -11,8 +11,10 @@ namespace Torch.API
|
||||
event Action SessionLoaded;
|
||||
IMultiplayer Multiplayer { get; }
|
||||
IPluginManager Plugins { get; }
|
||||
void DoGameAction(Action action);
|
||||
Task DoGameActionAsync(Action action);
|
||||
ILogger Log { get; set; }
|
||||
void Invoke(Action action);
|
||||
void InvokeBlocking(Action action);
|
||||
Task InvokeAsync(Action action);
|
||||
string[] RunArgs { get; set; }
|
||||
void Start();
|
||||
void Stop();
|
||||
|
@@ -4,13 +4,18 @@ using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VRage.Plugins;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
public interface ITorchPlugin : IPlugin
|
||||
public interface ITorchPlugin
|
||||
{
|
||||
void Init(ITorchBase torch);
|
||||
void Reload();
|
||||
Guid Id { get; }
|
||||
Version Version { get; }
|
||||
string Name { get; }
|
||||
bool Enabled { get; set; }
|
||||
|
||||
void Init(ITorchBase torchBase);
|
||||
void Update();
|
||||
void Unload();
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PistonAPI
|
||||
namespace Torch.API
|
||||
{
|
||||
public class PluginAttribute : Attribute
|
||||
{
|
||||
|
@@ -53,6 +53,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ConnectionState.cs" />
|
||||
<Compile Include="IChatItem.cs" />
|
||||
<Compile Include="ILogger.cs" />
|
||||
<Compile Include="IMultiplayer.cs" />
|
||||
<Compile Include="IPlayer.cs" />
|
||||
<Compile Include="IPluginManager.cs" />
|
||||
|
Reference in New Issue
Block a user