|
@@ -24,6 +24,7 @@ namespace RolePlaying
|
|
/// The single Session instance that can be active at a time.
|
|
/// The single Session instance that can be active at a time.
|
|
/// </summary>
|
|
/// </summary>
|
|
private static Session singleton;
|
|
private static Session singleton;
|
|
|
|
+ internal static Session Singleton => singleton;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// The party that is playing the game right now.
|
|
/// The party that is playing the game right now.
|
|
@@ -38,6 +39,8 @@ namespace RolePlaying
|
|
get { return (singleton == null ? null : singleton.party); }
|
|
get { return (singleton == null ? null : singleton.party); }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ static GameStartDescription gameStartDesc;
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Change the current map, arriving at the given portal if any.
|
|
/// Change the current map, arriving at the given portal if any.
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -1485,6 +1488,8 @@ namespace RolePlaying
|
|
throw new ArgumentNullException("gameplayScreen");
|
|
throw new ArgumentNullException("gameplayScreen");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ gameStartDesc = gameStartDescription;
|
|
|
|
+
|
|
// end any existing session
|
|
// end any existing session
|
|
EndSession();
|
|
EndSession();
|
|
|
|
|
|
@@ -1497,14 +1502,6 @@ namespace RolePlaying
|
|
// set up the initial party
|
|
// set up the initial party
|
|
ContentManager contentManager = singleton.screenManager.Game.Content;
|
|
ContentManager contentManager = singleton.screenManager.Game.Content;
|
|
singleton.party = new Party(gameStartDescription, contentManager);
|
|
singleton.party = new Party(gameStartDescription, contentManager);
|
|
-
|
|
|
|
- /* var loadedQuestLine = content.Load<QuestLine>(
|
|
|
|
- Path.Combine("Quests", "QuestLines", gameStartDescription.QuestLineContentName)).Clone() as QuestLine;*/
|
|
|
|
-
|
|
|
|
- var questLine = QuestLine.Load(Path.Combine("Quests", "QuestLines", gameStartDescription.QuestLineContentName), contentManager);
|
|
|
|
-
|
|
|
|
- // load the quest line
|
|
|
|
- singleton.questLine = questLine;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -1693,6 +1690,21 @@ namespace RolePlaying
|
|
*/
|
|
*/
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ internal void StartMainQuestLine()
|
|
|
|
+ {
|
|
|
|
+ // load the quest line
|
|
|
|
+ /* var loadedQuestLine = content.Load<QuestLine>(
|
|
|
|
+ Path.Combine("Quests", "QuestLines", gameStartDescription.QuestLineContentName)).Clone() as QuestLine;*/
|
|
|
|
+
|
|
|
|
+ var questLine = QuestLine.Load(Path.Combine("Quests", "QuestLines", gameStartDesc.QuestLineContentName), singleton.screenManager.Game.Content);
|
|
|
|
+
|
|
|
|
+ if (singleton.questLine != questLine)
|
|
|
|
+ {
|
|
|
|
+ // set the quest line
|
|
|
|
+ singleton.questLine = questLine;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Save the current state of the session, with the given storage device.
|
|
/// Save the current state of the session, with the given storage device.
|
|
/// </summary>
|
|
/// </summary>
|