Skip to content

Commit db2403c

Browse files
committed
ModAPI.Common: use more verbose names in GameVersion.cs
1 parent 7b64ae6 commit db2403c

1 file changed

Lines changed: 35 additions & 34 deletions

File tree

ModAPI.Common/GameVersion.cs

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ public enum GameVersionType
77
/// <summary>3.0.0.2818 (July 2009) installed from disc, with patch 5.1</summary>
88
Disc,
99
/// <summary>3.1.0.22 (March 2017) installed from Origin, requires ModAPI Fix</summary>
10-
Origin_Patched,
10+
Origin_March2017,
1111
/// <summary>3.1.0.29 (October 2024) installed from EA App or Origin, requires ModAPI Fix</summary>
12-
EA_Oct24,
12+
EA_October2024,
1313
/// <summary>3.1.0.22 (March 2017) installed from GOG or Steam</summary>
14-
Steam_Patched,
14+
Steam_March2017,
1515
/// <summary>3.1.0.29 (October 2024) installed from GOG</summary>
16-
GoG_Oct24,
16+
GOG_October2024,
1717
/// <summary>3.1.0.29 (October 2024) installed from Steam, has steamstub DRM</summary>
18-
Steam_Oct24,
18+
Steam_October2024,
1919

2020
None
2121
}
@@ -25,38 +25,39 @@ public static class GameVersion
2525

2626

2727
private static readonly int[] ExecutableSizes = {
28-
/* DISC*/ 24909584,
29-
/* ORIGIN_P */ 24898224,
30-
/* EA_OCT24 */ 24906040,
31-
/* STEAM_P */24885248,
32-
/* GOG_OCT24 */24895536,
33-
/* STEAM_OCT24 */ 25066744};
28+
24909584, // Disc
29+
24898224, // Origin_March2017
30+
24906040, // EA_October2024
31+
24885248, // Steam_March2017
32+
24895536, // GoG_October2024
33+
25066744 // Steam_October2024
34+
};
3435

3536
private static readonly string[] VersionNames = {
36-
"disk",
37-
"steam_patched", // origin uses the steam_patched one
38-
"steam_patched", // EA app uses the steam_patched one
39-
"steam_patched",
40-
"steam_patched", // in GoG executable, addresses did not change in October 2024 update
41-
"steam_patched", // addresses did not change in October 2024 update, but the executable was protected with SteamDRM
42-
null
43-
};
37+
"disk",
38+
"steam_patched", // Origin_March2017 uses the steam_patched one
39+
"steam_patched", // EA_October2024 uses the steam_patched one
40+
"steam_patched",
41+
"steam_patched", // in GoG executable, addresses did not change in October 2024 update
42+
"steam_patched", // addresses did not change in October 2024 update, but the executable was protected with SteamDRM
43+
null
44+
};
4445

4546
// Origin users download an alternative executable, so it uses a different name
4647
private static readonly string[] ExecutableNames = {
47-
"SporeApp.exe",
48-
"SporeApp_ModAPIFix.exe", // origin uses a different one
49-
"SporeApp_ModAPIFix.exe", // EA app uses a different one
50-
"SporeApp.exe",
51-
"SporeApp.exe",
52-
"SporeApp.exe",
53-
null
54-
};
48+
"SporeApp.exe",
49+
"SporeApp_ModAPIFix.exe", // Origin_March2017 uses a different one
50+
"SporeApp_ModAPIFix.exe", // EA_October2024 uses a different one
51+
"SporeApp.exe",
52+
"SporeApp.exe",
53+
"SporeApp.exe",
54+
null
55+
};
5556

5657
public static bool RequiresModAPIFix(GameVersionType versionType)
5758
{
58-
return versionType == GameVersionType.Origin_Patched ||
59-
versionType == GameVersionType.EA_Oct24;
59+
return versionType == GameVersionType.Origin_March2017 ||
60+
versionType == GameVersionType.EA_October2024;
6061
}
6162

6263
public static GameVersionType DetectVersion(string path)
@@ -93,11 +94,11 @@ public static string GetNewDLLName(GameVersionType type)
9394
{
9495
return "SporeModAPI.disk.dll";
9596
}
96-
else if ((type == GameVersionType.Origin_Patched) ||
97-
(type == GameVersionType.EA_Oct24) ||
98-
(type == GameVersionType.Steam_Patched) ||
99-
(type == GameVersionType.GoG_Oct24) ||
100-
(type == GameVersionType.Steam_Oct24))
97+
else if ((type == GameVersionType.Origin_March2017) ||
98+
(type == GameVersionType.EA_October2024) ||
99+
(type == GameVersionType.Steam_March2017) ||
100+
(type == GameVersionType.GOG_October2024) ||
101+
(type == GameVersionType.Steam_October2024))
101102
{
102103
return "SporeModAPI.march2017.dll";
103104
}

0 commit comments

Comments
 (0)