diff --git a/Scripts/GameManager.cs b/Scripts/GameManager.cs index 2bdf4a56..5714e2a4 100644 --- a/Scripts/GameManager.cs +++ b/Scripts/GameManager.cs @@ -69,6 +69,11 @@ public partial class GameManager : Node2D { Instance = this; + if (GlobalState.Instance.SessionSettings.AllowSaving) + { + GlobalState.Instance.SaveGame(); + } + _hud = GetNodeOrNull("HUD"); if (_hud == null) GD.Print("No HUD in scene."); @@ -189,10 +194,8 @@ public partial class GameManager : Node2D _player.Owner = this; } - _player.Transform = this.GlobalTransform; - _player.GlobalPosition = GetStartPosition(); LastCheckpointPosition = _player.GlobalPosition; diff --git a/Scripts/Utils/SessionSettings.cs b/Scripts/Utils/SessionSettings.cs index 69bfc106..549a5031 100644 --- a/Scripts/Utils/SessionSettings.cs +++ b/Scripts/Utils/SessionSettings.cs @@ -8,6 +8,8 @@ public class SessionSettings public bool SkipDialogues { get; set; } = false; public bool GodMode { get; set; } = false; + public bool AllowSaving { get; set; } = false; + public Godot.Collections.Dictionary Items { get; set; } = new(); public int LevelNumber { get; set; } = 0;