Merge fixes
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Barotrauma
|
||||
|
||||
string[] filesToRemove = new string[]
|
||||
{
|
||||
"Barotrauma.dll", "Barotrauma.deps.json", "Barotrauma.pdb",
|
||||
"Barotrauma.dll", "Barotrauma.deps.json", "Barotrauma.pdb", "BarotraumaCore.dll", "BarotraumaCore.pdb",
|
||||
"System.Reflection.Metadata.dll", "System.Collections.Immutable.dll",
|
||||
"System.Runtime.CompilerServices.Unsafe.dll"
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Barotrauma
|
||||
WriteOnlyMessage message = new WriteOnlyMessage();
|
||||
message.WriteByte((byte)ClientPacketHeader.LUA_NET_MESSAGE);
|
||||
message.WriteByte((byte)LuaCsClientToServer.RequestAllIds);
|
||||
GameMain.Client.ClientPeer.Send(message, DeliveryMethod.ReliableOrdered);
|
||||
GameMain.Client.ClientPeer.Send(message, DeliveryMethod.Reliable);
|
||||
}
|
||||
|
||||
public void NetMessageReceived(IReadMessage netMessage, ServerPacketHeader header, Client client = null)
|
||||
@@ -82,7 +82,7 @@ namespace Barotrauma
|
||||
|
||||
message.WriteString(netMessageName);
|
||||
|
||||
Send(message, DeliveryMethod.ReliableOrdered);
|
||||
Send(message, DeliveryMethod.Reliable);
|
||||
}
|
||||
|
||||
public void Send(IWriteMessage netMessage, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable)
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace Barotrauma
|
||||
File.Move("Barotrauma.dll", "Temp/Original/Barotrauma.dll", true);
|
||||
File.Move("Barotrauma.deps.json", "Temp/Original/Barotrauma.deps.json", true);
|
||||
File.Move("Barotrauma.pdb", "Temp/Original/Barotrauma.pdb", true);
|
||||
File.Move("BarotraumaCore.dll", "Temp/Original/BarotraumaCore.dll", true);
|
||||
File.Move("BarotraumaCore.pdb", "Temp/Original/BarotraumaCore.pdb", true);
|
||||
|
||||
File.Move("System.Reflection.Metadata.dll", "Temp/Original/System.Reflection.Metadata.dll", true);
|
||||
File.Move("System.Collections.Immutable.dll", "Temp/Original/System.Collections.Immutable.dll", true);
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Barotrauma
|
||||
message.WriteUInt16(id);
|
||||
message.WriteString(name);
|
||||
|
||||
Send(message, null, DeliveryMethod.ReliableOrdered);
|
||||
Send(message, null, DeliveryMethod.Reliable);
|
||||
}
|
||||
|
||||
private void WriteAllIds(Client client)
|
||||
@@ -160,7 +160,7 @@ namespace Barotrauma
|
||||
message.WriteString(name);
|
||||
}
|
||||
|
||||
Send(message, client.Connection, DeliveryMethod.ReliableOrdered);
|
||||
Send(message, client.Connection, DeliveryMethod.Reliable);
|
||||
}
|
||||
|
||||
public void ClientWriteLobby(Client client) => GameMain.Server.ClientWriteLobby(client);
|
||||
@@ -185,11 +185,6 @@ namespace Barotrauma
|
||||
GameMain.Server.UpdateClientPermissions(client);
|
||||
}
|
||||
|
||||
public void RemovePendingClient(ServerPeer.PendingClient pendingClient, PeerDisconnectPacket peerDisconnectPacket)
|
||||
{
|
||||
GameMain.Server.ServerPeer.RemovePendingClient(pendingClient, peerDisconnectPacket);
|
||||
}
|
||||
|
||||
public int FileSenderMaxPacketsPerUpdate
|
||||
{
|
||||
get { return FileSender.FileTransferOut.MaxPacketsPerUpdate; }
|
||||
|
||||
@@ -17,5 +17,4 @@ RegisterBarotrauma("Character+TeamChangeEventData")
|
||||
RegisterBarotrauma("Networking.GameServer")
|
||||
|
||||
RegisterBarotrauma("Networking.ServerPeer")
|
||||
RegisterBarotrauma("Networking.ServerPeer+PendingClient")
|
||||
RegisterBarotrauma("Networking.FileSender")
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Barotrauma
|
||||
{
|
||||
private static string[] trackingFiles = new string[]
|
||||
{
|
||||
"Barotrauma.dll", "Barotrauma.deps.json", "Barotrauma.pdb",
|
||||
"Barotrauma.dll", "Barotrauma.deps.json", "Barotrauma.pdb", "BarotraumaCore.dll", "BarotraumaCore.pdb",
|
||||
"0Harmony.dll", "Mono.Cecil.dll",
|
||||
"Sigil.dll",
|
||||
"Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll",
|
||||
|
||||
@@ -172,11 +172,11 @@ namespace Barotrauma
|
||||
using (var file = File.Open(configFileName, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
XDocument document = XDocument.Load(file);
|
||||
Config.EnableCsScripting = bool.Parse(document.Root.Element("ForceCsScripting").Value);
|
||||
Config.TreatForcedModsAsNormal = bool.Parse(document.Root.Element("TreatForcedModsAsNormal").Value);
|
||||
Config.PreferToUseWorkshopLuaSetup = bool.Parse(document.Root.Element("PreferToUseWorkshopLuaSetup").Value);
|
||||
Config.DisableErrorGUIOverlay = bool.Parse(document.Root.Element("DisableErrorGUIOverlay").Value);
|
||||
Config.HideUserNames = bool.Parse(document.Root.Element("HideUserNames").Value);
|
||||
Config.EnableCsScripting = document.Root.GetAttributeBool("EnableCsScripting", Config.EnableCsScripting);
|
||||
Config.TreatForcedModsAsNormal = document.Root.GetAttributeBool("TreatForcedModsAsNormal", Config.TreatForcedModsAsNormal);
|
||||
Config.PreferToUseWorkshopLuaSetup = document.Root.GetAttributeBool("PreferToUseWorkshopLuaSetup", Config.PreferToUseWorkshopLuaSetup);
|
||||
Config.DisableErrorGUIOverlay = document.Root.GetAttributeBool("DisableErrorGUIOverlay", Config.DisableErrorGUIOverlay);
|
||||
Config.HideUserNames = document.Root.GetAttributeBool("HideUserNames", Config.HideUserNames);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -94,19 +94,21 @@ namespace Barotrauma
|
||||
{
|
||||
if (!LuaCsFile.IsPathAllowedException(destination)) { return; }
|
||||
|
||||
Steamworks.Ugc.Item? item = await SteamManager.Workshop.GetItem(id);
|
||||
Option<Steamworks.Ugc.Item> itemOption = await SteamManager.Workshop.GetItem(id);
|
||||
|
||||
if (item == null)
|
||||
if (itemOption.TryUnwrap(out Steamworks.Ugc.Item item))
|
||||
{
|
||||
DownloadWorkshopItemAsync(new WorkshopItemDownload()
|
||||
{
|
||||
Item = item,
|
||||
Destination = destination,
|
||||
Callback = callback
|
||||
}, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Tried to download invalid workshop item {id}.");
|
||||
}
|
||||
|
||||
DownloadWorkshopItemAsync(new WorkshopItemDownload()
|
||||
{
|
||||
Item = item.Value,
|
||||
Destination = destination,
|
||||
Callback = callback
|
||||
}, true);
|
||||
}
|
||||
|
||||
public void DownloadWorkshopItem(Steamworks.Ugc.Item item, string destination, LuaCsAction callback)
|
||||
@@ -121,8 +123,16 @@ namespace Barotrauma
|
||||
|
||||
public async void GetWorkshopItem(UInt64 id, LuaCsAction callback)
|
||||
{
|
||||
Steamworks.Ugc.Item? item = await SteamManager.Workshop.GetItem(id);
|
||||
callback(item);
|
||||
Option<Steamworks.Ugc.Item> itemOption = await SteamManager.Workshop.GetItem(id);
|
||||
|
||||
if (itemOption.TryUnwrap(out Steamworks.Ugc.Item item))
|
||||
{
|
||||
callback(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
|
||||
Reference in New Issue
Block a user