Skip to content

Commit

Permalink
Unstable 0.13.3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
3e849f2e5c committed Apr 28, 2021
1 parent bf743f1 commit 3f324b1
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ private void Send(byte[] buf, int length, Steamworks.P2PSend sendType)
}
if (!successSend)
{
DebugConsole.ThrowError("Failed to send message to remote peer! (" + length.ToString() + " bytes)");
DebugConsole.AddWarning("Failed to send message to remote peer! (" + length.ToString() + " bytes)");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private void HandleDataMessage(IReadMessage inc)
}
if (!successSend)
{
DebugConsole.ThrowError("Failed to send message to remote peer! (" + p2pData.Length.ToString() + " bytes)");
DebugConsole.AddWarning("Failed to send message to remote peer! (" + p2pData.Length.ToString() + " bytes)");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ public static void ForceRedownload(Steamworks.Data.PublishedFileId itemId, Actio
/// <summary>
/// Installs a workshop item by moving it to the game folder.
/// </summary>
public static bool InstallWorkshopItem(Steamworks.Ugc.Item? itemOrNull, out string errorMsg, bool enableContentPackage = false, bool suppressInstallNotif = false)
public static bool InstallWorkshopItem(Steamworks.Ugc.Item? itemOrNull, out string errorMsg, bool enableContentPackage = false, bool suppressInstallNotif = false, Action<ContentPackage> onInstall = null)
{
errorMsg = "Item is null";
if (!itemOrNull.TryGetValue(out Steamworks.Ugc.Item item)) { return false; }
Expand Down Expand Up @@ -1143,6 +1143,8 @@ public static bool InstallWorkshopItem(Steamworks.Ugc.Item? itemOrNull, out stri

GameMain.Config.SuppressModFolderWatcher = false;

onInstall?.Invoke(newPackage);

GameMain.SteamWorkshopScreen?.SetReinstallButtonStatus(item, true, GUI.Style.Green);
}
catch
Expand Down
8 changes: 4 additions & 4 deletions Barotrauma/BarotraumaClient/ClientSource/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ static void CrashDump(GameMain game, string filePath, Exception exception)
sb.AppendLine("Graphics mode: " + GameMain.Config.GraphicsWidth + "x" + GameMain.Config.GraphicsHeight + " (" + GameMain.Config.WindowMode.ToString() + ")");
sb.AppendLine("VSync " + (GameMain.Config.VSyncEnabled ? "ON" : "OFF"));
sb.AppendLine("Language: " + (GameMain.Config.Language ?? "none"));
}
if (GameMain.Config.AllEnabledPackages != null)
{
sb.AppendLine("Selected content packages: " + (!GameMain.Config.AllEnabledPackages.Any() ? "None" : string.Join(", ", GameMain.Config.AllEnabledPackages.Select(c => c.Name))));
if (GameMain.Config.AllEnabledPackages != null)
{
sb.AppendLine("Selected content packages: " + (!GameMain.Config.AllEnabledPackages.Any() ? "None" : string.Join(", ", GameMain.Config.AllEnabledPackages.Select(c => c.Name))));
}
}
sb.AppendLine("Level seed: " + ((Level.Loaded == null) ? "no level loaded" : Level.Loaded.Seed));
sb.AppendLine("Loaded submarine: " + ((Submarine.MainSub == null) ? "None" : Submarine.MainSub.Info.Name + " (" + Submarine.MainSub.Info.MD5Hash + ")"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1078,11 +1078,25 @@ public override void Update(double deltaTime)
pendingWorkshopDownloads.Remove(itemId);
currentlyDownloadingWorkshopItem = null;

void onInstall(ContentPackage resultingPackage)
{
if (!resultingPackage.MD5hash.Hash.Equals(clearedDownload.ExpectedHash))
{
workshopDownloadsFrame?.FindChild((c) => c.UserData is ulong l && l == itemId, true)?.Flash(GUI.Style.Red);
CancelWorkshopDownloads();
GameMain.Client?.Disconnect();
GameMain.Client = null;
new GUIMessageBox(
TextManager.Get("ConnectionLost"),
TextManager.GetWithVariable("DisconnectMessage.MismatchedWorkshopMod", "[incompatiblecontentpackage]", $"\"{resultingPackage.Name}\" (hash {resultingPackage.MD5hash.ShortHash})"));
}
}

if (SteamManager.CheckWorkshopItemInstalled(item))
{
SteamManager.UninstallWorkshopItem(item, false, out _);
}
if (SteamManager.InstallWorkshopItem(item, out string errorMsg, enableContentPackage: false, suppressInstallNotif: true))
if (SteamManager.InstallWorkshopItem(item, out string errorMsg, enableContentPackage: false, suppressInstallNotif: true, onInstall: onInstall))
{
workshopDownloadsFrame?.FindChild((c) => c.UserData is ulong l && l == itemId, true)?.Flash(GUI.Style.Green);
}
Expand All @@ -1091,16 +1105,6 @@ public override void Update(double deltaTime)
workshopDownloadsFrame?.FindChild((c) => c.UserData is ulong l && l == itemId, true)?.Flash(GUI.Style.Red);
DebugConsole.ThrowError(errorMsg);
}

ContentPackage resultingPackage = ContentPackage.AllPackages.FirstOrDefault(p => p.MD5hash.Hash == clearedDownload.ExpectedHash);
if (resultingPackage == null)
{
workshopDownloadsFrame?.FindChild((c) => c.UserData is ulong l && l == itemId, true)?.Flash(GUI.Style.Red);
CancelWorkshopDownloads();
new GUIMessageBox(
TextManager.Get("ConnectionLost"),
TextManager.GetWithVariable("DisconnectMessage.MismatchedWorkshopMod", "incompatiblecontentpackage", $"\"{resultingPackage.Name}\" (hash {resultingPackage.MD5hash.ShortHash})"));
}
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaClient/LinuxClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1300.2.11</Version>
<Version>0.13.3.11</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaClient/MacClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1300.2.11</Version>
<Version>0.13.3.11</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaClient/WindowsClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1300.2.11</Version>
<Version>0.13.3.11</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaServer/LinuxServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1300.2.11</Version>
<Version>0.13.3.11</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaServer/MacServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1300.2.11</Version>
<Version>0.13.3.11</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
Expand Down
8 changes: 4 additions & 4 deletions Barotrauma/BarotraumaServer/ServerSource/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ static void CrashDump(string filePath, Exception exception)
if (GameMain.Config != null)
{
sb.AppendLine("Language: " + (GameMain.Config.Language ?? "none"));
}
if (GameMain.Config.AllEnabledPackages != null)
{
sb.AppendLine("Selected content packages: " + (!GameMain.Config.AllEnabledPackages.Any() ? "None" : string.Join(", ", GameMain.Config.AllEnabledPackages.Select(c => c.Name))));
if (GameMain.Config.AllEnabledPackages != null)
{
sb.AppendLine("Selected content packages: " + (!GameMain.Config.AllEnabledPackages.Any() ? "None" : string.Join(", ", GameMain.Config.AllEnabledPackages.Select(c => c.Name))));
}
}
sb.AppendLine("Level seed: " + ((Level.Loaded == null) ? "no level loaded" : Level.Loaded.Seed));
sb.AppendLine("Loaded submarine: " + ((Submarine.MainSub == null) ? "None" : Submarine.MainSub.Info.Name + " (" + Submarine.MainSub.Info.MD5Hash + ")"));
Expand Down
2 changes: 1 addition & 1 deletion Barotrauma/BarotraumaServer/WindowsServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1300.2.11</Version>
<Version>0.13.3.11</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ bool NeedsDivingGearOnPath(AIObjectiveGoTo gotoObjective)
Character.AnimController.InWater ||
Character.AnimController.HeadInWater ||
Character.CurrentHull == null ||
Character.Submarine.TeamID != Character.TeamID ||
Character.Submarine?.TeamID != Character.TeamID ||
ObjectiveManager.IsCurrentObjective<AIObjectiveFindSafety>() ||
ObjectiveManager.CurrentOrder is AIObjectiveGoTo goTo && goTo.Target == Character || // wait order
ObjectiveManager.CurrentObjective.GetSubObjectivesRecursive(true).Any(o => o.KeepDivingGearOn);
Expand Down
11 changes: 10 additions & 1 deletion Barotrauma/BarotraumaShared/SharedSource/ContentPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,16 @@ public ContentPackage(string filePath, string setPath = "")
{
SteamWorkshopId = SteamManager.GetWorkshopItemIDFromUrl(workshopUrl);
}
GameVersion = new Version(doc.Root.GetAttributeString("gameversion", "0.0.0.0"));
string versionStr = doc.Root.GetAttributeString("gameversion", "0.0.0.0");
try
{
GameVersion = new Version(versionStr);
}
catch
{
DebugConsole.ThrowError($"Invalid version number in content package \"{Name}\" ({versionStr}).");
GameVersion = GameMain.Version;
}
if (doc.Root.Attribute("installtime") != null)
{
InstallTime = ToolBox.Epoch.ToDateTime(doc.Root.GetAttributeUInt("installtime", 0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,6 @@ public bool IsPasswordCorrect(byte[] input, int salt)
{
if (!HasPassword) return true;
byte[] saltedPw = SaltPassword(Encoding.UTF8.GetBytes(password), salt);
DebugConsole.NewMessage(ToolBox.ByteArrayToString(input) + " " + ToolBox.ByteArrayToString(saltedPw));
if (input.Length != saltedPw.Length) return false;
for (int i = 0; i < input.Length; i++)
{
Expand Down
Binary file modified Barotrauma/BarotraumaShared/Submarines/Humpback.sub
Binary file not shown.
Binary file modified Barotrauma/BarotraumaShared/Submarines/Orca.sub
Binary file not shown.
35 changes: 14 additions & 21 deletions Barotrauma/BarotraumaShared/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
---------------------------------------------------------------------------------------------------------
v0.1300.2.11 (unstable)
------------------------------------------------------------------------------------------------------
v0.13.3.11
---------------------------------------------------------------------------------------------------------

Changes:
- Adjusted autopilot logic to make it better at keeping the sub afloat when there's extra water on board. The maximum velocity of the autopilot is limited, which previously prevented it from emptying the ballast fully. Now it's only limited if the submarine is heading in the correct direction with enough speed, so if the sub starts sinking due to extra water, the autopilot can compensate and fully empty the ballast.
- Made large monsters immune to sufforin.

Fixes:
- More fixes to installing/updating mods.
- Fixes to issues that prevented mods installed from the Workshop from getting automatically updated and caused errors when trying to join modded servers.
- Fixed an issue in the voice chat that caused audio crackling when multiple people were speaking at the same time.
- Fixed inability to drag players who've ragdolled themselves with space bar.
- Fixed "failed to send message to remote peer" error spam when a client's internet connection goes down.
- Fixed certain submarines spawning with a non-neutral ballast level (Kastrull seems to have been the only affected vanilla submarine). Happened because the game would determine the neutral ballast level from the first nav terminal it finds in the sub, without checking whether that terminal controls a shuttle or the sub itself.
- Fixed explosions using wall damage value instead of level wall damage when the explosion happens outside a level wall.
- Fixed oxygen shelves refilling oxygenite tanks (again).
- Readded traitor missions that were accidentally removed in the previous unstable build.

Modding:
- Fixed console errors when a character with no gender tries to wear clothing that only has separate male and female sprites.

---------------------------------------------------------------------------------------------------------
v0.1300.1.11 (unstable)
---------------------------------------------------------------------------------------------------------

Changes:
- Adjusted autopilot logic to make it better at keeping the sub afloat when there's extra water on board. The maximum velocity of the autopilot is limited, which previously prevented it from emptying the ballast fully. Now it's only limited if the submarine is heading in the correct direction with enough speed, so if the sub starts sinking due to extra water, the autopilot can compensate and fully empty the ballast.

Fixes:
- Fixes to issues that prevented mods installed from the Workshop from getting automatically updated.
- Fixed inability to drag players who've ragdolled themselves with space bar.
- Fixed status monitor being messed up on mirrored subs that contain shuttles.
- Fixed an issue in the voice chat that caused audio crackling when multiple people were speaking at the same time.
- Fixed inability to place oxygenite tanks in oxygen tank shelves.
- Fixed crashing when a bot tries to find a diving suit inside ruins.
- Fixed minor wall draw order issue in Orca's top deck.
- Fixed bots trying to treat nausea even though the only cure for it is to wait it out.
- Fixed status monitor being messed up on mirrored subs that contain shuttles.
- Fixed railgun payloads not exploding.
- Fixed server sometimes assigning players who haven't set any job preferences as the captain, even if someone else wants to be the captain.
- Fixed ancient weapon propelling the character in an incorrect direction when using it underwater.
Expand All @@ -42,12 +32,15 @@ Fixes:
- Fixed clicking on command interface nodes crashing the game if the key is rebound to primary mouse button.
- Fixed tiling issues in some of the legacy background wall sprites.
- Fixed Spinelings attacking Leucocytes. Spinelings should avoid Leucocytes if they get close.
- Fixed bots being unable to stand on the platform below Humpback's docking hatch, preventing them from repairing the hatch.
- Fixed "beacon station" text and "generating preview..." in the submarine preview window not being translated when playing in a language other than English.

Modding:
- Fixed console errors when a character with no gender tries to wear clothing that only has separate male and female sprites.
- Fixed crashing if the current style doesn't define a saving indicator.
- Fixed inability to load ragdoll/animation definitions from mods that override a character.
- Fixed ClearTagAction not properly clearing all the tags assigned by a scripted event.
- Fixed crashing if a mod's version number is incorrectly formatted in filelist.xml.

---------------------------------------------------------------------------------------------------------
v0.13.0.11
Expand Down

0 comments on commit 3f324b1

Please sign in to comment.