Assorted bug fixes, remove dead Torch.Launcher project
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
20
Torch.API/ModAPI/TorchAPI.cs
Normal file
20
Torch.API/ModAPI/TorchAPI.cs
Normal 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;
|
||||
}
|
||||
}
|
@@ -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;
|
||||
}*/
|
||||
}
|
@@ -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" />
|
||||
|
Reference in New Issue
Block a user