Assorted bug fixes, remove dead Torch.Launcher project

This commit is contained in:
John Gross
2017-06-29 12:02:36 -07:00
parent 4b4a069adb
commit c220f899a3
43 changed files with 289 additions and 867 deletions

View File

@@ -8,11 +8,34 @@ namespace Torch.API
[Flags]
public enum ConnectionState
{
/// <summary>
/// Unknown state.
/// </summary>
Unknown,
/// <summary>
/// Connected to game.
/// </summary>
Connected = 1,
/// <summary>
/// Left the game.
/// </summary>
Left = 2,
/// <summary>
/// Disconnected from the game.
/// </summary>
Disconnected = 4,
/// <summary>
/// Kicked from the game.
/// </summary>
Kicked = 8,
/// <summary>
/// Banned from the game.
/// </summary>
Banned = 16,
}
}

View File

@@ -8,9 +8,24 @@ namespace Torch.API
{
public interface IChatMessage
{
/// <summary>
/// The time the message was created.
/// </summary>
DateTime Timestamp { get; }
/// <summary>
/// The SteamID of the message author.
/// </summary>
ulong SteamId { get; }
/// <summary>
/// The name of the message author.
/// </summary>
string Name { get; }
/// <summary>
/// The content of the message.
/// </summary>
string Message { get; }
}
}

View File

@@ -7,10 +7,24 @@ using VRage.Game.ModAPI;
namespace Torch.API
{
/// <summary>
/// Represents a player on the server.
/// </summary>
public interface IPlayer
{
/// <summary>
/// The name of the player.
/// </summary>
string Name { get; }
/// <summary>
/// The SteamID of the player.
/// </summary>
ulong SteamId { get; }
/// <summary>
/// The player's current connection state.
/// </summary>
ConnectionState State { get; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
//Needed so Torch can set the instance here without exposing anything bad to mods or creating a circular dependency.
[assembly: InternalsVisibleTo("Torch")]
namespace Torch.API.ModAPI
{
/// <summary>
/// Entry point for mods to access Torch.
/// </summary>
public static class TorchAPI
{
internal static ITorchBase Instance;
}
}

View File

@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Torch.API.ModAPI
{
/* TODO: this without causing a circular dependency
public static class TorchAPIGateway
{
public static Version Version => TorchBase.Instance.TorchVersion;
public static IMultiplayer Multiplayer => TorchBase.Instance.Multiplayer;
public static IPluginManager Plugins => TorchBase.Instance.Plugins;
}*/
}

View File

@@ -30,6 +30,7 @@
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\x64\Release\Torch.API.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="HavokWrapper, Version=1.0.6278.22649, Culture=neutral, processorArchitecture=AMD64">
@@ -168,10 +169,10 @@
<Compile Include="ITorchBase.cs" />
<Compile Include="Plugins\IWpfPlugin.cs" />
<Compile Include="ModAPI\Ingame\GridExtensions.cs" />
<Compile Include="ModAPI\TorchAPIGateway.cs" />
<Compile Include="Plugins\PluginAttribute.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServerState.cs" />
<Compile Include="ModAPI\TorchAPI.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />