diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 4be365f9fd..e400016fe3 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Feature: [#24313] [Plugin] Add API for setting a ride vehicle’s sprite to a smoke plume. - Improved: [#24364] Improve the fallback vehicle sprites for Zero G Rolls, and allow small ones to be built without cheats if the fallbacks are available. - Improved: [#24368] Clicking the in-game update notication now leads to a more user-friendly download page. +- Improved: [#24409] Steam installs of RCT Classic are now detected automatically. - Change: [#24342] g2.dat is now split into g2.dat and fonts.dat. - Change: [#24362] The Windows installer now prevents installing to the same folder as RollerCoaster Tycoon 2 or Classic. - Change: [#24418] Small & Large Zero G Rolls can now be built on the LIM Launched RC without cheats if vehicle sprites are available. diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index a5ced5da04..758f5388e2 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -752,6 +752,12 @@ namespace OpenRCT2::Config { return location; } + + std::string location2 = Path::Combine(steamPath, Platform::GetRCTClassicSteamDir()); + if (Platform::OriginalGameDataExists(location2)) + { + return location2; + } } auto discordPath = Platform::GetFolderPath(SpecialFolder::rct2Discord); diff --git a/src/openrct2/platform/Platform.Android.cpp b/src/openrct2/platform/Platform.Android.cpp index a03e1e0b44..3008012cec 100644 --- a/src/openrct2/platform/Platform.Android.cpp +++ b/src/openrct2/platform/Platform.Android.cpp @@ -163,6 +163,11 @@ namespace OpenRCT2::Platform return {}; } + u8string GetRCTClassicSteamDir() + { + return {}; + } + #ifndef DISABLE_TTF std::string GetFontPath(const TTFFontDescriptor& font) { diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp index da9d703e22..571ceda11b 100644 --- a/src/openrct2/platform/Platform.Linux.cpp +++ b/src/openrct2/platform/Platform.Linux.cpp @@ -371,6 +371,11 @@ namespace OpenRCT2::Platform return u8"Rollercoaster Tycoon 2"; } + u8string GetRCTClassicSteamDir() + { + return u8"RollerCoaster Tycoon Classic"; + } + std::vector GetSearchablePathsRCT1() { return { diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 44dfd33ea9..9395dc81c5 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -806,6 +806,11 @@ namespace OpenRCT2::Platform return u8"Rollercoaster Tycoon 2"; } + u8string GetRCTClassicSteamDir() + { + return u8"RollerCoaster Tycoon Classic"; + } + time_t FileGetModifiedTime(u8string_view path) { WIN32_FILE_ATTRIBUTE_DATA data{}; diff --git a/src/openrct2/platform/Platform.h b/src/openrct2/platform/Platform.h index cb7455e6f1..b2f3ccbdeb 100644 --- a/src/openrct2/platform/Platform.h +++ b/src/openrct2/platform/Platform.h @@ -140,6 +140,7 @@ namespace OpenRCT2::Platform u8string GetRCT1SteamDir(); u8string GetRCT2SteamDir(); + u8string GetRCTClassicSteamDir(); datetime64 GetDatetimeNowUTC(); uint32_t GetTicks(); diff --git a/src/openrct2/platform/Platform.macOS.mm b/src/openrct2/platform/Platform.macOS.mm index 7bd0a5faa6..2d412b56de 100644 --- a/src/openrct2/platform/Platform.macOS.mm +++ b/src/openrct2/platform/Platform.macOS.mm @@ -243,8 +243,7 @@ namespace OpenRCT2::Platform return {}; } - auto steamPath = Path::Combine( - homeDir, "Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/MacOS/steamapps/content"); + auto steamPath = Path::Combine(homeDir, "Library/Application Support/Steam"); if (Path::DirectoryExists(steamPath)) { return steamPath; @@ -255,12 +254,17 @@ namespace OpenRCT2::Platform u8string GetRCT1SteamDir() { - return u8"app_285310" PATH_SEPARATOR u8"depot_285311"; + return u8"Steam.AppBundle/Steam/Contents/MacOS/steamapps/content/app_285310/depot_285311"; } u8string GetRCT2SteamDir() { - return u8"app_285330" PATH_SEPARATOR u8"depot_285331"; + return u8"Steam.AppBundle/Steam/Contents/MacOS/steamapps/content/app_285330/depot_285331"; + } + + u8string GetRCTClassicSteamDir() + { + return u8"steamapps/common/RollerCoaster Tycoon Classic"; } std::string GetFontPath(const TTFFontDescriptor& font)