Skip to content

Commit bb323a1

Browse files
authored
Merge pull request #13 from bonsaibauer/1.2.0.0
v1.2.0.0
2 parents 69deb3f + 0ffe1cd commit bb323a1

17 files changed

Lines changed: 5307 additions & 673 deletions

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog - CSM.TmpeSync
22

3+
In-game changelog source: `src/CSM.TmpeSync/Services/UI/ChangelogPanel.cs` (`ChangelogService.LoadEntries()`).
4+
5+
## [1.2.0.0] - 2026-03-31
6+
7+
### Compatibility & Health Check
8+
- **Compatibility management rework**: Added a dedicated Health Check flow in Mod Options with live Host/Client and dependency diagnostics.
9+
- **Cities: Skylines compatibility validation**: Added explicit CS version-line checks and integrated them into diagnostics and notifier flows.
10+
- [Fixed] Manual Host/Client compatibility checks: stabilized probe/response delivery to prevent false "No Response" timeouts during in-session checks.
11+
- [Fixed] Mod Options UX: selecting the Compatibility tab now triggers the same immediate refresh as the Refresh button.
12+
- **Runtime UX behavior**: Improved Host/Client session handling and status rendering in Mod Options and popup panels.
13+
14+
### UI & Messaging
15+
- **Modern UI rollout**: Unified TMPE-style modal cards, badges, and typography across version check, dependency check, and changelog windows.
16+
17+
### Tooling & Metadata
18+
- **Tooling**: Standardized script logging and improved update/build output consistency for build, debug, install, and update flows.
19+
- **Metadata refresh**: Synchronized mod/dependency release tags and compatibility references for TMPE, CSM, Harmony, and CSM.TmpeSync.
20+
321
## [1.1.1.0] - 2026-03-24
422

523
### Updated Compatibility
@@ -16,3 +34,20 @@
1634
### Bug Fixes
1735
- Fixed a potential issue where "Move Building" (via CSM's new rebuild handler) could be interfered with by outdated mod version states.
1836
- Aligned synchronization handlers with the latest TM:PE internal manager signatures to ensure stability during lane connection changes.
37+
38+
## [1.1.0.0] - 2025-12-06
39+
40+
- [Updated] Improve resync logic: when a client rejoins, the host replays all TM:PE changes made since the host came online, including those performed while the client was offline.
41+
- [Updated] Includes the 1.0.1.0 updates: in-game changelog popup and client lane connection fix.
42+
43+
## [1.0.1.0] - 2025-12-04
44+
45+
- [New] Add minimal in-game changelog popup.
46+
- [Fixed] Fix lane connection handling for clients.
47+
48+
## [1.0.0.0] - 2025-11-06
49+
50+
- [New] Host-authoritative bridge between CSM and TM:PE with retry/backoff so every state stays in sync.
51+
- [New] Supports Clear Traffic, Junction Restrictions, Lane Arrows, Lane Connector, Parking Restrictions, Priority Signs, Speed Limits, Toggle Traffic Lights, and Vehicle Restrictions.
52+
- [Removed] Timed traffic lights remain disabled as synchronizing them would generate disproportionate multiplayer traffic.
53+
- [New] Modular per-feature architecture with dedicated logging, guard scopes, and explicit client error feedback.

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ During configuration the script explicitly asks you to confirm these subscriptio
9797
`scripts/build.ps1` drives the entire process:
9898

9999
```powershell
100-
pwsh ./scripts/build.ps1 -Update -Build -Install # refresh dependencies, build the mod, install to the configured directory
101-
pwsh ./scripts/build.ps1 -Build # build only (assumes dependencies are already mirrored)
102-
pwsh ./scripts/build.ps1 -Install # copy the latest build output into your mods folder
100+
pwsh ./scripts/build.ps1 -Update -Build -Install -Configuration Debug # refresh dependencies, build the mod, build debug version and install to the configured directory
101+
pwsh ./scripts/build.ps1 -Update -Build -Install # refresh dependencies, build the mod, install to the configured directory
102+
pwsh ./scripts/build.ps1 -Build -Install # build the mod, install to the configured directory
103+
pwsh ./scripts/build.ps1 -Build # build only (assumes dependencies are already mirrored)
104+
pwsh ./scripts/build.ps1 -Install # copy the latest build output into your mods folder
103105
```
104106

105107
Key parameters:

scripts/build.ps1

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ $script:IsWindowsPlatform = [System.Runtime.InteropServices.RuntimeInformation]:
3030
$script:MsBuildPath = $null
3131
$script:ModProjectsCache = $null
3232

33+
function Write-BuildInfo {
34+
param([string]$Message)
35+
Write-Host "[CSM.TmpeSync][Build] $Message" -ForegroundColor Cyan
36+
}
37+
38+
function Write-BuildWarn {
39+
param([string]$Message)
40+
Write-Host "[CSM.TmpeSync][Build][WARN] $Message" -ForegroundColor Yellow
41+
}
42+
43+
function Write-BuildSuccess {
44+
param([string]$Message)
45+
Write-Host "[CSM.TmpeSync][Build] $Message" -ForegroundColor Green
46+
}
47+
3348
function Resolve-MsBuildPath {
3449
if (-not $script:IsWindowsPlatform) {
3550
return $null
@@ -208,7 +223,7 @@ function Load-BuildSettings {
208223
return $data
209224
}
210225
catch {
211-
Write-Warning "[CSM.TmpeSync] Failed to read build-settings.json. A new configuration will be created."
226+
Write-BuildWarn "Failed to read build-settings.json. A new configuration will be created."
212227
return @{ ActiveProfile = ""; Profiles = @{} }
213228
}
214229
}
@@ -414,9 +429,9 @@ function Prompt-ForProfileSelection {
414429
return $AvailableProfiles[0]
415430
}
416431

417-
Write-Host "Select Cities: Skylines game version:" -ForegroundColor Cyan
432+
Write-BuildInfo "Select Cities: Skylines game profile:"
418433
for ($i = 0; $i -lt $AvailableProfiles.Count; $i++) {
419-
Write-Host ("[{0}] {1}" -f ($i + 1), $AvailableProfiles[$i])
434+
Write-BuildInfo ("[{0}] {1}" -f ($i + 1), $AvailableProfiles[$i])
420435
}
421436

422437
$currentIndex = [Array]::IndexOf($AvailableProfiles, $CurrentProfile)
@@ -503,7 +518,7 @@ function Prompt-ForConfirmation {
503518
'no' { return $false }
504519
}
505520

506-
Write-Host "Please answer with yes or no." -ForegroundColor Yellow
521+
Write-BuildWarn "Please answer with yes or no."
507522
}
508523
}
509524

@@ -584,7 +599,7 @@ function Configure-Profile {
584599
$script:SettingsChanged = $true
585600
}
586601

587-
Write-Host "[CSM.TmpeSync] Profile '$ProfileName' configured." -ForegroundColor Cyan
602+
Write-BuildInfo "Profile '$ProfileName' configured."
588603
}
589604

590605
function Determine-ActiveProfile {
@@ -749,7 +764,7 @@ function Invoke-BuildProject {
749764
'/nologo'
750765
) + $msbuildArguments
751766

752-
Write-Host "[CSM.TmpeSync] Building ($Configuration) with MSBuild..." -ForegroundColor Cyan
767+
Write-BuildInfo "Building configuration '$Configuration' with MSBuild."
753768
& $msbuildPath @msbuildInvocation
754769
if ($LASTEXITCODE -ne 0) {
755770
throw "MSBuild failed with exit code $LASTEXITCODE."
@@ -769,7 +784,7 @@ function Invoke-BuildProject {
769784
throw "dotnet CLI not found. Install the .NET SDK."
770785
}
771786

772-
Write-Host "[CSM.TmpeSync] Building ($Configuration) with dotnet..." -ForegroundColor Cyan
787+
Write-BuildInfo "Building configuration '$Configuration' with dotnet."
773788
& $dotnet.Source @dotnetArguments
774789
if ($LASTEXITCODE -ne 0) {
775790
throw "dotnet build failed with exit code $LASTEXITCODE."
@@ -795,7 +810,7 @@ function Get-OutputDirectory {
795810
. (Join-Path $PSScriptRoot 'install.ps1')
796811

797812
if (-not ($Update -or $Build -or $Install -or $Configure)) {
798-
Write-Host "[CSM.TmpeSync] No action specified. Use -Update, -Build, -Install and/or -Configure." -ForegroundColor Yellow
813+
Write-BuildWarn "No action specified. Use -Update, -Build, -Install and/or -Configure."
799814
exit 0
800815
}
801816

@@ -820,7 +835,7 @@ if ($requiresConfiguredProfile) {
820835
}
821836

822837
if (-not $shouldConfigure -and -not (Test-ProfileIsConfigured -Profile $existingProfile)) {
823-
Write-Host "[CSM.TmpeSync] No configured profile found. Launching configuration." -ForegroundColor Yellow
838+
Write-BuildWarn "No configured profile found. Launching configuration."
824839
$shouldConfigure = $true
825840
}
826841
}
@@ -880,11 +895,16 @@ if ($Update) {
880895
$configuredProfile = Ensure-ConfiguredProfile -Settings $settings -ProfileName $profileName
881896
Update-Dependencies -Profile $configuredProfile
882897

898+
$effectiveUpdateGameDirectory = $GameDirectory
899+
if ([string]::IsNullOrWhiteSpace($effectiveUpdateGameDirectory) -and $configuredProfile.ContainsKey('GameDirectory')) {
900+
$effectiveUpdateGameDirectory = [string]$configuredProfile.GameDirectory
901+
}
902+
883903
$updateScriptParams = @{
884904
SkipBuildStep = $true
885905
Configure = $Configure
886906
Profile = $profileName
887-
GameDirectory = $GameDirectory
907+
GameDirectory = $effectiveUpdateGameDirectory
888908
SteamModsDir = $SteamModsDir
889909
HarmonySourceDir = $HarmonySourceDir
890910
CsmSourceDir = $CsmSourceDir
@@ -901,14 +921,20 @@ if ($Update) {
901921
}
902922

903923
if ($Build) {
924+
if ($Configuration -ieq 'Debug') {
925+
Write-BuildInfo "Debug build mode active (Configuration=Debug)."
926+
}
904927
Invoke-BuildProject -Profile $profile -Configuration $Configuration
905928
}
906929

907930
if ($Install) {
931+
if ($Configuration -ieq 'Debug') {
932+
Write-BuildInfo "Debug install mode active (target folder uses .Debug suffix)."
933+
}
908934
$configuredProfile = Ensure-ConfiguredProfile -Settings $settings -ProfileName $profileName
909935
Invoke-InstallMod -Profile $configuredProfile -Configuration $Configuration -OverrideModDirectory $ModDirectory
910936
}
911937

912938
Save-BuildSettings -Settings $settings
913939

914-
Write-Host "[CSM.TmpeSync] Done." -ForegroundColor Green
940+
Write-BuildSuccess "Done."

scripts/install.ps1

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/bin/pwsh
22

3+
function Write-InstallInfo {
4+
param([string]$Message)
5+
Write-Host "[CSM.TmpeSync][Install] $Message" -ForegroundColor Cyan
6+
}
7+
8+
function Write-InstallSuccess {
9+
param([string]$Message)
10+
Write-Host "[CSM.TmpeSync][Install] $Message" -ForegroundColor Green
11+
}
12+
313
function Invoke-InstallMod {
414
param(
515
[hashtable]$Profile,
@@ -47,10 +57,10 @@ function Invoke-InstallMod {
4757
}
4858

4959
$sortedAssemblies = $presentAssemblyNames | Sort-Object -Unique
50-
Write-Host "[CSM.TmpeSync] Installing assemblies: $($sortedAssemblies -join ', ')" -ForegroundColor Cyan
60+
Write-InstallInfo "Installing assemblies: $($sortedAssemblies -join ', ')"
5161
}
5262

53-
Write-Host "[CSM.TmpeSync] Installing build to $targetDirectory" -ForegroundColor Cyan
63+
Write-InstallInfo "Installing build output to $targetDirectory"
5464
Copy-DirectoryContents -Source $outputDir -Destination $targetDirectory -ExcludeExtensions '.pdb'
5565

5666
$outputRoot = Join-Path $repoRoot "output"
@@ -59,8 +69,8 @@ function Invoke-InstallMod {
5969
}
6070

6171
$mirrorDestination = Join-Path $outputRoot (Split-Path $targetDirectory -Leaf)
62-
Write-Host "[CSM.TmpeSync] Mirroring build to $mirrorDestination" -ForegroundColor Cyan
72+
Write-InstallInfo "Mirroring build output to $mirrorDestination"
6373
Copy-DirectoryContents -Source $outputDir -Destination $mirrorDestination -ExcludeExtensions '.pdb'
6474

65-
Write-Host "[CSM.TmpeSync] Installation complete." -ForegroundColor Green
75+
Write-InstallSuccess "Installation complete."
6676
}

0 commit comments

Comments
 (0)