mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 11:45:53 +00:00
Tweaks to map loading
This commit is contained in:
parent
1c7afec7e2
commit
e56b896365
1 changed files with 8 additions and 8 deletions
|
|
@ -98,13 +98,12 @@ public partial class GlobalState : Node
|
|||
|
||||
private void DeferredGotoScene(string path, MapStartDataResource startData = null)
|
||||
{
|
||||
// if (InventoryManager.Instance is not null)
|
||||
// {
|
||||
// SessionSettings.Items = InventoryManager.Instance.Save();
|
||||
// }
|
||||
|
||||
// It is now safe to remove the current scene.
|
||||
CurrentScene.Free();
|
||||
|
||||
//var sceneParent = CurrentScene.GetParent();
|
||||
//sceneParent.RemoveChild(CurrentScene);
|
||||
//sceneParent.QueueFree();
|
||||
|
||||
// Load a new scene.
|
||||
var nextScene = GD.Load<PackedScene>(path);
|
||||
|
|
@ -128,9 +127,10 @@ public partial class GlobalState : Node
|
|||
DeferredAddStartDataToGameManager(startData);
|
||||
}
|
||||
|
||||
if (GameManager.Instance is not null) {
|
||||
GameManager.Instance.ApplySessionState(SessionSettings);
|
||||
}
|
||||
// Do not do this here because it might get the old gamemanager instead
|
||||
// if (GameManager.Instance is not null) {
|
||||
// GameManager.Instance.ApplySessionState(SessionSettings);
|
||||
// }
|
||||
|
||||
FadeIn();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue