diff --git a/.github/workflows/release-2.1.1.0.yml b/.github/workflows/release-2.1.1.0.yml new file mode 100644 index 0000000..5ec16db --- /dev/null +++ b/.github/workflows/release-2.1.1.0.yml @@ -0,0 +1,152 @@ +name: Release HelperProfiles 2.1.1.0 + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - .github/workflows/release-2.1.1.0.yml + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Repair stable release metadata + shell: bash + run: | + set -euo pipefail + python - <<'PY' + from pathlib import Path + import re + import xml.etree.ElementTree as ET + + path = Path('modDesc.xml') + text = path.read_text(encoding='utf-8') + before, marker, changelog = text.partition(' ') + if not marker: + raise SystemExit('Missing changelog section') + + german_lines = [ + 'Version 2.1.1.0:', + '- Textur-Atlas-Artefakte und Layout-Darstellungsfehler in den Ansichten Erscheinungsbilder und Helferliste wurden behoben.', + '- Integration API v7 wurde hinzugefügt; der bestehende Helferlisten- und Identitätsvertrag bleibt erhalten.', + '- Kompatible Mods wie Remote Dispatcher können einen Helfer vorübergehend und gezielt für einen einzelnen Einstellvorgang anfordern.', + '- Gezielte Anforderungen schlagen kontrolliert fehl, wenn ein Helfer fehlt, nicht im Kader ist oder bereits aktiv ist; es wird kein anderer Helfer stillschweigend eingesetzt.', + '- Gezielte Anforderungen ändern weder den normal ausgewählten Helfer noch den Einstellungsmodus von HelperProfiles.', + '' + ] + german_block = '\n'.join(german_lines) + + # Remove the accidentally inserted German 2.1.1.0 block from EN. + changelog = changelog.replace(german_block, '', 1) + + # Add it to the German changelog if it is not already present there. + de_match = re.search(r'', changelog, flags=re.S) + if de_match is None: + raise SystemExit('Missing German changelog') + de_body = de_match.group(1) + if 'Textur-Atlas-Artefakte' not in de_body: + replacement = '' + changelog = changelog[:de_match.start()] + replacement + changelog[de_match.end():] + + text = before + marker + changelog + path.write_text(text, encoding='utf-8') + + compat = Path('scripts/HP_Compatibility.lua') + ctext = compat.read_text(encoding='utf-8') + ctext = ctext.replace( + 'caused the 2.1.1.0 alpha to scan every loaded mod on every frame.', + 'caused the 2.1.0.0 alpha to scan every loaded mod on every frame.' + ) + compat.write_text(ctext, encoding='utf-8') + + root = ET.parse('modDesc.xml').getroot() + if root.findtext('version') != '2.1.1.0': + raise SystemExit('Unexpected modDesc version') + + repaired = path.read_text(encoding='utf-8') + _, _, repaired_changelog = repaired.partition(' ') + en = re.search(r'', repaired_changelog, flags=re.S).group(1) + de = re.search(r'', repaired_changelog, flags=re.S).group(1) + if 'Textur-Atlas-Artefakte' in en: + raise SystemExit('German release notes still present in English changelog') + if not de.lstrip().startswith('Version 2.1.1.0:'): + raise SystemExit('German changelog does not start with 2.1.1.0') + + api = Path('scripts/HP_IntegrationAPI.lua').read_text(encoding='utf-8') + for wanted in ['apiVersion = 7', 'modVersion = "2.1.1.0"', 'supportsScopedPreferredHire = true']: + if wanted not in api: + raise SystemExit('Missing API v7 marker: ' + wanted) + PY + + - name: Commit metadata corrections + shell: bash + run: | + set -euo pipefail + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add modDesc.xml scripts/HP_Compatibility.lua + if ! git diff --cached --quiet; then + git commit -m "Correct HelperProfiles 2.1.1.0 release metadata" + git push origin HEAD:main + fi + + - name: Validate package inputs + shell: bash + run: | + set -euo pipefail + test -f docs/releases/2.1.1.0.md + python - <<'PY' + import xml.etree.ElementTree as ET + for path in ['modDesc.xml', 'gui/HP_AppearanceBindingsScreen.xml', 'gui/HP_RosterManagerScreen.xml', 'gui/guiProfiles.xml']: + ET.parse(path) + PY + + - name: Build Farming Simulator mod package + shell: bash + run: | + set -euo pipefail + rm -f FS25_HelperProfiles.zip + zip -r FS25_HelperProfiles.zip modDesc.xml icon_helperProfiles.dds gui l10n scripts -x '*.DS_Store' '*__MACOSX*' + python - <<'PY' + import zipfile + import xml.etree.ElementTree as ET + with zipfile.ZipFile('FS25_HelperProfiles.zip', 'r') as archive: + names = set(archive.namelist()) + required = { + 'modDesc.xml', 'icon_helperProfiles.dds', + 'gui/HP_AppearanceBindingsScreen.xml', 'gui/HP_RosterManagerScreen.xml', + 'scripts/HelperProfiles.lua', 'scripts/HP_RosterState.lua', + 'scripts/HP_RosterFilter.lua', 'scripts/HP_RosterManagerScreen.lua', + 'scripts/HP_TabbedManagement.lua', 'scripts/HP_IntegrationAPI.lua' + } + missing = sorted(required - names) + if missing: + raise SystemExit('Missing required package files: ' + ', '.join(missing)) + root = ET.fromstring(archive.read('modDesc.xml')) + if root.findtext('version') != '2.1.1.0': + raise SystemExit('Unexpected packaged version') + PY + + - name: Publish or refresh GitHub release + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + TAG='2.1.1.0' + if gh release view "$TAG" >/dev/null 2>&1; then + gh release edit "$TAG" --title 'HelperProfiles 2.1.1.0' --notes-file docs/releases/2.1.1.0.md + gh release upload "$TAG" FS25_HelperProfiles.zip --clobber + else + gh release create "$TAG" FS25_HelperProfiles.zip --target main --title 'HelperProfiles 2.1.1.0' --notes-file docs/releases/2.1.1.0.md + fi diff --git a/README.md b/README.md index e27ac6e..9f15c69 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,18 @@ **FS25 HelperProfiles** is a single-player helper-management mod for Farming Simulator 25. It expands the standard helper roster to 20 permanent worker identities, provides deterministic helper selection, adds per-save ON/OFF roster management, displays an autosizing helper overlay, and supports save-specific AvatarSwitcher appearance bindings. -> **Current version:** `2.1.0.0` +> **Current version:** `2.1.1.0` > **Game:** Farming Simulator 25 > **Multiplayer:** Not supported +## Highlights in 2.1.1.0 + +- Fixes Helper Management texture-atlas bleed and layout rendering in the appearance and roster screens. +- Adds **Integration API v7** while retaining the existing A–T roster and identity contract. +- Adds a temporary, scoped preferred-worker hire capability for compatible mods such as **Remote Dispatcher**. +- Scoped worker requests are fail-closed: missing, OFF-roster or already-active workers are rejected rather than silently replaced. +- Scoped requests do not change the worker selected in the normal HelperProfiles overlay or the active hiring mode. + ## Highlights in 2.1.0.0 - Expands the managed helper identity pool from **A–J** to **A–T**. @@ -33,6 +41,7 @@ - Optional read-only HelperPayroll role information. - Per-save roster availability stored independently from appearance and payroll data. - Console commands for selection, diagnostics, roster management and overlay configuration. +- Integration API v7 for compatible companion mods, including scoped preferred-worker hiring. ## Screenshots @@ -351,6 +360,13 @@ Confirm HelperPayroll `0.4.2.0` or later is enabled for the same savegame and th ## Version History +### Version 2.1.1.0 + +- Fixed Helper Management atlas/layout rendering issues. +- Added Integration API v7 with scoped preferred-worker hiring. +- Preserved the existing roster/identity API contract for compatible integrations. +- Added fail-closed named-worker requests without changing normal HelperProfiles selection. + ### Version 2.1.0.0 - Expanded the helper identity pool to A–T. @@ -371,7 +387,7 @@ Confirm HelperPayroll `0.4.2.0` or later is enabled for the same savegame and th ## Development Status -Version `2.1.0.0` is the validated release of the A–T identity pool, per-save roster availability manager and tabbed Helper Management interface. +Version `2.1.1.0` is the current stable maintenance release of the A–T identity pool, per-save roster availability manager and tabbed Helper Management interface, with Integration API v7 available for compatible companion mods. A future HelperPayroll update may optionally filter or mark OFF-roster workers in its Workers tab while preserving payroll history and assignments. diff --git a/docs/releases/2.1.1.0.md b/docs/releases/2.1.1.0.md new file mode 100644 index 0000000..b9a2648 --- /dev/null +++ b/docs/releases/2.1.1.0.md @@ -0,0 +1,29 @@ +# HelperProfiles 2.1.1.0 + +HelperProfiles 2.1.1.0 is a stable maintenance and integration update for the validated 2.1.x A–T helper roster. + +## Changes + +- Fixed texture-atlas bleed and layout rendering in the Helper Management appearance and roster screens. +- Added **Integration API v7** while retaining the existing permanent-slot, identity and roster-state API contract. +- Added temporary **scoped preferred-worker hiring** for compatible companion mods such as Remote Dispatcher. +- Scoped worker requests are fail-closed: a missing, OFF-roster or already-active worker is rejected rather than silently replaced by another worker. +- Scoped requests do not change the worker selected in the normal HelperProfiles overlay and do not change the user's HelperProfiles hiring mode. + +## Remote Dispatcher integration + +Remote Dispatcher can use API v7 to bind a prepared vehicle to a specific HelperProfiles worker. The preference exists only for the synchronous helper-hire call and is then released immediately. HelperProfiles remains the owner of the roster and normal worker-selection behaviour outside that scope. + +Remote Dispatcher remains optional; HelperProfiles does not require it. + +## Compatibility + +- Single-player only. +- AvatarSwitcher remains optional. +- HelperPayroll remains optional. +- Hired Helper Tool remains incompatible because it also owns the helper roster. +- Existing HelperProfiles 2.1.0.0 save data and per-save roster/appearance files remain compatible. + +## Installation + +Download `FS25_HelperProfiles.zip` and place it directly in the Farming Simulator 25 mods folder. Do not unpack it. diff --git a/gui/HP_AppearanceBindingsScreen.xml b/gui/HP_AppearanceBindingsScreen.xml index 5164835..ac04bf3 100644 --- a/gui/HP_AppearanceBindingsScreen.xml +++ b/gui/HP_AppearanceBindingsScreen.xml @@ -22,10 +22,9 @@ - + - - + @@ -37,10 +36,9 @@ - + - - + @@ -52,11 +50,10 @@ - + - - + @@ -69,11 +66,10 @@ - + - - + diff --git a/gui/HP_RosterManagerScreen.xml b/gui/HP_RosterManagerScreen.xml index 66d4bbc..0e9c495 100644 --- a/gui/HP_RosterManagerScreen.xml +++ b/gui/HP_RosterManagerScreen.xml @@ -22,15 +22,14 @@ - + - - + @@ -47,11 +46,10 @@ - + - - + diff --git a/gui/HP_WorldWorkerScreen.xml b/gui/HP_WorldWorkerScreen.xml index 64962a1..2bd8851 100644 --- a/gui/HP_WorldWorkerScreen.xml +++ b/gui/HP_WorldWorkerScreen.xml @@ -57,6 +57,8 @@