mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Autodetect Steam installs of RCT Classic
This commit is contained in:
committed by
GitHub
parent
3721dbdffa
commit
7fbbd0d2a5
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -163,6 +163,11 @@ namespace OpenRCT2::Platform
|
||||
return {};
|
||||
}
|
||||
|
||||
u8string GetRCTClassicSteamDir()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
#ifndef DISABLE_TTF
|
||||
std::string GetFontPath(const TTFFontDescriptor& font)
|
||||
{
|
||||
|
||||
@@ -371,6 +371,11 @@ namespace OpenRCT2::Platform
|
||||
return u8"Rollercoaster Tycoon 2";
|
||||
}
|
||||
|
||||
u8string GetRCTClassicSteamDir()
|
||||
{
|
||||
return u8"RollerCoaster Tycoon Classic";
|
||||
}
|
||||
|
||||
std::vector<std::string_view> GetSearchablePathsRCT1()
|
||||
{
|
||||
return {
|
||||
|
||||
@@ -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{};
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace OpenRCT2::Platform
|
||||
|
||||
u8string GetRCT1SteamDir();
|
||||
u8string GetRCT2SteamDir();
|
||||
u8string GetRCTClassicSteamDir();
|
||||
datetime64 GetDatetimeNowUTC();
|
||||
uint32_t GetTicks();
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user