aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Shiftorium.cs
diff options
context:
space:
mode:
authorpfg <[email protected]>2017-03-07 17:33:44 -0800
committerpfg <[email protected]>2017-03-07 17:33:44 -0800
commitb20d77edd1227b2ce53b65b0752972bd65a36e84 (patch)
treeb15615591e009c9aa472ba5d95374a064c50e8b1 /ShiftOS_TheReturn/Shiftorium.cs
parent4989356d6797335b44060ae94c9af34404773506 (diff)
parent449d43d22c1d12ce6aa0243fbb4ea94481ff8f4c (diff)
downloadshiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.tar.gz
shiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.tar.bz2
shiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.zip
Merge branch 'master' of https://github.com/shiftos-game/ShiftOS
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
{