Skip to content

Commit

Permalink
0.6 update: compatibility updates for game version 1.15.
Browse files Browse the repository at this point in the history
  • Loading branch information
algernon-A committed Sep 14, 2022
1 parent cfc4f7f commit 4dc7d10
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 9 deletions.
7 changes: 6 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
Version 0.5 -
Version 0.6 -

- Compatibility updates for game version 1.15


Version 0.5 -

- Automatically create new LSMR settings file after reading legacy LSM settings (don't wait for user to open options panel)
- Update display name in content manager and options panel (LSM -> Loading Screen Mod)
Expand Down
16 changes: 16 additions & 0 deletions Code/Loading/AssetLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,22 @@ public IEnumerator LoadCustomContent()
}
}

if (LevelLoader.DLC(1992290u))
{
Package.Asset asset3 = PackageManager.FindAssetByName("System." + DistrictStyle.kModderPack11StyleName);
if (asset3 != null && asset3.isEnabled)
{
DistrictStyle districtStyle = new DistrictStyle(DistrictStyle.kModderPack11StyleName, builtIn: true);
Util.InvokeVoid(Singleton<LoadingManager>.instance, "AddChildrenToBuiltinStyle", GameObject.Find("Modder Pack 11"), districtStyle, false);
if (LSMRSettings.SkipPrefabs)
{
PrefabLoader.RemoveSkippedFromStyle(districtStyle);
}

districtStyles.Add(districtStyle);
}
}

// LSM insert.
// Unload any skipped assets.
if (LSMRSettings.SkipPrefabs)
Expand Down
33 changes: 28 additions & 5 deletions Code/Loading/LevelLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ private static List<KeyValuePair<string, float>> SetLevels()
loadingManager.m_supportsExpansion[7] = DLC(944071u);
loadingManager.m_supportsExpansion[8] = DLC(1146930u);
loadingManager.m_supportsExpansion[9] = DLC(1726380u);
loadingManager.m_supportsExpansion[10] = DLC(2008400u);
bool isWinter = Singleton<SimulationManager>.instance.m_metaData.m_environment == "Winter";
if (isWinter && !loadingManager.m_supportsExpansion[1])
{
Expand Down Expand Up @@ -985,6 +986,11 @@ private static List<KeyValuePair<string, float>> SetLevels()
prefabScenes.Add(new KeyValuePair<string, float>("Expansion10Prefabs", 0.1f));
}

if (loadingManager.m_supportsExpansion[10])
{
prefabScenes.Add(new KeyValuePair<string, float>((!isWinter) ? "Expansion11Prefabs" : "WinterExpansion11Prefabs", 0.1f));
}

if (DLC(456200u))
{
prefabScenes.Add(new KeyValuePair<string, float>("FootballPrefabs", 0.01f));
Expand Down Expand Up @@ -1075,6 +1081,25 @@ private static List<KeyValuePair<string, float>> SetLevels()
prefabScenes.Add(new KeyValuePair<string, float>("Station13Prefabs", 0.01f));
}

if (DLC(1992290u))
{
Package.Asset asset4 = PackageManager.FindAssetByName("System." + DistrictStyle.kModderPack11StyleName);
if (asset4 != null && asset4.isEnabled)
{
prefabScenes.Add(new KeyValuePair<string, float>((!isWinter) ? "ModderPack11Prefabs" : "WinterModderPack11Prefabs", 0.03f));
}
}

if (DLC(1992291u))
{
prefabScenes.Add(new KeyValuePair<string, float>("ModderPack12Prefabs", 0.03f));
}

if (DLC(563850u))
{
prefabScenes.Add(new KeyValuePair<string, float>("ChinaPackPrefabs", 0.02f));
}

if (DLC(614581u))
{
prefabScenes.Add(new KeyValuePair<string, float>("FestivalPrefabs", 0.01f));
Expand Down Expand Up @@ -1138,11 +1163,6 @@ private static List<KeyValuePair<string, float>> SetLevels()
prefabScenes.Add(new KeyValuePair<string, float>("ModderPack10Prefabs", 0.03f));
}

if (DLC(563850u))
{
prefabScenes.Add(new KeyValuePair<string, float>("ChinaPackPrefabs", 0.02f));
}

Package.Asset europeanStyles = PackageManager.FindAssetByName("System." + DistrictStyle.kEuropeanStyleName);
if (europeanStyles != null && europeanStyles.isEnabled)
{
Expand All @@ -1156,6 +1176,9 @@ private static List<KeyValuePair<string, float>> SetLevels()
}
}

loadingManager.m_ownedMask1 = SteamHelper.GetOwnedDLCMask();
loadingManager.m_ownedMask2 = SteamHelper.GetOwnedDLCMask2();

return prefabScenes;
}

Expand Down
1 change: 0 additions & 1 deletion Code/LoadingScreen/BackgroundImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ public static class BackgroundImage
"BYNpq0K",
"fG9WMwM",
"VcTIBOP",
"zAQqAIi",
"0mCvYIj",
"puUjIqb",
"IuzQQf1",
Expand Down
2 changes: 1 addition & 1 deletion Code/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace LoadingScreenModRevisited
/// </summary>
public sealed class Mod : PatcherMod<OptionsPanel, Patcher>, IUserMod
{
private readonly string _compatibleVersion = "1.14";
private readonly string _compatibleVersion = "1.15";

/// <summary>
/// Gets the mod's base display name (name only).
Expand Down
2 changes: 1 addition & 1 deletion LoadingScreenModRevisited.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Authors>algernon,thale5</Authors>
<Copyright>Copyright © 2016-2022 algernon, thale5</Copyright>
<Product>$(Title)</Product>
<Version>0.5</Version>
<Version>0.6</Version>
<ManagedDLLPath>$(MSBuildProgramFiles32)/Steam/steamapps/common/Cities_Skylines/Cities_Data/Managed</ManagedDLLPath>
<AssemblySearchPaths>
$(AssemblySearchPaths);
Expand Down

0 comments on commit 4dc7d10

Please sign in to comment.