First test build
This commit is contained in:
@@ -6,10 +6,11 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
public interface IChatItem
|
||||
public interface IChatMessage
|
||||
{
|
||||
IPlayer Player { get; }
|
||||
DateTime Timestamp { get; }
|
||||
ulong SteamId { get; }
|
||||
string Name { get; }
|
||||
string Message { get; }
|
||||
DateTime Time { get; }
|
||||
}
|
||||
}
|
@@ -6,17 +6,18 @@ using VRage.Game.ModAPI;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
public delegate void MessageReceivedDel(IChatMessage message, ref bool sendToOthers);
|
||||
|
||||
public interface IMultiplayer
|
||||
{
|
||||
event Action<IPlayer> PlayerJoined;
|
||||
event Action<IPlayer> PlayerLeft;
|
||||
event Action<IChatItem> MessageReceived;
|
||||
Dictionary<ulong, IPlayer> Players { get; }
|
||||
List<IChatItem> Chat { get; }
|
||||
event Action<ulong> PlayerJoined;
|
||||
event Action<ulong, ConnectionState> PlayerLeft;
|
||||
event MessageReceivedDel MessageReceived;
|
||||
void SendMessage(string message, string author = "Server", long playerId = 0, string font = MyFontEnum.Blue);
|
||||
void KickPlayer(ulong id);
|
||||
void BanPlayer(ulong id, bool banned = true);
|
||||
void KickPlayer(ulong steamId);
|
||||
void BanPlayer(ulong steamId, bool banned = true);
|
||||
IMyPlayer GetPlayerBySteamId(ulong id);
|
||||
IMyPlayer GetPlayerByName(string name);
|
||||
MTObservableCollection<IChatMessage> ChatHistory { get; }
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
public interface IPlayer
|
||||
{
|
||||
ulong SteamId { get; }
|
||||
List<ulong> IdentityIds { get; }
|
||||
string Name { get; }
|
||||
ConnectionState State { get; }
|
||||
DateTime LastConnected { get; }
|
||||
void SetConnectionState(ConnectionState state);
|
||||
}
|
||||
}
|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VRage.Game.ModAPI;
|
||||
|
||||
namespace Torch.API
|
||||
{
|
||||
@@ -19,6 +20,7 @@ namespace Torch.API
|
||||
void InvokeBlocking(Action action);
|
||||
Task InvokeAsync(Action action);
|
||||
string[] RunArgs { get; set; }
|
||||
bool IsOnGameThread();
|
||||
void Start();
|
||||
void Stop();
|
||||
void Init();
|
||||
@@ -28,6 +30,7 @@ namespace Torch.API
|
||||
{
|
||||
bool IsRunning { get; }
|
||||
string InstancePath { get; }
|
||||
void Start(IMyConfigDedicated config);
|
||||
}
|
||||
|
||||
public interface ITorchClient : ITorchBase
|
||||
|
@@ -69,6 +69,9 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Torch">
|
||||
<HintPath>..\Torch.Server\bin\x64\Release\Torch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="VRage">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
@@ -111,9 +114,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ConnectionState.cs" />
|
||||
<Compile Include="IChatItem.cs" />
|
||||
<Compile Include="IChatMessage.cs" />
|
||||
<Compile Include="IMultiplayer.cs" />
|
||||
<Compile Include="IPlayer.cs" />
|
||||
<Compile Include="IPluginManager.cs" />
|
||||
<Compile Include="ITorchPlugin.cs" />
|
||||
<Compile Include="IServerControls.cs" />
|
||||
|
Reference in New Issue
Block a user