Tweak plugin init, fix issue in mod config

This commit is contained in:
John Gross
2017-06-17 13:06:21 -07:00
parent 2723973673
commit e36f54a55b
10 changed files with 48 additions and 31 deletions

View File

@@ -9,18 +9,29 @@ namespace Torch.API.Plugins
{
public interface ITorchPlugin : IDisposable
{
/// <summary>
/// A unique ID for the plugin.
/// </summary>
Guid Id { get; }
/// <summary>
/// The version of the plugin.
/// </summary>
Version Version { get; }
/// <summary>
/// The name of the plugin.
/// </summary>
string Name { get; }
/// <summary>
/// Called when the game is initialized.
/// This is called before the game loop is started.
/// </summary>
/// <param name="torchBase"></param>
/// <param name="torchBase">Torch instance</param>
void Init(ITorchBase torchBase);
/// <summary>
/// Called after each game tick. Not thread safe, use invocation methods in <see cref="ITorchBase"/>.
/// This is called on the game thread after each tick.
/// </summary>
void Update();
}

View File

@@ -11,7 +11,7 @@ namespace Torch.API.Plugins
{
/// <summary>
/// Used by the server's WPF interface to load custom plugin controls.
/// Do not instantiate your plugin control outside of this method! It will throw an exception.
/// You must instantiate your plugin's control object here, otherwise it will not be owned by the correct thread for WPF.
/// </summary>
UserControl GetControl();
}