From 28a408de1bb4710c21bf0f962b6a26baabb59695 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Thu, 17 Oct 2024 13:29:47 -0700 Subject: [PATCH] Add ISave interface --- State/Global/GlobalState.cs | 2 +- Utils/ISave.cs | 12 ++++++++++++ Utils/Save.cs | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 Utils/ISave.cs diff --git a/State/Global/GlobalState.cs b/State/Global/GlobalState.cs index 734b861..286693d 100644 --- a/State/Global/GlobalState.cs +++ b/State/Global/GlobalState.cs @@ -3,7 +3,7 @@ using SupaLidlGame.Utils; namespace SupaLidlGame.State.Global; -public partial class GlobalState : Node +public partial class GlobalState : Node, ISave { [Export] public Progression Progression { get; set; } diff --git a/Utils/ISave.cs b/Utils/ISave.cs new file mode 100644 index 0000000..4affb77 --- /dev/null +++ b/Utils/ISave.cs @@ -0,0 +1,12 @@ +using Godot; + +namespace SupaLidlGame.Utils; + +public interface ISave +{ + public State.Global.Progression Progression { get; set; } + + public State.Global.MapState MapState { get; set; } + + public State.Global.Stats Stats { get; set; } +} diff --git a/Utils/Save.cs b/Utils/Save.cs index 2ee0471..c69837f 100644 --- a/Utils/Save.cs +++ b/Utils/Save.cs @@ -2,7 +2,7 @@ using Godot; namespace SupaLidlGame.Utils; -public partial class Save : Resource +public partial class Save : Resource, ISave { [Export] public State.Global.Progression Progression { get; set; }