Skip to content

Commit cc057e0

Browse files
Release classic 4.2.1 hotfix for FS 1.21 copyFile log spam.
Stamp classic mod zips as 3.4.0.7 without changing the RF working-tree modDesc, and refresh plain-English update notes for GitHub/itch. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent bd2cd92 commit cc057e0

14 files changed

Lines changed: 547 additions & 150 deletions

FS25_FarmDashboard_App/package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "fs25-farm-dashboard",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"license": "SEE LICENSE IN LICENSE",
55
"description": "Real-time Farm Management Dashboard for FS25",
66
"author": "JoshWalki / Wizardlypayload & WizardlyPayload",
77
"main": "main.js",
88
"scripts": {
99
"test": "jest",
10-
"test:mjs": "node --test tests/baleInventory.test.mjs tests/rules-engine-roll-weed.test.mjs tests/vehicleAds.breakdown.test.mjs tests/fieldGrassMown.test.mjs tests/vehicleStoreImage.test.mjs tests/vehicleFarmScope.test.mjs tests/storageEconomy.test.mjs tests/navbarConnectionBadge.test.mjs tests/livestock.fmtAge.test.mjs",
10+
"test:mjs": "node --test tests/*.test.mjs",
1111
"test:all": "npm test && npm run test:mjs",
1212
"parity": "node ../tools/app/parity.js",
1313
"export-fields-csv": "node ../tools/app/export-fields-to-csv.mjs",
@@ -17,11 +17,15 @@
1717
"clean:build-out:search": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File ../tools/app/remove-build-output-folders.ps1 -StopWindowsSearch",
1818
"start": "electron .",
1919
"start:dev": "node ../tools/app/start-dev-electron.mjs",
20+
"start:dev:sync": "node ../tools/app/start-dev-electron.mjs --sync-config",
21+
"start:new-ui": "node ../tools/app/start-dev-electron.mjs --sync-config",
2022
"pack": "node ../tools/app/run-electron-builder.mjs pack",
23+
"pack:rf": "node ../tools/app/run-electron-builder.mjs pack --rf",
2124
"pack:in-repo": "electron-builder --dir",
2225
"pack:fresh": "node ../tools/app/electron-builder-fresh-output.mjs pack",
2326
"pack:alt": "electron-builder --dir --config.directories.output=electron-pack-out-alt",
2427
"dist": "node ../tools/app/run-electron-builder.mjs dist",
28+
"dist:rf": "node ../tools/app/run-electron-builder.mjs dist --rf",
2529
"dist:in-repo": "electron-builder --win",
2630
"dist:fresh": "node ../tools/app/electron-builder-fresh-output.mjs dist",
2731
"dist:alt": "electron-builder --win --config.directories.output=electron-pack-out-alt",
@@ -34,7 +38,10 @@
3438
"i18n:sync": "node web/locales/sync-keys-from-en.mjs",
3539
"i18n:refresh": "node web/locales/sync-keys-from-en.mjs && node web/locales/mt-fill.mjs && node web/locales/build-translations.mjs && node web/locales/verify-i18n.mjs",
3640
"i18n:ads": "node ../tools/app/extract-ads-i18n.mjs",
37-
"verify:electron-pack": "node ../tools/app/verify-electron-pack-files.mjs"
41+
"verify:electron-pack": "node ../tools/app/verify-electron-pack-files.mjs",
42+
"copy:ui-v2": "node ../tools/app/copy-ui-v2.mjs",
43+
"prepack": "node ../tools/app/copy-ui-v2.mjs",
44+
"predist": "node ../tools/app/copy-ui-v2.mjs"
3845
},
3946
"build": {
4047
"appId": "com.farmdashboard.app",
@@ -68,6 +75,7 @@
6875
"setup.html",
6976
"icon.ico",
7077
"web/**/*",
78+
"ui-v2/**/*",
7179
"node_modules/**/*"
7280
],
7381
"extraResources": [

FS25_FarmDashboard_Mod/src/FarmDashboardDataCollector.lua

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ end
308308
-- * getFiles requires 3 args: getFiles(directory, patternString, recursiveBool).
309309
-- (Passing bool as arg2 yields "Expected: String. Actual: Bool".)
310310
-- * io.open is often sandboxed to mode "w" only — avoid "r"/"rb" (use readFile if present).
311-
-- * copyFile requires 3 args on FS25 — try bool then numeric overloads best-effort.
311+
-- * copyFile(src, dst, forceOverwrite: Bool) — Bool only; never Number 1/0.
312312
-- * `os` may be nil — os.rename unavailable; use copy/delete or direct write.
313313
-- =====================================================================================
314314

@@ -432,15 +432,16 @@ local COROUTINE_INCREMENTAL_COLLECTORS = {
432432
production = true,
433433
}
434434

435+
--- copyFile(src, dst, forceOverwrite: Bool). Never pass Number 1/0 — engine type-checks
436+
--- arg3 as Bool even inside pcall, and wrong-type trials flood the script log every cycle.
435437
local function _copyFileFs25BestEffort(src, dst)
436438
if type(copyFile) ~= "function" or type(src) ~= "string" or type(dst) ~= "string" then
437439
return false
438440
end
441+
-- forceOverwrite true first; false only if dest already exists and true did not stick.
439442
local trials = {
440443
function() copyFile(src, dst, true) end,
441444
function() copyFile(src, dst, false) end,
442-
function() copyFile(src, dst, 1) end,
443-
function() copyFile(src, dst, 0) end,
444445
}
445446
for _, fn in ipairs(trials) do
446447
local ok = pcall(fn)
@@ -523,6 +524,15 @@ function FarmDashboardDataCollector:_exportMapOverviewForDashboard()
523524
return
524525
end
525526
end
527+
528+
-- Latch failure so we never retry every export cycle (log spam / hitch). Optional asset.
529+
self._mapOverviewExportDone = true
530+
if type(Logging) == "table" and type(Logging.warning) == "function" then
531+
Logging.warning(string.format(
532+
"[FarmDash] map overview export failed once for %s (fleet map may lack overview.dds); not retrying",
533+
tostring(key)
534+
))
535+
end
526536
end
527537

528538
--- Cap for read/write fallback when rename/copy fail (atomic write recovery only). Bounds hitch vs huge tmp→final copies.

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Real-time farm management dashboard for **Farming Simulator 25** — a Windows d
1010

1111
| Download from Releases | Version |
1212
|------------------------|---------|
13-
| **`FS25-Farm-Dashboard-Setup-4.2.0.exe`** | Windows app |
13+
| **`FS25-Farm-Dashboard-Setup-4.2.1.exe`** | Windows app |
1414
| **`FS25_FarmDashboard.zip`** | FS25 mod |
1515

16-
**Current stable line:** App **4.2.0** · Mod **3.4.0.6**
16+
**Current stable line (classic):** App **4.2.1** · Mod **3.4.0.7** — hotfix for Farming Simulator 1.21 copyFile log spam (see [release notes](docs/GITHUB_RELEASE_v4.2.1.md)).
1717

1818
Install **mod first**, load your save once, then install the app. See **[docs/INSTALL.md](docs/INSTALL.md)** (detailed) or the quick steps below.
1919

@@ -28,9 +28,9 @@ Open the dashboard at **[http://localhost:8766](http://localhost:8766)** after s
2828
| | |
2929
| --- | --- |
3030
| **Home** | **Fields** |
31-
| ![Farm Management Dashboard landing](docs/screenshots/fd-shell-020-landing.png) | ![Fields section with summary and cards](docs/screenshots/fd-section-fields-010-summary.png) |
31+
| ![Farm Management Dashboard landing](docs/doc-screenshots/fd-shell-020-landing.png) | ![Fields section with summary and cards](docs/doc-screenshots/fd-section-fields-010-summary.png) |
3232
| **Livestock** | **Productions** |
33-
| ![Livestock summary and animals table](docs/screenshots/fd-section-livestock-010-summary.png) | ![Productions storage and chains](docs/screenshots/fd-section-productions-010-list.png) |
33+
| ![Livestock summary and animals table](docs/doc-screenshots/fd-section-livestock-010-summary.png) | ![Productions storage and chains](docs/doc-screenshots/fd-section-productions-010-list.png) |
3434

3535
More UI shots and install screenshots: **[docs/USER_MANUAL.md](docs/USER_MANUAL.md)** · capture checklist: **[docs/SCREENSHOTS.md](docs/SCREENSHOTS.md)**
3636

@@ -39,7 +39,7 @@ More UI shots and install screenshots: **[docs/USER_MANUAL.md](docs/USER_MANUAL.
3939
## Quick install
4040

4141
1. **Mod** — Put **`FS25_FarmDashboard.zip`** in `Documents\My Games\FarmingSimulator2025\mods\`, enable on your save, **load the save once**.
42-
2. **App** — Run **`FS25-Farm-Dashboard-Setup-4.2.0.exe`** from [Releases](https://github.com/WizardlyPayload/FarmHub/releases).
42+
2. **App** — Run **`FS25-Farm-Dashboard-Setup-4.2.1.exe`** from [Releases](https://github.com/WizardlyPayload/FarmHub/releases).
4343
3. **Configure****Settings → Servers & saves** (local path or FTP for dedicated servers).
4444

4545
**Full guide:** [docs/USER_MANUAL.md](docs/USER_MANUAL.md) · **Install (detailed):** [docs/INSTALL.md](docs/INSTALL.md) · [GitHub Wiki](https://github.com/WizardlyPayload/FarmHub/wiki)
@@ -54,30 +54,31 @@ This repository (**[FarmHub](https://github.com/WizardlyPayload/FarmHub)**) is *
5454
|---------|------------|
5555
| **[JoshWalki / FarmDashboard](https://github.com/JoshWalki/FarmDashboard)** | Original FS25 mod + web dashboard (**Josh Walki**) |
5656
| **[WizardlyPayload / FS25-Farm-Dashboard](https://github.com/WizardlyPayload/FS25-Farm-Dashboard/releases)** | Public **2.0.0** release — Electron desktop fork of Josh’s work |
57-
| **[WizardlyPayload / FarmHub](https://github.com/WizardlyPayload/FarmHub/releases)** *(this repo)* | **4.2.0** line — fleet map, storage, FTP/multi-server, rules engine, auto-update |
57+
| **[WizardlyPayload / FarmHub](https://github.com/WizardlyPayload/FarmHub/releases)** *(this repo)* | **4.2.1** classic line — fleet map, storage, FTP/multi-server, rules engine, auto-update |
5858

5959
**Coming from 2.0.0 or Josh’s repo?** See **[docs/UPGRADE_FROM_FS25-Farm-Dashboard.md](docs/UPGRADE_FROM_FS25-Farm-Dashboard.md)** for what changed.
6060

6161
**Authors:** **[JoshWalki](https://github.com/JoshWalki)** (Josh) — original concept & FS25 mod · **WizardlyPayload** — Electron app, maintenance, releases · [docs/AUTHORS.md](docs/AUTHORS.md)
6262

6363
---
6464

65-
## What you get in 4.2.0
65+
## What you get in 4.2.1
6666

6767
- **Live dashboard** — livestock, pastures, vehicles, fields, economy, productions, weather (port **8766**).
6868
- **Fleet map** — live vehicle pins on the save's PDA overview map.
6969
- **Storage** — silo stock with **moisture & grade**, correct names for mod-map and base-map commodities (incl. **Pig Food** and other sparse fill types); bale categories.
7070
- **Fleet scope** — dealership showroom demos no longer clutter player farms on dedicated multiplayer saves.
7171
- **Livestock** — base-game cow pens, food-duration hints, urgent pasture alerts.
7272
- **Productions** — map-owned factories on base maps; two-column layout.
73-
- **Accurate equipment pictures** — authoritative store-icon matching (app **4.2.0** + mod **3.4.0.6**).
73+
- **Accurate equipment pictures** — authoritative store-icon matching (app **4.2.1** + mod **3.4.0.7**).
74+
- **FS 1.21 copyFile hotfix** — stops repeated map-overview copy errors in the game log after the 1.21 update.
7475
- **Local + FTP** — single-player / LAN host on disk, or dedicated server over FTP.
7576
- **Offline field rules** — suggested next steps from merged game data (no cloud service).
7677
- **Optional integrations** — Precision Farming, Advanced Damage System, Moisture System, Red Tape, Realistic Livestock RM, Vehicle Years; Courseplay and Used Equipment Yards tested alongside — [full mod list](docs/GITHUB_RELEASE_v4.2.0.md#third-party-mods).
7778
- **27 languages**, themes, unified Settings.
7879
- **Auto-update** (Windows app) and **mod version badge** when the in-game mod is behind.
7980

80-
**Release notes:** [docs/GITHUB_RELEASE_v4.2.0.md](docs/GITHUB_RELEASE_v4.2.0.md) · **History:** [docs/CHANGELOG.md](docs/CHANGELOG.md)
81+
**Release notes:** [docs/GITHUB_RELEASE_v4.2.1.md](docs/GITHUB_RELEASE_v4.2.1.md) · **History:** [docs/CHANGELOG.md](docs/CHANGELOG.md)
8182

8283
---
8384

docs/CHANGELOG.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
1-
# Farm Dashboard — Changelog
1+
# Farm Dashboard — Changelog
22

3-
All notable changes to this project are recorded here. For GitHub release blurbs, see [GITHUB_RELEASE_v4.2.0.md](./GITHUB_RELEASE_v4.2.0.md) (current) · [GITHUB_RELEASE_v4.1.5.md](./GITHUB_RELEASE_v4.1.5.md) · [GITHUB_RELEASE_v4.1.0.md](./GITHUB_RELEASE_v4.1.0.md). For **network exposure and trust assumptions**, see [SECURITY.md](./SECURITY.md).
3+
All notable changes to this project are recorded here. For GitHub release blurbs, see [GITHUB_RELEASE_v4.2.1.md](./GITHUB_RELEASE_v4.2.1.md) (current classic) · [GITHUB_RELEASE_v4.2.0.md](./GITHUB_RELEASE_v4.2.0.md) · [GITHUB_RELEASE_v4.1.5.md](./GITHUB_RELEASE_v4.1.5.md). For **network exposure and trust assumptions**, see [SECURITY.md](./SECURITY.md). Classic vs RF product lines: [COMPATIBILITY.md](./COMPATIBILITY.md).
44

55
---
66

77
## Versioning
88

99
| Artifact | Where it lives | Format |
1010
|----------|----------------|--------|
11-
| **Desktop app** | `FS25_FarmDashboard_App/package.json` | Semver (e.g. `4.2.0`) |
12-
| **FS25 mod** | `FS25_FarmDashboard_Mod/modDesc.xml` and `FarmDashboard.VERSION` in Lua | Giants style (e.g. `3.4.0.6`) |
11+
| **Desktop app** | `FS25_FarmDashboard_App/package.json` | Semver (e.g. `4.2.1`) |
12+
| **FS25 mod (classic public zip)** | Stamped at pack time via `npm run package:mod:classic`**3.4.0.7** | Giants style |
13+
| **FS25 mod (RF / local tree)** | `FS25_FarmDashboard_Mod/modDesc.xml` + `FarmDashboard.VERSION` | e.g. `5.0.0.1` RF edition |
1314
| **Source headers** | First line of many `.js` / `.lua` files | Often `v2.0.0` historically; bump only when you intentionally resync headers |
1415

1516
---
1617

18+
19+
## 4.2.1 — FS 1.21 copyFile hotfix + join-as-client (classic patch)
20+
21+
**App:** `4.2.1` (`package.json`) · **Classic mod zip:** `3.4.0.7` · app requires **3.1.0.0+** via `modVersionPolicy.js`.
22+
23+
Public classic patch on the 4.2 / 3.4 line. Classic UI remains default (`useNewUi` false). This does **not** replace Realistic Farming edition 5.x (`latest-rf.yml`).
24+
25+
### Fixed (headline)
26+
- **Farming Simulator 1.21 `copyFile` log spam** — After FS 1.21, the mod could flood the game log with repeated copyFile type errors while trying to save a map overview image. The copy now uses the correct yes/no (Bool) flag the engine expects, and a failed overview export is latched so it does not retry every cycle. Noisy logs / map-overview hiccup only — the game itself is not broken.
27+
28+
### Added
29+
- **Dedicated join-as-client export mirror** — authority streams `data.json` to an opted-in MP client (`FarmDashboardExportEvent` / allowExportMirror); client writes local `modSettings\FS25_FarmDashboard\<slot>\data.json` for **Local** watch. **FTP remains Advanced** for empty / headless dedicated.
30+
- **Setup join-as-client UX** — legacy Setup guides mirror / receive-server-export for dedicated without FTP.
31+
32+
### Fixed
33+
- **Track A** merge and related test hardening for the 4.2.1 release line.
34+
35+
### Changed
36+
- Classic public mod zip `3.4.0.6``3.4.0.7` (copyFile fix + export mirror + settings). Packaged with `package:mod:classic` so the RF working-tree modDesc can stay on the 5.x line.
37+
- App `4.2.0``4.2.1`. NEW APP packaging stays **opt-in** only.
38+
39+
### Docs
40+
- Install / user manual / wiki / itch copy for update steps from 4.2 / 3.4.0.6; join-as-client notes; see also [RELEASE_NOTE_JOIN_AS_CLIENT.md](./_internal/RELEASE_NOTE_JOIN_AS_CLIENT.md).
41+
42+
---
1743
## 4.2.0 — Public release (storage, livestock, productions, notifications)
1844

1945
**App:** `4.2.0` (`package.json`) · **Mod:** `3.4.0.6` (`modDesc.xml` + `FarmDashboard.VERSION`; app requires **3.1.0.0+** via `modVersionPolicy.js`).

0 commit comments

Comments
 (0)