a75a560...814f6c9

commit 814f6c9dd4d48b3931e1d3bcb1918ff79324c1d4
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Wed Mar 20 19:33:18 2019 +0200

    Fixed multiplayer campaign setup UI showing the client's subs instead of the server's (see #1311)

commit 4a3e485dea85aa21037b13fd1b86af4a4ec1a5fd
Author: itchyOwl <lauri.harkanen@gmail.com>
Date:   Wed Mar 20 19:16:17 2019 +0200

    Move new texts in the end of the localization file.

commit 5a8af99afe5aad0b2f5343ca6f923d8c7eb19e68
Author: itchyOwl <lauri.harkanen@gmail.com>
Date:   Wed Mar 20 19:05:43 2019 +0200

    Recreate the editing gui window when resetting the entities with the "resetall" command.

commit 0048e6dcb9699e5b1e434ace867bc8f426cdae28
Author: itchyOwl <lauri.harkanen@gmail.com>
Date:   Wed Mar 20 19:04:42 2019 +0200

    Fix resetting to prefab.

commit 88be0923761f5ac2c895364c8ad0e11fe9a66576
Author: itchyOwl <lauri.harkanen@gmail.com>
Date:   Wed Mar 20 18:40:13 2019 +0200

    Fix item components not being loaded properly.

commit 6f970d54ed800eff25ae3643b03c0020336c8621
Author: itchyOwl <lauri.harkanen@gmail.com>
Date:   Wed Mar 20 18:21:25 2019 +0200

    Add a console command for resetting all items and structures to the prefabs.

commit bd561ef43391a2e4251bef18a8738b233f540961
Merge: e8843c30c a75a56088
Author: itchyOwl <lauri.harkanen@gmail.com>
Date:   Wed Mar 20 17:47:14 2019 +0200

    Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev

commit e8843c30cdb966832236ec361494e4c886130590
Author: itchyOwl <lauri.harkanen@gmail.com>
Date:   Wed Mar 20 17:46:38 2019 +0200

    Implement item and structure instance resetting to prefab. Add buttons in the subeditor. Allow to save the msg text in the editor.
This commit is contained in:
Joonas Rikkonen
2019-03-20 19:34:53 +02:00
parent 579e7f9abc
commit c78546b5f4
14 changed files with 187 additions and 170 deletions
@@ -40,6 +40,8 @@ namespace Barotrauma.Networking
private List<Client> otherClients;
private readonly List<Submarine> serverSubmarines = new List<Submarine>();
private string serverIP;
private bool needAuth;
@@ -779,7 +781,7 @@ namespace Barotrauma.Networking
saveFiles.Add(inc.ReadString());
}
GameMain.NetLobbyScreen.CampaignSetupUI = MultiPlayerCampaign.StartCampaignSetup(saveFiles);
GameMain.NetLobbyScreen.CampaignSetupUI = MultiPlayerCampaign.StartCampaignSetup(serverSubmarines, saveFiles);
break;
case ServerPacketHeader.PERMISSIONS:
ReadPermissions(inc);
@@ -1162,7 +1164,7 @@ namespace Barotrauma.Networking
VoipClient = new VoipClient(this, client);
UInt16 subListCount = inc.ReadUInt16();
List<Submarine> submarines = new List<Submarine>();
serverSubmarines.Clear();
for (int i = 0; i < subListCount; i++)
{
string subName = inc.ReadString();
@@ -1171,16 +1173,16 @@ namespace Barotrauma.Networking
var matchingSub = Submarine.SavedSubmarines.FirstOrDefault(s => s.Name == subName && s.MD5Hash.Hash == subHash);
if (matchingSub != null)
{
submarines.Add(matchingSub);
serverSubmarines.Add(matchingSub);
}
else
{
submarines.Add(new Submarine(Path.Combine(Submarine.SavePath, subName) + ".sub", subHash, false));
serverSubmarines.Add(new Submarine(Path.Combine(Submarine.SavePath, subName) + ".sub", subHash, false));
}
}
GameMain.NetLobbyScreen.UpdateSubList(GameMain.NetLobbyScreen.SubList, submarines);
GameMain.NetLobbyScreen.UpdateSubList(GameMain.NetLobbyScreen.ShuttleList.ListBox, submarines);
GameMain.NetLobbyScreen.UpdateSubList(GameMain.NetLobbyScreen.SubList, serverSubmarines);
GameMain.NetLobbyScreen.UpdateSubList(GameMain.NetLobbyScreen.ShuttleList.ListBox, serverSubmarines);
gameStarted = inc.ReadBoolean();
bool allowSpectating = inc.ReadBoolean();