Unstable 0.1400.1.0

This commit is contained in:
Markus Isberg
2021-05-20 16:12:54 +03:00
parent 92f0264af2
commit 5bc850cddb
181 changed files with 2475 additions and 1588 deletions
@@ -20,33 +20,5 @@ namespace Barotrauma
}
}
}
/// <summary>
/// Sends a message to all clients telling them that all upgrades on the submarine were reset.
/// </summary>
/// <remarks>
/// <param name="newUpgrades"/> is supposed to have a list of reloaded metadata but seeing as
/// this method is currently only used when switching submarines and that disables the repair NPC
/// until the next round so currently there's no need for it as we get the new values from the save
/// file anyways.
/// </remarks>
/// <see cref="UpgradeManager.ClientRead"/>
private void SendUpgradeResetMessage(Dictionary<string, int> newUpgrades)
{
foreach (Client c in GameMain.Server.ConnectedClients)
{
IWriteMessage outmsg = new WriteOnlyMessage();
outmsg.Write((byte)ServerPacketHeader.RESET_UPGRADES);
outmsg.Write(true);
outmsg.Write(Campaign.Money);
// outmsg.Write((uint)newUpgrades.Count);
// foreach (var (key, value) in newUpgrades)
// {
// outmsg.Write(key);
// outmsg.Write((byte)value);
// }
GameMain.Server?.ServerPeer?.Send(outmsg, c.Connection, DeliveryMethod.Reliable);
}
}
}
}