mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'caching' into auto-spiral-placement-2-electric-boogaloo
This commit is contained in:
commit
57b4f32bbc
@ -25,7 +25,14 @@ namespace NewHorizons.Utility
|
||||
#region Cache
|
||||
public void LoadCache()
|
||||
{
|
||||
if (RelativePath != null) Cache = new Cache(RelativePath+".nhcache");
|
||||
if (RelativePath == null)
|
||||
{
|
||||
Logger.LogWarning("Cannot load cache! RelativePath is null!");
|
||||
return;
|
||||
}
|
||||
|
||||
var pathWithoutExtension = RelativePath.Substring(0, RelativePath.LastIndexOf('.'));
|
||||
Cache = new Cache(pathWithoutExtension+".nhcache");
|
||||
}
|
||||
|
||||
public void UnloadCache(bool writeBeforeUnload=false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user