aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Shiftorium.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS_TheReturn/Shiftorium.cs')
-rw-r--r--ShiftOS_TheReturn/Shiftorium.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/ShiftOS_TheReturn/Shiftorium.cs b/ShiftOS_TheReturn/Shiftorium.cs
index ab95f43..0bdd9f4 100644
--- a/ShiftOS_TheReturn/Shiftorium.cs
+++ b/ShiftOS_TheReturn/Shiftorium.cs
@@ -204,7 +204,19 @@ namespace ShiftOS.Engine
}
try
{
- return SaveSystem.CurrentSave.Upgrades[id];
+ if (SaveSystem.CurrentSave == null)
+ return false;
+
+ if (SaveSystem.CurrentSave.StoriesExperienced == null)
+ SaveSystem.CurrentSave.StoriesExperienced = new List<string>();
+
+ bool upgInstalled = false;
+ if(SaveSystem.CurrentSave.Upgrades.ContainsKey(id))
+ upgInstalled = SaveSystem.CurrentSave.Upgrades[id];
+
+ if(upgInstalled == false)
+ return SaveSystem.CurrentSave.StoriesExperienced.Contains(id);
+ return true;
}
catch
{