fix projects and compile errors
This commit is contained in:
@@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MoonSharp.Interpreter;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Barotrauma.Networking;
|
||||
|
||||
namespace Barotrauma.Networking
|
||||
{
|
||||
partial class Client
|
||||
{
|
||||
public static List<Client> ClientList
|
||||
public static IReadOnlyList<Client> ClientList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -20,6 +21,21 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
}
|
||||
|
||||
public ulong SteamID
|
||||
{
|
||||
get
|
||||
{
|
||||
if (AccountId.TryUnwrap(out AccountId outValue) && outValue is SteamId steamId)
|
||||
{
|
||||
return steamId.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,12 +25,11 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public bool? ForceVoice = null;
|
||||
public bool? ForceLocalVoice = null;
|
||||
|
||||
public bool Paused => GameMain.Instance?.Paused == true;
|
||||
public byte MyID => GameMain.Client.ID;
|
||||
public ChatMode ActiveChatMode => GameMain.ActiveChatMode;
|
||||
public byte SessionId => GameMain.Client.SessionId;
|
||||
public byte MyID => SessionId; // compatibility
|
||||
|
||||
public ChatMode ActiveChatMode => GameMain.ActiveChatMode;
|
||||
|
||||
public ChatBox ChatBox
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
@@ -142,12 +142,12 @@ namespace Barotrauma
|
||||
{
|
||||
var message = new WriteOnlyMessage();
|
||||
#if SERVER
|
||||
message.Write((byte)ServerPacketHeader.LUA_NET_MESSAGE);
|
||||
message.WriteByte((byte)ServerPacketHeader.LUA_NET_MESSAGE);
|
||||
#else
|
||||
message.Write((byte)ClientPacketHeader.LUA_NET_MESSAGE);
|
||||
message.WriteByte((byte)ClientPacketHeader.LUA_NET_MESSAGE);
|
||||
#endif
|
||||
message.Write(netMessageName);
|
||||
return ((IWriteMessage)message);
|
||||
message.WriteString(netMessageName);
|
||||
return message;
|
||||
}
|
||||
|
||||
public IWriteMessage Start()
|
||||
@@ -274,9 +274,9 @@ namespace Barotrauma
|
||||
GameMain.Server.UpdateClientPermissions(client);
|
||||
}
|
||||
|
||||
public void RemovePendingClient(ServerPeer.PendingClient pendingClient, DisconnectReason reason, string msg)
|
||||
public void RemovePendingClient(ServerPeer.PendingClient pendingClient, PeerDisconnectPacket peerDisconnectPacket)
|
||||
{
|
||||
GameMain.Server.ServerPeer.RemovePendingClient(pendingClient, reason, msg);
|
||||
GameMain.Server.ServerPeer.RemovePendingClient(pendingClient, peerDisconnectPacket);
|
||||
}
|
||||
|
||||
public int FileSenderMaxPacketsPerUpdate
|
||||
@@ -293,4 +293,4 @@ namespace Barotrauma
|
||||
set { GameMain.NetworkMember.LastClientListUpdateID = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Barotrauma
|
||||
#else
|
||||
//"C:/Users/*user*/AppData/Local/Daedalic Entertainment GmbH/" on Windows
|
||||
//"/home/*user*/.local/share/Daedalic Entertainment GmbH/" on Linux
|
||||
public static readonly string SaveFolder = Path.Combine(
|
||||
public static string SaveFolder = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
"Daedalic Entertainment GmbH",
|
||||
"Barotrauma");
|
||||
|
||||
Reference in New Issue
Block a user