From 0d10e6118ea2f6ced0234a838ad36095ff4104c2 Mon Sep 17 00:00:00 2001 From: Zhenhuan Li Date: Wed, 24 Aug 2022 23:09:18 +0800 Subject: [PATCH] Update workflow and update reference to MissionLibrary --- .github/resources/FileFilters.regexp | 10 ++++----- .github/resources/config.env | 4 ++-- .github/workflows/Build.yml | 22 ++++++++++++++----- source/CinematicCamera/CinematicCamera.csproj | 3 +++ .../Modules/CinematicCamera/SubModule.xml | 14 ++++++------ .../src/CinematicCameraSubModule.cs | 4 ++-- .../CinematicCameraOptionClassFactory.cs | 2 +- .../MissionBehaviors/SetPlayerHealthLogic.cs | 8 +++---- .../ViewModel/CinematicCameraMenuVM.cs | 2 +- .../src/MissionStartingHandler.cs | 6 ++--- source/library/mission-library | 2 +- 11 files changed, 45 insertions(+), 32 deletions(-) diff --git a/.github/resources/FileFilters.regexp b/.github/resources/FileFilters.regexp index 56c1ba7..bd0841a 100644 --- a/.github/resources/FileFilters.regexp +++ b/.github/resources/FileFilters.regexp @@ -1,5 +1,5 @@ -bin\\Win64_Shipping_Client\\(?<=\\)[^\\]*TaleWorlds.+ -Modules\\CustomBattle\\bin\\Win64_Shipping_Client\\(?<=\\)[^\\]+dll -Modules\\SandBox\\bin\\Win64_Shipping_Client\\(?<=\\)[^\\]+dll -Modules\\SandBoxCore\\bin\\Win64_Shipping_Client\\(?<=\\)[^\\]+dll -Modules\\StoryMode\\bin\\Win64_Shipping_Client\\(?<=\\)[^\\]+dll +regex:bin/Win64_Shipping_Client/(?<=/)[^/]*TaleWorlds.+ +regex:Modules/CustomBattle/bin/Win64_Shipping_Client/(?<=/)[^/]+dll +regex:Modules/SandBox/bin/Win64_Shipping_Client/(?<=/)[^/]+dll +regex:Modules/SandBoxCore/bin/Win64_Shipping_Client/(?<=/)[^/]+dll +regex:Modules/StoryMode/bin/Win64_Shipping_Client/(?<=/)[^/]+dll \ No newline at end of file diff --git a/.github/resources/config.env b/.github/resources/config.env index 0f82549..26a4931 100644 --- a/.github/resources/config.env +++ b/.github/resources/config.env @@ -1,3 +1,3 @@ -GAME_VERSION=e1.6.1 +GAME_VERSION=e1.7.2 GAME_BRANCH=master -MOD_VERSION=e1.0.8 +MOD_VERSION=e1.0.9 diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 012570a..b69c888 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -68,6 +68,13 @@ jobs: with: dotnet-version: '2.2.x' + # additional .net core for DepotDownloader. + - name: Setup .NET Core 6.0.x + uses: actions/setup-dotnet@master + with: + dotnet-version: '6.0.x' + + - name: setup-msbuild uses: microsoft/setup-msbuild@v1 # with: @@ -80,21 +87,24 @@ jobs: # uses: NuGet/setup-nuget@04b0c2b8d1b97922f67eca497d7cf0bf17b8ffe1 uses: NuGet/setup-nuget@v1.0.5 - - name: Download DepotDownloader_2.3.6 + - name: Download DepotDownloader_2.4.7 uses: i3h/download-release-asset@v1 with: owner: SteamRE repo: DepotDownloader - tag: DepotDownloader_2.3.6 - file: depotdownloader-2.3.6.zip - - name: Extract DepotDownloader_2.3.6 + tag: DepotDownloader_2.4.7 + file: depotdownloader-2.4.7.zip + - name: Extract DepotDownloader_2.4.7 uses: DuckSoft/extract-7z-action@v1.0 with: - pathSource: depotdownloader-2.3.6.zip + pathSource: depotdownloader-2.4.7.zip pathTarget: depotdownloader - - name: Download Bannerlord binaries + - name: Download Bannerlord binaries 1 run: dotnet depotdownloader/DepotDownloader.dll -app 261550 -depot 261551 -beta ${{steps.dotenv.outputs.game_version}} -username ${{secrets.STEAM_LOGIN}} -password ${{secrets.STEAM_PASSWORD}} -filelist ./.github/resources/FileFilters.regexp -dir bannerlord; + + - name: Download Bannerlord binaries 2 + run: dotnet depotdownloader/DepotDownloader.dll -app 261550 -depot 261552 -beta ${{steps.dotenv.outputs.game_version}} -username ${{secrets.STEAM_LOGIN}} -password ${{secrets.STEAM_PASSWORD}} -filelist ./.github/resources/FileFilters.regexp -dir bannerlord; - name: Build Cinematic Camera run: >- diff --git a/source/CinematicCamera/CinematicCamera.csproj b/source/CinematicCamera/CinematicCamera.csproj index d57b4eb..d8841b3 100644 --- a/source/CinematicCamera/CinematicCamera.csproj +++ b/source/CinematicCamera/CinematicCamera.csproj @@ -128,6 +128,9 @@ $(GamePath)bin\Win64_Shipping_Client\TaleWorlds.ObjectSystem.dll + + $(GamePath)bin\Win64_Shipping_Client\TaleWorlds.ScreenSystem.dll + $(GamePath)bin\Win64_Shipping_Client\TaleWorlds.TwoDimension.dll diff --git a/source/CinematicCamera/Modules/CinematicCamera/SubModule.xml b/source/CinematicCamera/Modules/CinematicCamera/SubModule.xml index 0f9b18d..b9b7146 100644 --- a/source/CinematicCamera/Modules/CinematicCamera/SubModule.xml +++ b/source/CinematicCamera/Modules/CinematicCamera/SubModule.xml @@ -2,16 +2,16 @@ - + - - - - - - + + + + + + diff --git a/source/CinematicCamera/src/CinematicCameraSubModule.cs b/source/CinematicCamera/src/CinematicCameraSubModule.cs index 316ea94..1061b87 100644 --- a/source/CinematicCamera/src/CinematicCameraSubModule.cs +++ b/source/CinematicCamera/src/CinematicCameraSubModule.cs @@ -58,9 +58,9 @@ private bool SecondInitialize() return true; } - public override void OnMissionBehaviourInitialize(Mission mission) + public override void OnMissionBehaviorInitialize(Mission mission) { - base.OnMissionBehaviourInitialize(mission); + base.OnMissionBehaviorInitialize(mission); ModifyCameraHelper.OnBehaviourInitialize(); } diff --git a/source/CinematicCamera/src/Config/CinematicCameraOptionClassFactory.cs b/source/CinematicCamera/src/Config/CinematicCameraOptionClassFactory.cs index 24813d6..c68b896 100644 --- a/source/CinematicCamera/src/Config/CinematicCameraOptionClassFactory.cs +++ b/source/CinematicCamera/src/Config/CinematicCameraOptionClassFactory.cs @@ -23,7 +23,7 @@ public static IIdProvider CreateOptionClassProvider(IMenuClassColl cameraOptionCategory.AddOption(new ActionOptionViewModel(GameTexts.FindText("str_cinematic_camera_open_menu"), null, () => { - Mission.Current.GetMissionBehaviour()?.ActivateMenu(); + Mission.Current.GetMissionBehavior()?.ActivateMenu(); })); optionClass.AddOptionCategory(0, cameraOptionCategory); diff --git a/source/CinematicCamera/src/MissionBehaviors/SetPlayerHealthLogic.cs b/source/CinematicCamera/src/MissionBehaviors/SetPlayerHealthLogic.cs index 82f326a..6bbc78a 100644 --- a/source/CinematicCamera/src/MissionBehaviors/SetPlayerHealthLogic.cs +++ b/source/CinematicCamera/src/MissionBehaviors/SetPlayerHealthLogic.cs @@ -9,17 +9,17 @@ public class SetPlayerHealthLogic : MissionLogic { private readonly CinematicCameraConfig _config = CinematicCameraConfig.Get(); - public override void OnBehaviourInitialize() + public override void OnBehaviorInitialize() { - base.OnBehaviourInitialize(); + base.OnBehaviorInitialize(); Mission.OnMainAgentChanged += Mission_OnMainAgentChanged; MissionEvent.MainAgentWillBeChangedToAnotherOne += MainAgentWillBeChangedToAnotherOne; } - public override void OnRemoveBehaviour() + public override void OnRemoveBehavior() { - base.OnRemoveBehaviour(); + base.OnRemoveBehavior(); Mission.OnMainAgentChanged -= Mission_OnMainAgentChanged; MissionEvent.MainAgentWillBeChangedToAnotherOne -= MainAgentWillBeChangedToAnotherOne; diff --git a/source/CinematicCamera/src/MissionBehaviors/ViewModel/CinematicCameraMenuVM.cs b/source/CinematicCamera/src/MissionBehaviors/ViewModel/CinematicCameraMenuVM.cs index eeb3dd0..114b1d9 100644 --- a/source/CinematicCamera/src/MissionBehaviors/ViewModel/CinematicCameraMenuVM.cs +++ b/source/CinematicCamera/src/MissionBehaviors/ViewModel/CinematicCameraMenuVM.cs @@ -11,7 +11,7 @@ public class CinematicCameraMenuVM : MissionMenuVMBase private readonly CinematicCameraConfig _config = CinematicCameraConfig.Get(); private readonly SetPlayerHealthLogic _setPlayerHealthLogic = - Mission.Current.GetMissionBehaviour(); + Mission.Current.GetMissionBehavior(); private NumericVM _verticalFov; //private NumericVM _zoom; diff --git a/source/CinematicCamera/src/MissionStartingHandler.cs b/source/CinematicCamera/src/MissionStartingHandler.cs index c27774c..13546fb 100644 --- a/source/CinematicCamera/src/MissionStartingHandler.cs +++ b/source/CinematicCamera/src/MissionStartingHandler.cs @@ -1,7 +1,7 @@ using CinematicCamera.MissionBehaviors; -using System.Collections.Generic; using MissionLibrary.Controller; using MissionSharedLibrary.Controller; +using System.Collections.Generic; using TaleWorlds.MountAndBlade; using TaleWorlds.MountAndBlade.View.Missions; @@ -11,7 +11,7 @@ public class MissionStartingHandler : AMissionStartingHandler { public override void OnCreated(MissionView entranceView) { - List list = new List + List list = new List { new SetPlayerHealthLogic(), new CinematicCameraMenuView() @@ -20,7 +20,7 @@ public override void OnCreated(MissionView entranceView) foreach (var missionBehaviour in list) { - MissionStartingManager.AddMissionBehaviour(entranceView, missionBehaviour); + MissionStartingManager.AddMissionBehavior(entranceView, missionBehaviour); } } diff --git a/source/library/mission-library b/source/library/mission-library index 891304d..358df5f 160000 --- a/source/library/mission-library +++ b/source/library/mission-library @@ -1 +1 @@ -Subproject commit 891304d104b0b7644975649c0d4916c85cc67aa0 +Subproject commit 358df5f12bf65769941b5f1cb3a4158497be33b0