From d4f6f4cf88bcefcb8c09a3621ab20b2ff26a6558 Mon Sep 17 00:00:00 2001 From: Markus Isberg <3e849f2e5c@pm.me> Date: Fri, 13 May 2022 22:55:07 +0900 Subject: [PATCH] Build 0.18.1.0 --- .../BarotraumaClient/ClientSource/GUI/GUI.cs | 3 +- .../ClientSource/GUI/GUIContextMenu.cs | 4 +- .../ClientSource/GUI/TabMenu.cs | 6 +- .../GameModes/Tutorials/CaptainTutorial.cs | 19 +- .../GameModes/Tutorials/DoctorTutorial.cs | 11 + .../GameModes/Tutorials/EngineerTutorial.cs | 11 + .../GameModes/Tutorials/MechanicTutorial.cs | 18 ++ .../GameModes/Tutorials/OfficerTutorial.cs | 14 ++ .../GameModes/Tutorials/ScenarioTutorial.cs | 4 + .../ClientSource/Networking/GameClient.cs | 1 + .../ClientSource/Networking/ServerSettings.cs | 2 +- .../BarotraumaClient/LinuxClient.csproj | 2 +- .../BarotraumaClient/LinuxClient.csproj.bak | 208 +++++++++++++++ Barotrauma/BarotraumaClient/MacClient.csproj | 2 +- .../BarotraumaClient/MacClient.csproj.bak | 214 ++++++++++++++++ .../BarotraumaClient/WindowsClient.csproj | 2 +- .../BarotraumaClient/WindowsClient.csproj.bak | 237 ++++++++++++++++++ .../BarotraumaServer/LinuxServer.csproj | 2 +- .../BarotraumaServer/LinuxServer.csproj.bak | 156 ++++++++++++ Barotrauma/BarotraumaServer/MacServer.csproj | 2 +- .../BarotraumaServer/MacServer.csproj.bak | 157 ++++++++++++ .../GameModes/MultiPlayerCampaign.cs | 2 +- .../ServerSource/Networking/GameServer.cs | 1 + .../BarotraumaServer/WindowsServer.csproj | 2 +- .../BarotraumaServer/WindowsServer.csproj.bak | 152 +++++++++++ .../GameSession/AutoItemPlacer.cs | 6 +- .../Items/Components/ItemComponent.cs | 4 +- .../SharedSource/Map/Levels/Level.cs | 20 ++ .../Map/Levels/LevelGenerationParams.cs | 8 +- .../SharedSource/Networking/ServerSettings.cs | 2 +- .../Serialization/SerializableProperty.cs | 2 +- Barotrauma/BarotraumaShared/changelog.txt | 14 +- 32 files changed, 1263 insertions(+), 25 deletions(-) create mode 100644 Barotrauma/BarotraumaClient/LinuxClient.csproj.bak create mode 100644 Barotrauma/BarotraumaClient/MacClient.csproj.bak create mode 100644 Barotrauma/BarotraumaClient/WindowsClient.csproj.bak create mode 100644 Barotrauma/BarotraumaServer/LinuxServer.csproj.bak create mode 100644 Barotrauma/BarotraumaServer/MacServer.csproj.bak create mode 100644 Barotrauma/BarotraumaServer/WindowsServer.csproj.bak diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs index 4b2e186a8..8d65228ff 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs @@ -2425,7 +2425,8 @@ namespace Barotrauma verificationTextTag: GameMain.GameSession == null ? "PauseMenuQuitVerificationEditor" : "PauseMenuQuitVerification", action: () => { - GameMain.QuitToMainMenu(save: false); + // In the first campaign round we need to save the start items. + GameMain.QuitToMainMenu(save: GameMain.GameSession.GameMode is SinglePlayerCampaign campaign && campaign.IsFirstRound); }); } else diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUIContextMenu.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUIContextMenu.cs index eeebb32c4..8b8e09f16 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUIContextMenu.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUIContextMenu.cs @@ -290,7 +290,7 @@ namespace Barotrauma public override void AddToGUIUpdateList(bool ignoreChildren = false, int order = 0) { base.AddToGUIUpdateList(ignoreChildren, order); - SubMenu?.AddToGUIUpdateList(); + SubMenu?.AddToGUIUpdateList(order: 2); } public static void AddActiveToGUIUpdateList() @@ -300,7 +300,7 @@ namespace Barotrauma CurrentContextMenu = null; } - CurrentContextMenu?.AddToGUIUpdateList(); + CurrentContextMenu?.AddToGUIUpdateList(order: 2); } } } \ No newline at end of file diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/TabMenu.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/TabMenu.cs index 87b4b2e92..d40a43dc0 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GUI/TabMenu.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/TabMenu.cs @@ -67,7 +67,7 @@ namespace Barotrauma this.frame = frame; this.permissionIcon = permissionIcon; character = client?.Character; - wasCharacterAlive = client.Character != null && !client.Character.IsDead; + wasCharacterAlive = client?.Character != null && !client.Character.IsDead; } public LinkedGUI(Character character, GUIFrame frame, GUITextBlock textBlock) @@ -1253,8 +1253,8 @@ namespace Barotrauma if (!hasMoneyPermissions && GameMain.Client?.ServerSettings is { } serverSettings) { - transferAmountInput.MaxValueInt = Math.Min(maxValue, serverSettings.MaximumTransferRequest); - if (serverSettings.MaximumTransferRequest <= 0) + transferAmountInput.MaxValueInt = Math.Min(maxValue, serverSettings.MaximumMoneyTransferRequest); + if (serverSettings.MaximumMoneyTransferRequest <= 0) { transferAmountInput.Enabled = false; transferAmountInput.ToolTip = TextManager.Get("wallettransferrequestdisabled"); diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/CaptainTutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/CaptainTutorial.cs index b7ef43d9f..2f9e0a46f 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/CaptainTutorial.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/CaptainTutorial.cs @@ -189,6 +189,9 @@ namespace Barotrauma.Tutorials captain_mechanic.CanSpeak = captain_security.CanSpeak = captain_engineer.CanSpeak = false; captain_mechanic.AIController.Enabled = captain_security.AIController.Enabled = captain_engineer.AIController.Enabled = false; + + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Started"); + GameAnalyticsManager.AddDesignEvent("Tutorial:Started"); } public override IEnumerable UpdateState() @@ -223,6 +226,7 @@ namespace Barotrauma.Tutorials while (!HasOrder(captain_medic, "follow")); SetDoorAccess(tutorial_submarineDoor, tutorial_submarineDoorLight, true); RemoveCompletedObjective(0); + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Objective0"); // Submarine do { yield return null; } while (!captain_enteredSubmarineSensor.MotionDetected); @@ -238,6 +242,8 @@ namespace Barotrauma.Tutorials //HighlightOrderOption("jobspecific"); } while (!HasOrder(captain_mechanic, "repairsystems") && !HasOrder(captain_mechanic, "repairmechanical") && !HasOrder(captain_mechanic, "repairelectrical")); RemoveCompletedObjective(1); + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Objective1"); + yield return new WaitForSeconds(2f, false); TriggerTutorialSegment(2, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Command)); GameMain.GameSession.CrewManager.AddCharacter(captain_security); @@ -250,6 +256,8 @@ namespace Barotrauma.Tutorials } while (!HasOrder(captain_security, "operateweapons")); RemoveCompletedObjective(2); + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Objective2"); + yield return new WaitForSeconds(4f, false); TriggerTutorialSegment(3, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Command)); GameMain.GameSession.CrewManager.AddCharacter(captain_engineer); @@ -265,6 +273,8 @@ namespace Barotrauma.Tutorials } while (!HasOrder(captain_engineer, "operatereactor", "powerup")); RemoveCompletedObjective(3); + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Objective3"); + do { yield return null; } while (!tutorial_submarineReactor.IsActive); // Wait until reactor on TriggerTutorialSegment(4); while (ContentRunning) yield return null; @@ -279,6 +289,8 @@ namespace Barotrauma.Tutorials } while (Submarine.MainSub.DockedTo.Any()); captain_navConsole.UseAutoDocking = false; RemoveCompletedObjective(4); + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Objective4"); + yield return new WaitForSeconds(2f, false); TriggerTutorialSegment(5); // Navigate to destination do @@ -294,6 +306,8 @@ namespace Barotrauma.Tutorials } while (captain_sonar.CurrentMode != Sonar.Mode.Active); do { yield return null; } while (Vector2.Distance(Submarine.MainSub.WorldPosition, Level.Loaded.EndPosition) > 4000f); RemoveCompletedObjective(5); + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Objective5"); + captain_navConsole.UseAutoDocking = true; yield return new WaitForSeconds(4f, false); TriggerTutorialSegment(6); // Docking @@ -303,13 +317,16 @@ namespace Barotrauma.Tutorials yield return new WaitForSeconds(1.0f, false); } while (!Submarine.MainSub.AtEndExit || !Submarine.MainSub.DockedTo.Any()); RemoveCompletedObjective(6); + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Objective6"); + yield return new WaitForSeconds(3f, false); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.GetWithVariable("Captain.Radio.Complete", "[OUTPOSTNAME]", GameMain.GameSession.EndLocation.Name), ChatMessageType.Radio, null); SetHighlight(captain_navConsole.Item, false); SetHighlight(captain_sonar.Item, false); SetHighlight(captain_statusMonitor, false); captain.RemoveActiveObjectiveEntity(captain_navConsole.Item); - + + GameAnalyticsManager.AddDesignEvent("Tutorial:CaptainTutorial:Completed"); CoroutineManager.StartCoroutine(TutorialCompleted()); } diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs index 5edeeb26c..4cf46e5f1 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs @@ -198,6 +198,9 @@ namespace Barotrauma.Tutorials Item reactorItem = Item.ItemList.Find(i => i.Submarine == Submarine.MainSub && i.GetComponent() != null); reactorItem.GetComponent().AutoTemp = true; + + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Started"); + GameAnalyticsManager.AddDesignEvent("Tutorial:Started"); } public override IEnumerable UpdateState() @@ -281,6 +284,7 @@ namespace Barotrauma.Tutorials SetHighlight(doctor_suppliesCabinet.Item, false); RemoveCompletedObjective(0); + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Objective0"); yield return new WaitForSeconds(1.0f, false); @@ -294,6 +298,7 @@ namespace Barotrauma.Tutorials } yield return null; RemoveCompletedObjective(1); + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Objective1"); yield return new WaitForSeconds(1.0f, false); TriggerTutorialSegment(2); //Treat self while (doctor.CharacterHealth.GetAfflictionStrength("damage") > 0.01f) @@ -311,6 +316,7 @@ namespace Barotrauma.Tutorials } RemoveCompletedObjective(2); + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Objective2"); SetDoorAccess(doctor_firstDoor, doctor_firstDoorLight, true); while (CharacterHealth.OpenHealthWindow != null) @@ -358,6 +364,7 @@ namespace Barotrauma.Tutorials yield return new WaitForSeconds(1.0f, false); } RemoveCompletedObjective(3); + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Objective3"); SetHighlight(doctor_medBayCabinet.Item, true); SetDoorAccess(doctor_thirdDoor, doctor_thirdDoorLight, true); patient1.CharacterHealth.UseHealthWindow = true; @@ -401,6 +408,7 @@ namespace Barotrauma.Tutorials } RemoveCompletedObjective(4); + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Objective4"); SetHighlight(patient1, false); yield return new WaitForSeconds(1.0f, false); @@ -442,6 +450,7 @@ namespace Barotrauma.Tutorials yield return null; } RemoveCompletedObjective(5); + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Objective5"); SetHighlight(patient2, false); doctor.RemoveActiveObjectiveEntity(patient2); CoroutineManager.StopCoroutines("KeepPatient2Alive"); @@ -497,6 +506,7 @@ namespace Barotrauma.Tutorials yield return new WaitForSeconds(1.0f, false); } RemoveCompletedObjective(6); + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Objective6"); foreach (var patient in subPatients) { SetHighlight(patient, false); @@ -504,6 +514,7 @@ namespace Barotrauma.Tutorials } // END TUTORIAL + GameAnalyticsManager.AddDesignEvent("Tutorial:DoctorTutorial:Completed"); CoroutineManager.StartCoroutine(TutorialCompleted()); } diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/EngineerTutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/EngineerTutorial.cs index ca52c58ba..52592248d 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/EngineerTutorial.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/EngineerTutorial.cs @@ -244,6 +244,9 @@ namespace Barotrauma.Tutorials engineer_submarineJunctionBox_2.Condition = 0f; engineer_submarineJunctionBox_3.Indestructible = false; engineer_submarineJunctionBox_3.Condition = 0f; + + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Started"); + GameAnalyticsManager.AddDesignEvent("Tutorial:Started"); } public override IEnumerable UpdateState() @@ -317,6 +320,7 @@ namespace Barotrauma.Tutorials yield return null; } while (!engineer_equipmentCabinet.Inventory.IsEmpty()); // Wait until looted RemoveCompletedObjective(0); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Objective0"); SetHighlight(engineer_equipmentCabinet.Item, false); SetHighlight(engineer_reactor.Item, true); SetDoorAccess(engineer_firstDoor, engineer_firstDoorLight, true); @@ -352,6 +356,7 @@ namespace Barotrauma.Tutorials yield return null; } while (engineer_reactor.AvailableFuel == 0); RemoveCompletedObjective(1); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Objective1"); TriggerTutorialSegment(2); CoroutineManager.StartCoroutine(ReactorOperatedProperly()); do @@ -395,6 +400,7 @@ namespace Barotrauma.Tutorials engineer.SelectedConstruction = null; engineer_reactor.CanBeSelected = false; RemoveCompletedObjective(2); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Objective2"); SetHighlight(engineer_reactor.Item, false); SetHighlight(engineer_brokenJunctionBox, true); SetDoorAccess(engineer_secondDoor, engineer_secondDoorLight, true); @@ -421,6 +427,7 @@ namespace Barotrauma.Tutorials } while (repairableJunctionBoxComponent.IsBelowRepairThreshold); // Wait until repaired SetHighlight(engineer_brokenJunctionBox, false); RemoveCompletedObjective(3); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Objective3"); SetDoorAccess(engineer_thirdDoor, engineer_thirdDoorLight, true); for (int i = 0; i < engineer_disconnectedJunctionBoxes.Length; i++) { @@ -439,6 +446,7 @@ namespace Barotrauma.Tutorials SetHighlight(engineer_disconnectedJunctionBoxes[i].Item, false); } RemoveCompletedObjective(4); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Objective4"); do { yield return null; } while (engineer_workingPump.Item.CurrentHull.WaterPercentage > waterVolumeBeforeOpening); // Wait until drained wiringActive = false; SetDoorAccess(engineer_fourthDoor, engineer_fourthDoorLight, true); @@ -465,6 +473,7 @@ namespace Barotrauma.Tutorials do { CheckJunctionBoxHighlights(repairableJunctionBoxComponent1, repairableJunctionBoxComponent2, repairableJunctionBoxComponent3); yield return null; } while (repairableJunctionBoxComponent1.IsBelowRepairThreshold || repairableJunctionBoxComponent2.IsBelowRepairThreshold || repairableJunctionBoxComponent3.IsBelowRepairThreshold); CheckJunctionBoxHighlights(repairableJunctionBoxComponent1, repairableJunctionBoxComponent2, repairableJunctionBoxComponent3); RemoveCompletedObjective(5); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Objective5"); yield return new WaitForSeconds(2f, false); TriggerTutorialSegment(6); // Powerup reactor @@ -474,10 +483,12 @@ namespace Barotrauma.Tutorials engineer.RemoveActiveObjectiveEntity(engineer_submarineReactor.Item); SetHighlight(engineer_submarineReactor.Item, false); RemoveCompletedObjective(6); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Objective6"); GameMain.GameSession.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Engineer.Radio.Complete"), ChatMessageType.Radio, null); yield return new WaitForSeconds(4f, false); + GameAnalyticsManager.AddDesignEvent("Tutorial:EngineerTutorial:Completed"); CoroutineManager.StartCoroutine(TutorialCompleted()); } diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/MechanicTutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/MechanicTutorial.cs index de6a066f2..71fd7e344 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/MechanicTutorial.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/MechanicTutorial.cs @@ -290,6 +290,9 @@ namespace Barotrauma.Tutorials mechanic_ballastPump_2 = Item.ItemList.Find(i => i.HasTag("mechanic_ballastpump_2")).GetComponent(); mechanic_ballastPump_2.Item.Indestructible = false; mechanic_ballastPump_2.Item.Condition = 0f; + + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Started"); + GameAnalyticsManager.AddDesignEvent("Tutorial:Started"); } public override void Update(float deltaTime) @@ -325,6 +328,7 @@ namespace Barotrauma.Tutorials SetHighlight(mechanic_firstDoor.Item, false); yield return new WaitForSeconds(1.5f, false); RemoveCompletedObjective(0); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective0"); // Room 2 yield return new WaitForSeconds(0.0f, false); @@ -368,6 +372,7 @@ namespace Barotrauma.Tutorials SetHighlight(mechanic_equipmentCabinet.Item, false); yield return new WaitForSeconds(1.5f, false); RemoveCompletedObjective(1); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective1"); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Mechanic.Radio.Breach"), ChatMessageType.Radio, null); // Room 3 @@ -391,6 +396,8 @@ namespace Barotrauma.Tutorials do { yield return null; } while (WallHasDamagedSections(mechanic_brokenWall_1)); // Highlight until repaired mechanic.RemoveActiveObjectiveEntity(mechanic_brokenWall_1); RemoveCompletedObjective(2); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective2"); + yield return new WaitForSeconds(1f, false); TriggerTutorialSegment(3, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Select)); // Pump objective SetHighlight(mechanic_workingPump.Item, true); @@ -408,6 +415,8 @@ namespace Barotrauma.Tutorials SetHighlight(mechanic_workingPump.Item, false); do { yield return null; } while (mechanic_brokenhull_1.WaterPercentage > waterVolumeBeforeOpening); // Unlock door once drained RemoveCompletedObjective(3); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective3"); + SetDoorAccess(mechanic_thirdDoor, mechanic_thirdDoorLight, true); //TriggerTutorialSegment(11, GameSettings.CurrentConfig.KeyMap.Bindings[InputType.Select], GameSettings.CurrentConfig.KeyMap.Bindings[InputType.Up], GameSettings.CurrentConfig.KeyMap.Bindings[InputType.Down], GameSettings.CurrentConfig.KeyMap.Bindings[InputType.Select]); // Ladder objective //do { yield return null; } while (!mechanic_ladderSensor.MotionDetected); @@ -516,6 +525,8 @@ namespace Barotrauma.Tutorials SetHighlight(mechanic_deconstructor.Item, false); RemoveCompletedObjective(4); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective4"); + yield return new WaitForSeconds(1f, false); TriggerTutorialSegment(5); // Fabricate SetHighlight(mechanic_fabricator.Item, true); @@ -565,6 +576,7 @@ namespace Barotrauma.Tutorials yield return null; } while (mechanic.Inventory.FindItemByIdentifier("extinguisher".ToIdentifier()) == null); // Wait until extinguisher is created RemoveCompletedObjective(5); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective5"); SetHighlight(mechanic_fabricator.Item, false); SetDoorAccess(mechanic_fourthDoor, mechanic_fourthDoorLight, true); @@ -574,6 +586,7 @@ namespace Barotrauma.Tutorials do { yield return null; } while (!mechanic_fire.Removed); // Wait until extinguished yield return new WaitForSeconds(3f, false); RemoveCompletedObjective(6); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective6"); if (mechanic.HasEquippedItem("extinguisher".ToIdentifier())) // do not trigger if dropped already { @@ -584,6 +597,7 @@ namespace Barotrauma.Tutorials yield return null; } while (mechanic.HasEquippedItem("extinguisher".ToIdentifier())); RemoveCompletedObjective(7); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective7"); } SetDoorAccess(mechanic_fifthDoor, mechanic_fifthDoorLight, true); @@ -608,6 +622,7 @@ namespace Barotrauma.Tutorials } while (!mechanic.HasEquippedItem("divingsuit".ToIdentifier(), slotType: InvSlotType.OuterClothes)); SetHighlight(mechanic_divingSuitContainer.Item, false); RemoveCompletedObjective(8); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective8"); SetDoorAccess(tutorial_mechanicFinalDoor, tutorial_mechanicFinalDoorLight, true); // Room 7 @@ -650,6 +665,7 @@ namespace Barotrauma.Tutorials } } while (repairablePumpComponent.IsBelowRepairThreshold || mechanic_brokenPump.FlowPercentage >= 0 || !mechanic_brokenPump.IsActive); RemoveCompletedObjective(9); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective9"); SetHighlight(mechanic_brokenPump.Item, false); do { yield return null; } while (mechanic_brokenhull_2.WaterPercentage > waterVolumeBeforeOpening); SetDoorAccess(tutorial_submarineDoor, tutorial_submarineDoorLight, true); @@ -674,9 +690,11 @@ namespace Barotrauma.Tutorials do { CheckHighlights(repairablePumpComponent1, repairablePumpComponent2, repairableEngineComponent); yield return null; } while (repairablePumpComponent1.IsBelowRepairThreshold || repairablePumpComponent2.IsBelowRepairThreshold || repairableEngineComponent.IsBelowRepairThreshold); CheckHighlights(repairablePumpComponent1, repairablePumpComponent2, repairableEngineComponent); RemoveCompletedObjective(10); + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Objective10"); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Mechanic.Radio.Complete"), ChatMessageType.Radio, null); // END TUTORIAL + GameAnalyticsManager.AddDesignEvent("Tutorial:MechanicTutorial:Completed"); CoroutineManager.StartCoroutine(TutorialCompleted()); } diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/OfficerTutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/OfficerTutorial.cs index 751cc4cd8..b2514450f 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/OfficerTutorial.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/OfficerTutorial.cs @@ -251,6 +251,9 @@ namespace Barotrauma.Tutorials officer_subSuperCapacitor_2 = Item.ItemList.Find(i => i.HasTag("officer_subsupercapacitor_2")).GetComponent(); officer_subAmmoShelf = Item.ItemList.Find(i => i.HasTag("officer_subammoshelf")).GetComponent(); SetDoorAccess(tutorial_submarineDoor, tutorial_submarineDoorLight, true); + + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Started"); + GameAnalyticsManager.AddDesignEvent("Tutorial:Started"); } public override IEnumerable UpdateState() @@ -310,6 +313,7 @@ namespace Barotrauma.Tutorials yield return null; } while (!officer_equipmentCabinet.Inventory.IsEmpty()); // Wait until looted //RemoveCompletedObjective(segments[0]); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective0"); SetHighlight(officer_equipmentCabinet.Item, false); do { yield return null; } while (IsSelectedItem(officer_equipmentCabinet.Item)); TriggerTutorialSegment(1, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Aim), GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Shoot)); // Equip melee weapon & armor @@ -330,6 +334,7 @@ namespace Barotrauma.Tutorials yield return new WaitForSeconds(1f, false); } while (!officer.HasEquippedItem("stunbaton".ToIdentifier()) || !officer.HasEquippedItem("bodyarmor".ToIdentifier()) || !officer.HasEquippedItem("ballistichelmet1".ToIdentifier())); RemoveCompletedObjective(1); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective1"); SetDoorAccess(officer_firstDoor, officer_firstDoorLight, true); // Room 3 @@ -338,6 +343,7 @@ namespace Barotrauma.Tutorials officer_crawler = SpawnMonster("crawler", officer_crawlerSpawnPos); do { yield return null; } while (!officer_crawler.IsDead); RemoveCompletedObjective(2); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective2"); Heal(officer); yield return new WaitForSeconds(1f, false); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Officer.Radio.CrawlerDead"), ChatMessageType.Radio, null); @@ -366,6 +372,8 @@ namespace Barotrauma.Tutorials SetHighlight(officer_ammoShelf_1.Item, false); SetHighlight(officer_ammoShelf_2.Item, false); RemoveCompletedObjective(3); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective3"); + yield return new WaitForSeconds(2f, false); TriggerTutorialSegment(4, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Select), GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Shoot), GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Deselect)); // Kill hammerhead officer_hammerhead = SpawnMonster("hammerhead", officer_hammerheadSpawnPos); @@ -401,6 +409,8 @@ namespace Barotrauma.Tutorials Heal(officer); SetHighlight(officer_coilgunPeriscope, false); RemoveCompletedObjective(4); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective4"); + yield return new WaitForSeconds(1f, false); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Officer.Radio.HammerheadDead"), ChatMessageType.Radio, null); SetDoorAccess(officer_thirdDoor, officer_thirdDoorLight, true); @@ -451,6 +461,7 @@ namespace Barotrauma.Tutorials yield return null; } while (!shotGunChamber.Inventory.IsFull(takeStacksIntoAccount: true)); // Wait until all six harpoons loaded RemoveCompletedObjective(5); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective5"); SetHighlight(officer_rangedWeaponCabinet.Item, false); SetDoorAccess(officer_fourthDoor, officer_fourthDoorLight, true); @@ -461,6 +472,7 @@ namespace Barotrauma.Tutorials do { yield return null; } while (!officer_mudraptor.IsDead); Heal(officer); RemoveCompletedObjective(6); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective6"); SetDoorAccess(tutorial_securityFinalDoor, tutorial_securityFinalDoorLight, true); // Submarine @@ -512,9 +524,11 @@ namespace Barotrauma.Tutorials officer.RemoveActiveObjectiveEntity(officer_subAmmoBox_1); officer.RemoveActiveObjectiveEntity(officer_subAmmoBox_2); RemoveCompletedObjective(7); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Objective7"); GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Officer.Radio.Complete"), ChatMessageType.Radio, null); yield return new WaitForSeconds(4f, false); + GameAnalyticsManager.AddDesignEvent("Tutorial:OfficerTutorial:Completed"); CoroutineManager.StartCoroutine(TutorialCompleted()); } diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/ScenarioTutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/ScenarioTutorial.cs index 5c9061d8e..01142cabe 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/ScenarioTutorial.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/ScenarioTutorial.cs @@ -252,6 +252,8 @@ namespace Barotrauma.Tutorials Character.Controlled = character = null; Stop(); + GameAnalyticsManager.AddDesignEvent("Tutorial:Died"); + yield return new WaitForSeconds(3.0f); var messageBox = new GUIMessageBox(TextManager.Get("Tutorial.TryAgainHeader"), TextManager.Get("Tutorial.TryAgain"), new LocalizedString[] { TextManager.Get("Yes"), TextManager.Get("No") }); @@ -273,6 +275,8 @@ namespace Barotrauma.Tutorials Character.Controlled.ClearInputs(); Character.Controlled = null; + GameAnalyticsManager.AddDesignEvent("Tutorial:Completed"); + yield return new WaitForSeconds(waitBeforeFade); var endCinematic = new CameraTransition(Submarine.MainSub, GameMain.GameScreen.Cam, null, Alignment.Center, panDuration: fadeOutTime); diff --git a/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs b/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs index 858971e33..32fae9689 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs @@ -1519,6 +1519,7 @@ namespace Barotrauma.Networking serverSettings.LockAllDefaultWires = inc.ReadBoolean(); serverSettings.AllowRagdollButton = inc.ReadBoolean(); serverSettings.AllowLinkingWifiToChat = inc.ReadBoolean(); + serverSettings.MaximumMoneyTransferRequest = inc.ReadInt32(); bool usingShuttle = GameMain.NetLobbyScreen.UsingShuttle = inc.ReadBoolean(); GameMain.LightManager.LosMode = (LosMode)inc.ReadByte(); bool includesFinalize = inc.ReadBoolean(); inc.ReadPadBits(); diff --git a/Barotrauma/BarotraumaClient/ClientSource/Networking/ServerSettings.cs b/Barotrauma/BarotraumaClient/ClientSource/Networking/ServerSettings.cs index 13f093216..326c6f9a0 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Networking/ServerSettings.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Networking/ServerSettings.cs @@ -635,7 +635,7 @@ namespace Barotrauma.Networking GetPropertyData(nameof(TraitorsMinPlayerCount)).AssignGUIComponent(traitorsMinPlayerCount); var maximumTransferAmount = CreateLabeledNumberInput(roundsTab, "serversettingsmaximumtransferrequest", 0, CampaignMode.MaxMoney, "serversettingsmaximumtransferrequesttooltip"); - GetPropertyData(nameof(MaximumTransferRequest)).AssignGUIComponent(maximumTransferAmount); + GetPropertyData(nameof(MaximumMoneyTransferRequest)).AssignGUIComponent(maximumTransferAmount); var lootedMoneyDestination = CreateLabeledDropdown(roundsTab, "serversettingslootedmoneydestination", numElements: 2, "serversettingslootedmoneydestinationtooltip"); lootedMoneyDestination.AddItem(TextManager.Get("lootedmoneydestination.bank"), LootedMoneyDestination.Bank); diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj index a2ee9a9e0..6b590be38 100644 --- a/Barotrauma/BarotraumaClient/LinuxClient.csproj +++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.18.0.0 + 0.18.1.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj.bak b/Barotrauma/BarotraumaClient/LinuxClient.csproj.bak new file mode 100644 index 000000000..a2ee9a9e0 --- /dev/null +++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj.bak @@ -0,0 +1,208 @@ + + + + WinExe + netcoreapp3.1 + Barotrauma + FakeFish, Undertow Games + Barotrauma + 0.18.0.0 + Copyright © FakeFish 2018-2022 + AnyCPU;x64 + Barotrauma + ..\BarotraumaShared\Icon.ico + Debug;Release;Unstable + ;NU1605;CS0114;CS0108CS8597;CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8624;CS8625;CS8626;CS8629;CS8631;CS8632;CS8633;CS8634;CS8638;CS8643;CS8644;CS8645;CS8653;CS8654;CS8655;CS8667;CS8669;CS8670;CS8714;CS8717;CS8765 + + + + + + DEBUG;TRACE;CLIENT;LINUX;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + net6.0 + 8 + + + + TRACE;DEBUG;CLIENT;LINUX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + net6.0 + 8 + + + + TRACE;CLIENT;LINUX;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + + + + TRACE;CLIENT;LINUX;USE_STEAM;UNSTABLE + x64 + ..\bin\$(Configuration)Linux\ + true + + + + TRACE;CLIENT;LINUX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + + + + TRACE;CLIENT;LINUX;X64;USE_STEAM;UNSTABLE + x64 + ..\bin\$(Configuration)Linux\ + true + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + PreserveNewest + + + + Icon.bmp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(IntermediateOutputPath)gitver + $(IntermediateOutputPath)gitbranch + + + + + + + + + + + + + + + + + + @(GitVersion) + + + + + + + + + @(GitBranch) + + + + + + + $(IntermediateOutputPath)CustomAssemblyInfo.cs + + + + + + + + + <_Parameter1>GitRevision + <_Parameter2>$(BuildHash) + + + <_Parameter1>GitBranch + <_Parameter2>$(BuildBranch) + + + <_Parameter1>ProjectDir + <_Parameter2>$(ProjectDir) + + + + + + + + linux-x64 + + + + \ No newline at end of file diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj index 9360c73bf..313a64a2f 100644 --- a/Barotrauma/BarotraumaClient/MacClient.csproj +++ b/Barotrauma/BarotraumaClient/MacClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.18.0.0 + 0.18.1.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj.bak b/Barotrauma/BarotraumaClient/MacClient.csproj.bak new file mode 100644 index 000000000..9360c73bf --- /dev/null +++ b/Barotrauma/BarotraumaClient/MacClient.csproj.bak @@ -0,0 +1,214 @@ + + + + WinExe + netcoreapp3.1 + Barotrauma + FakeFish, Undertow Games + Barotrauma + 0.18.0.0 + Copyright © FakeFish 2018-2022 + AnyCPU;x64 + Barotrauma + ..\BarotraumaShared\Icon.ico + Debug;Release;Unstable + ;NU1605;CS0114;CS0108CS8597;CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8624;CS8625;CS8626;CS8629;CS8631;CS8632;CS8633;CS8634;CS8638;CS8643;CS8644;CS8645;CS8653;CS8654;CS8655;CS8667;CS8669;CS8670;CS8714;CS8717;CS8765 + + + + TRACE;CLIENT;OSX;USE_STEAM;DEBUG;NETCOREAPP;NETCOREAPP3_0 + x64 + ..\bin\$(Configuration)Mac + + + + TRACE;DEBUG;CLIENT;OSX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Mac\ + + + + TRACE;CLIENT;OSX;USE_STEAM;RELEASE;NETCOREAPP;NETCOREAPP3_0 + x64 + + ..\bin\$(Configuration)Mac + + + + TRACE;CLIENT;OSX;USE_STEAM;RELEASE;NETCOREAPP;NETCOREAPP3_0;UNSTABLE + x64 + + ..\bin\$(Configuration)Mac + true + + + + TRACE;CLIENT;OSX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Mac\ + + + + TRACE;CLIENT;OSX;X64;USE_STEAM;UNSTABLE + x64 + ..\bin\$(Configuration)Mac\ + true + + + + + + + + + + + SharedSource\Prefabs\PrefabSelector.cs + + + SharedSource\Prefabs\PrefabCollectionSubset.cs + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + Icon.bmp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + libsteam_api64.dylib + PreserveNewest + + + + + PreserveNewest + + + + + + $(IntermediateOutputPath)gitver + $(IntermediateOutputPath)gitbranch + + + + + + + + + + + + + + + + + + @(GitVersion) + + + + + + + + + @(GitBranch) + + + + + + + $(IntermediateOutputPath)CustomAssemblyInfo.cs + + + + + + + + + <_Parameter1>GitRevision + <_Parameter2>$(BuildHash) + + + <_Parameter1>GitBranch + <_Parameter2>$(BuildBranch) + + + <_Parameter1>ProjectDir + <_Parameter2>$(ProjectDir) + + + + + + + + osx-x64 + + + + \ No newline at end of file diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj index b9fecd89c..b17eb41f9 100644 --- a/Barotrauma/BarotraumaClient/WindowsClient.csproj +++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.18.0.0 + 0.18.1.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj.bak b/Barotrauma/BarotraumaClient/WindowsClient.csproj.bak new file mode 100644 index 000000000..b9fecd89c --- /dev/null +++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj.bak @@ -0,0 +1,237 @@ + + + + WinExe + netcoreapp3.1 + Barotrauma + FakeFish, Undertow Games + Barotrauma + 0.18.0.0 + Copyright © FakeFish 2018-2022 + AnyCPU;x64 + Barotrauma + ..\BarotraumaShared\Icon.ico + Debug;Release;Unstable + app.manifest + ;NU1605;CS0114;CS0108CS8597;CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8624;CS8625;CS8626;CS8629;CS8631;CS8632;CS8633;CS8634;CS8638;CS8643;CS8644;CS8645;CS8653;CS8654;CS8655;CS8667;CS8669;CS8670;CS8714;CS8717;CS8765 + + + + DEBUG;TRACE;CLIENT;WINDOWS;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + + + + TRACE;DEBUG;CLIENT;WINDOWS;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + full + true + Auto + + + + TRACE;CLIENT;WINDOWS;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + + + + TRACE;CLIENT;WINDOWS;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + true + + + + TRACE;CLIENT;WINDOWS;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + full + true + + + + TRACE;CLIENT;WINDOWS;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + full + true + true + + + + + + + + + SharedSource\Steam\AuthTicket.cs + + + SharedSource\Utils\Result.cs + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + SharedSource\Utils\Result + + + + + + + + + + + + Never + + + Never + + + Never + + + Never + + + Never + + + Never + + + Never + + + Never + + + + + + + + $(IntermediateOutputPath)gitver + $(IntermediateOutputPath)gitbranch + + + + + + + + + + + + + + + + + + @(GitVersion) + + + + + + + + + @(GitBranch) + + + + + + + $(IntermediateOutputPath)CustomAssemblyInfo.cs + + + + + + + + + <_Parameter1>GitRevision + <_Parameter2>$(BuildHash) + + + <_Parameter1>GitBranch + <_Parameter2>$(BuildBranch) + + + <_Parameter1>ProjectDir + <_Parameter2>$(ProjectDir) + + + + + + + + win-x64 + + + + \ No newline at end of file diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj index 0f61a36a8..2eedc6301 100644 --- a/Barotrauma/BarotraumaServer/LinuxServer.csproj +++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.18.0.0 + 0.18.1.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj.bak b/Barotrauma/BarotraumaServer/LinuxServer.csproj.bak new file mode 100644 index 000000000..ab1e78f08 --- /dev/null +++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj.bak @@ -0,0 +1,156 @@ + + + + Exe + netcoreapp3.1 + Barotrauma + FakeFish, Undertow Games + Barotrauma Dedicated Server + 0.18.0.0 + Copyright © FakeFish 2018-2022 + AnyCPU;x64 + DedicatedServer + ..\BarotraumaShared\Icon.ico + Debug;Release;Unstable + ;NU1605;CS0114;CS0108CS8597;CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8624;CS8625;CS8626;CS8629;CS8631;CS8632;CS8633;CS8634;CS8638;CS8643;CS8644;CS8645;CS8653;CS8654;CS8655;CS8667;CS8669;CS8670;CS8714;CS8717;CS8765 + + + + + + DEBUG;TRACE;SERVER;LINUX;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + net6.0 + 8 + + + + TRACE;DEBUG;SERVER;LINUX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + net6.0 + 8 + + + + TRACE;SERVER;LINUX;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + + + + TRACE;SERVER;LINUX;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + true + + + + TRACE;SERVER;LINUX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + + + + TRACE;SERVER;LINUX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Linux\ + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(IntermediateOutputPath)gitver + $(IntermediateOutputPath)gitbranch + + + + + + + + + + + + + + + + + + @(GitVersion) + + + + + + + + + @(GitBranch) + + + + + + + $(IntermediateOutputPath)CustomAssemblyInfo.cs + + + + + + + + + <_Parameter1>GitRevision + <_Parameter2>$(BuildHash) + + + <_Parameter1>GitBranch + <_Parameter2>$(BuildBranch) + + + <_Parameter1>ProjectDir + <_Parameter2>$(ProjectDir) + + + + + + + diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj index 75305843b..41800c1ca 100644 --- a/Barotrauma/BarotraumaServer/MacServer.csproj +++ b/Barotrauma/BarotraumaServer/MacServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.18.0.0 + 0.18.1.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj.bak b/Barotrauma/BarotraumaServer/MacServer.csproj.bak new file mode 100644 index 000000000..105be0054 --- /dev/null +++ b/Barotrauma/BarotraumaServer/MacServer.csproj.bak @@ -0,0 +1,157 @@ + + + + Exe + netcoreapp3.1 + Barotrauma + FakeFish, Undertow Games + Barotrauma Dedicated Server + 0.18.0.0 + Copyright © FakeFish 2018-2022 + AnyCPU;x64 + DedicatedServer + ..\BarotraumaShared\Icon.ico + Debug;Release;Unstable + ;NU1605;CS0114;CS0108CS8597;CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8624;CS8625;CS8626;CS8629;CS8631;CS8632;CS8633;CS8634;CS8638;CS8643;CS8644;CS8645;CS8653;CS8654;CS8655;CS8667;CS8669;CS8670;CS8714;CS8717;CS8765 + + + + TRACE;SERVER;OSX;USE_STEAM;DEBUG;NETCOREAPP;NETCOREAPP3_0 + x64 + ..\bin\DebugMac + true + + + + + TRACE;DEBUG;SERVER;OSX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Mac\ + + + + TRACE;SERVER;OSX;USE_STEAM;RELEASE;NETCOREAPP;NETCOREAPP3_0 + x64 + + ..\bin\ReleaseMac + + + + TRACE;SERVER;OSX;USE_STEAM;RELEASE;NETCOREAPP;NETCOREAPP3_0;UNSTABLE + x64 + + ..\bin\ReleaseMac + true + + + + TRACE;SERVER;OSX;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Mac\ + + + + TRACE;SERVER;OSX;X64;USE_STEAM;UNSTABLE + x64 + ..\bin\$(Configuration)Mac\ + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + libsteam_api64.dylib + PreserveNewest + + + + + + $(IntermediateOutputPath)gitver + $(IntermediateOutputPath)gitbranch + + + + + + + + + + + + + + + + + + @(GitVersion) + + + + + + + + + @(GitBranch) + + + + + + + $(IntermediateOutputPath)CustomAssemblyInfo.cs + + + + + + + + + <_Parameter1>GitRevision + <_Parameter2>$(BuildHash) + + + <_Parameter1>GitBranch + <_Parameter2>$(BuildBranch) + + + <_Parameter1>ProjectDir + <_Parameter2>$(ProjectDir) + + + + + + + diff --git a/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/MultiPlayerCampaign.cs b/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/MultiPlayerCampaign.cs index 858cb5b29..89ed9f0dc 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/MultiPlayerCampaign.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/GameSession/GameModes/MultiPlayerCampaign.cs @@ -930,7 +930,7 @@ namespace Barotrauma { if (transfer.Receiver is Some { Value: var receiverId } && receiverId == sender.CharacterID) { - if (transfer.Amount > GameMain.Server.ServerSettings.MaximumTransferRequest) { return; } + if (transfer.Amount > GameMain.Server.ServerSettings.MaximumMoneyTransferRequest) { return; } GameMain.Server.Voting.StartTransferVote(sender, null, transfer.Amount, sender); GameServer.Log($"{sender.Name} started a vote to transfer {transfer.Amount} mk from the bank.", ServerLog.MessageType.Money); } diff --git a/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs b/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs index effeb21a5..8b3b20d36 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs @@ -2465,6 +2465,7 @@ namespace Barotrauma.Networking msg.Write(serverSettings.LockAllDefaultWires); msg.Write(serverSettings.AllowRagdollButton); msg.Write(serverSettings.AllowLinkingWifiToChat); + msg.Write(serverSettings.MaximumMoneyTransferRequest); msg.Write(IsUsingRespawnShuttle()); msg.Write((byte)serverSettings.LosMode); msg.Write(includesFinalize); msg.WritePadBits(); diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj index c5f7034cc..d83075d47 100644 --- a/Barotrauma/BarotraumaServer/WindowsServer.csproj +++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.18.0.0 + 0.18.1.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj.bak b/Barotrauma/BarotraumaServer/WindowsServer.csproj.bak new file mode 100644 index 000000000..0fbb606a7 --- /dev/null +++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj.bak @@ -0,0 +1,152 @@ + + + + Exe + netcoreapp3.1 + Barotrauma + FakeFish, Undertow Games + Barotrauma Dedicated Server + 0.18.0.0 + Copyright © FakeFish 2018-2022 + AnyCPU;x64 + DedicatedServer + ..\BarotraumaShared\Icon.ico + Debug;Release;Unstable + ;NU1605;CS0114;CS0108CS8597;CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8624;CS8625;CS8626;CS8629;CS8631;CS8632;CS8633;CS8634;CS8638;CS8643;CS8644;CS8645;CS8653;CS8654;CS8655;CS8667;CS8669;CS8670;CS8714;CS8717;CS8765 + + + + DEBUG;TRACE;SERVER;WINDOWS;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + + + + TRACE;DEBUG;SERVER;WINDOWS;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + full + true + + + + TRACE;SERVER;WINDOWS;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + + + + TRACE;SERVER;WINDOWS;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + true + + + + TRACE;SERVER;WINDOWS;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + full + true + + + + TRACE;SERVER;WINDOWS;X64;USE_STEAM + x64 + ..\bin\$(Configuration)Windows\ + full + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(IntermediateOutputPath)gitver + $(IntermediateOutputPath)gitbranch + + + + + + + + + + + + + + + + + + @(GitVersion) + + + + + + + + + @(GitBranch) + + + + + + + $(IntermediateOutputPath)CustomAssemblyInfo.cs + + + + + + + + + <_Parameter1>GitRevision + <_Parameter2>$(BuildHash) + + + <_Parameter1>GitBranch + <_Parameter2>$(BuildBranch) + + + <_Parameter1>ProjectDir + <_Parameter2>$(ProjectDir) + + + + + + + diff --git a/Barotrauma/BarotraumaShared/SharedSource/GameSession/AutoItemPlacer.cs b/Barotrauma/BarotraumaShared/SharedSource/GameSession/AutoItemPlacer.cs index 733238123..a421a0be1 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/GameSession/AutoItemPlacer.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/GameSession/AutoItemPlacer.cs @@ -18,11 +18,14 @@ namespace Barotrauma bool skipMainSubs = GameMain.GameSession.GameMode is CampaignMode { IsFirstRound: false }; if (!skipMainSubs) { + if (Submarine.MainSub is Submarine mainSub && mainSub.Info.IsPlayer) + { + SpawnStartItems(mainSub); + } for (int i = 0; i < Submarine.MainSubs.Length; i++) { var sub = Submarine.MainSubs[i]; if (sub == null || sub.Info.InitialSuppliesSpawned) { continue; } - SpawnStartItems(sub); var subs = sub.GetConnectedSubs().Where(s => s.TeamID == sub.TeamID); CreateAndPlace(subs); subs.ForEach(s => s.Info.InitialSuppliesSpawned = true); @@ -79,7 +82,6 @@ namespace Barotrauma return; } initialSpawnPos = spawnHull; - } else { diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs index dd88b19f1..a95f15214 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs @@ -388,7 +388,7 @@ namespace Barotrauma.Items.Components IsActive = isActive; } - public void SetRequiredItems(ContentXElement element) + public void SetRequiredItems(ContentXElement element, bool allowEmpty = false) { bool returnEmpty = false; #if CLIENT @@ -410,7 +410,7 @@ namespace Barotrauma.Items.Components requiredItems[ri.Type].Add(ri); } } - else + else if (!allowEmpty) { DebugConsole.ThrowError("Error in item config \"" + item.ConfigFilePath + "\" - component " + GetType().ToString() + " requires an item with no identifiers."); } diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs index 426a8d9ef..8b1831507 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs @@ -301,8 +301,12 @@ namespace Barotrauma /// public enum LevelGenStage { + LevelGenParams, + Size, GenStart, TunnelGen, + AbyssGen, + CaveGen, VoronoiGen, VoronoiGen2, VoronoiGen3, @@ -327,6 +331,11 @@ namespace Barotrauma equalityCheckValues[stage] = Rand.Int(int.MaxValue, Rand.RandSync.ServerAndClient); } + private void SetEqualityCheckValue(LevelGenStage stage, int value) + { + equalityCheckValues[stage] = value; + } + private void ClearEqualityCheckValues() { foreach (LevelGenStage stage in Enum.GetValues(typeof(LevelGenStage))) @@ -445,6 +454,9 @@ namespace Barotrauma } GenerateEqualityCheckValue(LevelGenStage.GenStart); + SetEqualityCheckValue(LevelGenStage.LevelGenParams, unchecked((int)GenerationParams.UintIdentifier)); + SetEqualityCheckValue(LevelGenStage.Size, borders.Width ^ borders.Height << 16); + GenerateEqualityCheckValue(LevelGenStage.TunnelGen); LevelObjectManager = new LevelObjectManager(); @@ -582,10 +594,12 @@ namespace Barotrauma } int sideTunnelCount = Rand.Range(GenerationParams.SideTunnelCount.X, GenerationParams.SideTunnelCount.Y + 1, Rand.RandSync.ServerAndClient); + for (int j = 0; j < sideTunnelCount; j++) { if (mainPath.Nodes.Count < 4) { break; } var validTunnels = Tunnels.FindAll(t => t.Type != TunnelType.Cave && t != startPath && t != endPath && t != endHole && t != abyssTunnel); + Tunnel tunnelToBranchOff = validTunnels[Rand.Int(validTunnels.Count, Rand.RandSync.ServerAndClient)]; if (tunnelToBranchOff == null) { tunnelToBranchOff = mainPath; } @@ -600,7 +614,13 @@ namespace Barotrauma CalculateTunnelDistanceField(null); GenerateSeaFloorPositions(); + + GenerateEqualityCheckValue(LevelGenStage.AbyssGen); + GenerateAbyssArea(); + + GenerateEqualityCheckValue(LevelGenStage.CaveGen); + GenerateCaves(mainPath); GenerateEqualityCheckValue(LevelGenStage.VoronoiGen); diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelGenerationParams.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelGenerationParams.cs index d4e56b2e1..bc380746d 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelGenerationParams.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelGenerationParams.cs @@ -584,7 +584,9 @@ namespace Barotrauma throw new InvalidOperationException("Level generation presets not found - using default presets"); } - var matchingLevelParams = LevelParams.Where(lp => + var levelParamsOrdered = LevelParams.OrderBy(l => l.UintIdentifier); + + var matchingLevelParams = levelParamsOrdered.Where(lp => lp.Type == type && (lp.AnyBiomeAllowed || lp.AllowedBiomeIdentifiers.Any()) && !lp.AllowedBiomeIdentifiers.Contains("None".ToIdentifier())); @@ -598,11 +600,11 @@ namespace Barotrauma if (!biome.IsEmpty) { //try to find params that at least have a suitable type - matchingLevelParams = LevelParams.Where(lp => lp.Type == type); + matchingLevelParams = levelParamsOrdered.Where(lp => lp.Type == type); if (!matchingLevelParams.Any()) { //still not found, give up and choose some params randomly - matchingLevelParams = LevelParams; + matchingLevelParams = levelParamsOrdered; } } } diff --git a/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs b/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs index 10e45816a..b5aae541a 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs @@ -911,7 +911,7 @@ namespace Barotrauma.Networking public LootedMoneyDestination LootedMoneyDestination { get; set; } [Serialize(999999, IsPropertySaveable.Yes)] - public int MaximumTransferRequest { get; set; } + public int MaximumMoneyTransferRequest { get; set; } private int maxMissionCount = CampaignSettings.DefaultMaxMissionCount; diff --git a/Barotrauma/BarotraumaShared/SharedSource/Serialization/SerializableProperty.cs b/Barotrauma/BarotraumaShared/SharedSource/Serialization/SerializableProperty.cs index 765a62374..99bb15486 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Serialization/SerializableProperty.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Serialization/SerializableProperty.cs @@ -1107,7 +1107,7 @@ namespace Barotrauma itemComponent.requiredItems.Clear(); itemComponent.DisabledRequiredItems.Clear(); - itemComponent.SetRequiredItems(element); + itemComponent.SetRequiredItems(element, allowEmpty: true); break; } } diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index 2942b8e72..adc356451 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,3 +1,15 @@ +--------------------------------------------------------------------------------------------------------- +v0.18.1.0 +--------------------------------------------------------------------------------------------------------- + +Unstable only: +- Fixed crashing when someone respawns while the tab menu is open. +- Fixed level equality errors in multiplayer game modes other than the campaign. +- Fixed headsets from pre-0.18 saves being unusable due to still having the battery requirement but no inventory to hold one. +- Fixed inability to put disposable diving suits in diving suit lockers. +- Fixed clients without money management permissions not being able to request money. +- Fixed context menus rendering behind the debug console. + --------------------------------------------------------------------------------------------------------- v0.18.0.0 --------------------------------------------------------------------------------------------------------- @@ -43,7 +55,7 @@ Changes and additions: - Improved tooltips in the wallet menu to make their function more clear. - Corpses can now be grabbed in singleplayer to loot money. - Made the crew wallet menu update when the players permissions change. -- Prevented selling items from submarine containers tagged with "donttakeitems", instead of "donttakeitems". +- Prevented selling items from submarine containers tagged with "dontsellitems", instead of "donttakeitems". - Removed merchant balance effect on item prices. - Replaced "item sell value" with the location reputation effect on the store interface.