diff --git a/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj b/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj index d3ca789..004af71 100644 --- a/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj +++ b/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj @@ -3,7 +3,6 @@ netstandard2.0 - diff --git a/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs b/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs index 5c4ecca..2ab718e 100644 --- a/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs +++ b/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs @@ -18,7 +18,7 @@ namespace RecrownedAthenaeum.ContentSystem /// /// Path modifiers to change the path in which the content manager looks to load a file. Used for better organizing things while not needing to type entire path. /// - public readonly Dictionary contentPathModifier; + private readonly Dictionary contentPathModifier; /// /// Used when no path modifier is defined for that specific type. /// @@ -47,7 +47,21 @@ namespace RecrownedAthenaeum.ContentSystem queue = new Queue(); contentPathModifier = new Dictionary(); } - + /// + /// Adds a to this handler. + /// + /// + /// + public void AddContentPathResolver(Type assetType, IContentPathResolver contentResolver) { + contentPathModifier.Add(assetType, contentResolver); + } + /// + /// Removes the for the key. + /// + /// + public void RemoveContentResolver(Type assetType) { + contentPathModifier.Remove(assetType); + } private void Load(string assetName, Type type, bool usePathModifier) { Debug.WriteLine("Loading asset: " + assetName); @@ -179,6 +193,5 @@ namespace RecrownedAthenaeum.ContentSystem } } - } } diff --git a/RecrownedAthenaeum/RecrownedAthenaeum.csproj b/RecrownedAthenaeum/RecrownedAthenaeum.csproj index 362d139..26be986 100644 --- a/RecrownedAthenaeum/RecrownedAthenaeum.csproj +++ b/RecrownedAthenaeum/RecrownedAthenaeum.csproj @@ -3,7 +3,7 @@ netstandard2.0 - + \ No newline at end of file diff --git a/RecrownedAthenaeum/UI/ScreenSystem/ScreenManager.cs b/RecrownedAthenaeum/UI/ScreenSystem/ScreenManager.cs index 260deef..7204e89 100644 --- a/RecrownedAthenaeum/UI/ScreenSystem/ScreenManager.cs +++ b/RecrownedAthenaeum/UI/ScreenSystem/ScreenManager.cs @@ -158,10 +158,12 @@ namespace RecrownedAthenaeum.UI.ScreenSystem { if (resizing) throw new InvalidOperationException("Already resizing."); resizing = true; - Screen.AssetLoadStateChange(false); - Screen = loadingScreen; - previousScreenRenderTarget.Dispose(); - previousScreenRenderTarget = null; + if (Screen != null) { + Screen.AssetLoadStateChange(false); + Screen = loadingScreen; + previousScreenRenderTarget.Dispose(); + previousScreenRenderTarget = null; + } } /// diff --git a/RecrownedAthenaeum/UI/SkinSystem/MergedSkin.cs b/RecrownedAthenaeum/UI/SkinSystem/MergedSkin.cs index 2d7db54..7040272 100644 --- a/RecrownedAthenaeum/UI/SkinSystem/MergedSkin.cs +++ b/RecrownedAthenaeum/UI/SkinSystem/MergedSkin.cs @@ -24,11 +24,9 @@ namespace RecrownedAthenaeum.UI.SkinSystem { get { - try - { + if (mainSkin.CursorTexture != null) { return mainSkin.CursorTexture; - } catch (NullReferenceException) - { + } else { return alternateSkin.CursorTexture; } }