From f8e65c3320d8c2807688440bd8bbd75a0cd48925 Mon Sep 17 00:00:00 2001 From: algernon-A Date: Tue, 8 Nov 2022 23:10:35 +1100 Subject: [PATCH] 0.8.0.1 hotfix - add workaround for late invocations of CustomDeserializer.Asset getter. --- Changelog.txt | 7 ++++++- Code/Loading/CustomDeserializer.cs | 6 ++++++ LoadingScreenModRevisited.csproj | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 1175a57..5124279 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,4 +1,9 @@ -Version 0.8 - +Verion 0.8.0.1 hotfix - + +- Implement workaround for unexpected CSUR Toolbox behaviour + + +Version 0.8 - - Refactor skipping code (preparation for adding new skipping types) - Replace now-redundant Harmony reverse patches with delegates diff --git a/Code/Loading/CustomDeserializer.cs b/Code/Loading/CustomDeserializer.cs index a44bfb8..88be2f3 100644 --- a/Code/Loading/CustomDeserializer.cs +++ b/Code/Loading/CustomDeserializer.cs @@ -176,6 +176,12 @@ internal static Package.Asset[] Assets { get { + // Ensure instance. + if (s_instance == null) + { + s_instance = new CustomDeserializer(); + } + // Create new list if it hasn't already been done. if (s_instance._assets == null) { diff --git a/LoadingScreenModRevisited.csproj b/LoadingScreenModRevisited.csproj index 9ee5164..3f343f2 100644 --- a/LoadingScreenModRevisited.csproj +++ b/LoadingScreenModRevisited.csproj @@ -8,7 +8,7 @@ algernon,thale5 Copyright © 2016-2022 algernon, thale5 $(Title) - 0.8 + 0.8.0.1 $(MSBuildProgramFiles32)/Steam/steamapps/common/Cities_Skylines/Cities_Data/Managed $(AssemblySearchPaths);