Add GitHub plugin updater, refactor game update hook to TorchBase instead of PluginManager, fix world config not applying
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Torch.API
|
||||
event Action SessionLoaded;
|
||||
event Action SessionUnloading;
|
||||
event Action SessionUnloaded;
|
||||
ITorchConfig Config { get; }
|
||||
IMultiplayer Multiplayer { get; }
|
||||
IPluginManager Plugins { get; }
|
||||
Version TorchVersion { get; }
|
||||
@@ -28,9 +29,7 @@ namespace Torch.API
|
||||
|
||||
public interface ITorchServer : ITorchBase
|
||||
{
|
||||
bool IsRunning { get; }
|
||||
string InstancePath { get; }
|
||||
void Start(IMyConfigDedicated config);
|
||||
}
|
||||
|
||||
public interface ITorchClient : ITorchBase
|
||||
|
15
Torch.API/ITorchConfig.cs
Normal file
15
Torch.API/ITorchConfig.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Torch
|
||||
{
|
||||
public interface ITorchConfig
|
||||
{
|
||||
//bool AutoRestart { get; set; }
|
||||
//int Autosave { get; set; }
|
||||
string InstanceName { get; set; }
|
||||
string InstancePath { get; set; }
|
||||
//bool LogChat { get; set; }
|
||||
bool RedownloadPlugins { get; set; }
|
||||
bool EnableAutomaticUpdates { get; set; }
|
||||
|
||||
bool Save(string path = null);
|
||||
}
|
||||
}
|
16
Torch.API/ServerState.cs
Normal file
16
Torch.API/ServerState.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
public enum ServerState
|
||||
{
|
||||
Stopped,
|
||||
Starting,
|
||||
Running,
|
||||
Error
|
||||
}
|
||||
}
|
@@ -141,6 +141,7 @@
|
||||
<Compile Include="IChatMessage.cs" />
|
||||
<Compile Include="IMultiplayer.cs" />
|
||||
<Compile Include="IPluginManager.cs" />
|
||||
<Compile Include="ITorchConfig.cs" />
|
||||
<Compile Include="Plugins\ITorchPlugin.cs" />
|
||||
<Compile Include="IServerControls.cs" />
|
||||
<Compile Include="ITorchBase.cs" />
|
||||
@@ -149,6 +150,7 @@
|
||||
<Compile Include="ModAPI\TorchAPI.cs" />
|
||||
<Compile Include="Plugins\PluginAttribute.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServerState.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
Reference in New Issue
Block a user