diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index fdfbbf5b..f4b22527 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -5,8 +5,7 @@ on: types: [game_version_update, game_version_update_patch] push: branches: - - master - - dev + - v4.3.16 paths: - '.github/workflows/test-and-publish.yml' - 'src/**' @@ -14,7 +13,7 @@ on: - 'tests/**' pull_request: branches: - - dev + - v4.3.16 # will be triggereg when undrafting or requesting review types: [review_requested, ready_for_review] paths: @@ -95,14 +94,14 @@ jobs: # ignore Stable_Release and treat is as Release - name: Build MCM (Release) - if: ${{ github.ref == 'refs/heads/master' }} + #if: ${{ github.ref == 'refs/heads/master' }} run: >- mkdir bannerlord-publish; dotnet build src/MCM.Publish/MCM.Publish.csproj --configuration Stable_Release -p:GameFolder="$PWD/bannerlord-publish"; shell: pwsh - name: Upload Bannerlord folder - if: ${{ github.ref == 'refs/heads/master' }} + #if: ${{ github.ref == 'refs/heads/master' }} uses: actions/upload-artifact@v2 with: name: bannerlord @@ -115,7 +114,7 @@ jobs: publish-on-nuget: name: Publish on NuGet runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' }} + #if: ${{ github.ref == 'refs/heads/master' }} needs: test steps: - name: Setup @@ -155,79 +154,13 @@ jobs: done shell: bash -########################### -# NEXUS # -########################### - publish-on-nexusmods: - name: Publish on NexusMods - runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && false }} - needs: test - steps: - - name: Setup - uses: butr/actions-common-setup@v2.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - - - name: Download bannerlord folder - uses: actions/download-artifact@v2 - with: - name: bannerlord - path: ./bannerlord - - - name: Zip MCM.Standalone - run: 7z a -t7z MCM.Standalone.7z ./bannerlord/* - #shell: pwsh - # pwsh casues it to include the root folder - - - name: Install Bannerlord.ChangelogParser and Bannerlord.NexusmodsUploader - run: >- - dotnet tool install -g Bannerlord.ChangelogParser; - dotnet tool install -g Bannerlord.NexusmodsUploader; - shell: pwsh - - - name: Run ChangelogParser - id: changelog - run: | - vers="$(bannerlord_changelog_parser latestversion -f "$PWD/changelog.txt")" - echo "::set-output name=mod_version::$vers" - desc="$(bannerlord_changelog_parser fulldescription -f "$PWD/changelog.txt")" - desc="${desc//'%'/'%25'}" - desc="${desc//$'\n'/'%0A'}" - desc="${desc//$'\r'/'%0D'}" - echo "::set-output name=mod_description::$desc" - shell: bash - - - name: Start Selenoid - uses: Xotabu4/selenoid-github-action@v1 - - - name: Run NexusmodsUploader - run: >- - bannerlord_nexusmods_uploader upload -g mountandblade2bannerlord -m 612 -n "Mod Configuration Menu" - -v "v${{steps.changelog.outputs.mod_version}}" -l true -e true -d "${{steps.changelog.outputs.mod_description}}" - -p "$PWD/MCM.Standalone.7z"; - env: - NEXUSMODS_COOKIES_JSON: '${{secrets.NEXUSMODS_COOKIES_JSON}}' - shell: pwsh - - - name: Password protect Screenshots - run: 7z a -p${{secrets.SCREENSHOTS_PASSWORD}} Screenshots.7z ./Screenshots/* - #shell: pwsh - # pwsh casues it to include the root folder - - - name: Upload Screenshots Artifact - uses: actions/upload-artifact@v2 - with: - name: Screenshots - path: Screenshots.7z - ########################### # GITHUB # ########################### publish-on-github: name: Publish on GitHub runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' }} + #if: ${{ github.ref == 'refs/heads/master' }} needs: test steps: - name: Setup diff --git a/build/common.props b/build/common.props index 232ead4e..521f6c8f 100644 --- a/build/common.props +++ b/build/common.props @@ -3,7 +3,7 @@ 1.4.3 - 4.3.23 + 4.3.24 2.1.1 1.0.31 2.1.8 diff --git a/changelog.txt b/changelog.txt index 1b4d8632..21590c21 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,8 @@ --------------------------------------------------------------------------------------------------- +Version: 4.3.24 +Game Versions: e1.4.3,e1.5.0,e1.5.1,e1.5.2,e1.5.3,e1.5.4,e1.5.5,e1.5.6,e1.5.7,e1.5.8,e1.5.9,e1.5.10,e1.6.0,e1.6.1,e1.6.2,e1.6.3,e1.6.4,e1.6.5,e1.7.0,e1.7.1 +* Backported freezing textbox bug +--------------------------------------------------------------------------------------------------- Version: 4.3.23 Game Versions: e1.4.3,e1.5.0,e1.5.1,e1.5.2,e1.5.3,e1.5.4,e1.5.5,e1.5.6,e1.5.7,e1.5.8,e1.5.9,e1.5.10,e1.6.0,e1.6.1,e1.6.2,e1.6.3,e1.6.4,e1.6.5,e1.7.0,e1.7.1 * Sandbox settings creation diff --git a/src/MCM.UI/GUI/ViewModels/SettingsPropertyVM.cs b/src/MCM.UI/GUI/ViewModels/SettingsPropertyVM.cs index 8b000f84..e106079d 100644 --- a/src/MCM.UI/GUI/ViewModels/SettingsPropertyVM.cs +++ b/src/MCM.UI/GUI/ViewModels/SettingsPropertyVM.cs @@ -86,7 +86,8 @@ public float FloatValue get => IsFloatVisible ? PropertyReference.Value is float val ? val : float.MinValue : 0f; set { - if (IsFloatVisible && FloatValue != value) + value = Math.Max(Math.Min(value, MaxValue), MinValue); + if (IsFloatVisible && Math.Abs(FloatValue - value) >= Constants.Tolerance) // Todo: check other float comparisons { URS.Do(new SetValueTypeAction(PropertyReference, value)); OnPropertyChanged(nameof(FloatValue)); @@ -100,6 +101,7 @@ public int IntValue get => IsIntVisible ? PropertyReference.Value is int val ? val : int.MinValue : 0; set { + value = (int) Math.Max(Math.Min(value, MaxValue), MinValue); if (IsIntVisible && IntValue != value) { URS.Do(new SetValueTypeAction(PropertyReference, value)); diff --git a/src/MCM.UI/MCM.UI.csproj b/src/MCM.UI/MCM.UI.csproj index d2c818d2..c50c130d 100644 --- a/src/MCM.UI/MCM.UI.csproj +++ b/src/MCM.UI/MCM.UI.csproj @@ -56,7 +56,7 @@ - <_SDKImplicitReference Include="System.Windows.Forms" /> + diff --git a/src/MCM/Constants.cs b/src/MCM/Constants.cs new file mode 100644 index 00000000..3f28b18f --- /dev/null +++ b/src/MCM/Constants.cs @@ -0,0 +1,7 @@ +namespace MCM +{ + public class Constants + { + public static float Tolerance = 0.000_001f; + } +} \ No newline at end of file