diff --git a/Scenes/HUD/debug_menu.tscn b/Scenes/HUD/debug_menu.tscn index f7df2fb5..628ec27e 100644 --- a/Scenes/HUD/debug_menu.tscn +++ b/Scenes/HUD/debug_menu.tscn @@ -48,4 +48,5 @@ theme = ExtResource("2_wqb8e") theme_override_font_sizes/font_size = 10 text = "Back" +[connection signal="toggled" from="HBoxContainer/CheckBox" to="." method="_on_check_box_toggled"] [connection signal="pressed" from="ScrollContainer/Level Select/BackButton" to="." method="_on_back_button_pressed"] diff --git a/Scripts/Components/FSM/EnemyFSMState.cs.uid b/Scripts/Components/FSM/EnemyFSMState.cs.uid new file mode 100644 index 00000000..64064aae --- /dev/null +++ b/Scripts/Components/FSM/EnemyFSMState.cs.uid @@ -0,0 +1 @@ +uid://c20xwj1qfygv4 diff --git a/Scripts/Components/FSM/FSMStateModule.cs.uid b/Scripts/Components/FSM/FSMStateModule.cs.uid new file mode 100644 index 00000000..c76fae14 --- /dev/null +++ b/Scripts/Components/FSM/FSMStateModule.cs.uid @@ -0,0 +1 @@ +uid://lpxtxygu8wnr diff --git a/Scripts/Components/FSM/PlayerFSMState.cs.uid b/Scripts/Components/FSM/PlayerFSMState.cs.uid new file mode 100644 index 00000000..c30f2fd1 --- /dev/null +++ b/Scripts/Components/FSM/PlayerFSMState.cs.uid @@ -0,0 +1 @@ +uid://c3cggej0mbv1f diff --git a/Scripts/GameManager.cs b/Scripts/GameManager.cs index 34b7aad1..60d14c83 100644 --- a/Scripts/GameManager.cs +++ b/Scripts/GameManager.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Cirno.Scripts; using Cirno.Scripts.Resources; using Godot.Collections; +using Cirno.Scripts.Utils; public partial class GameManager : Node2D { @@ -99,7 +100,10 @@ public partial class GameManager : Node2D MapStartData = mapStartData; StartingEquipment.AddRange(mapStartData.StartingEquipment); - + } + + public void ApplySessionState(SessionSettings settings) + { } diff --git a/Scripts/GlobalState.cs b/Scripts/GlobalState.cs index 9b57b9b7..58eca6be 100644 --- a/Scripts/GlobalState.cs +++ b/Scripts/GlobalState.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Cirno.Scripts.Resources; +using Cirno.Scripts.Utils; using Godot; using GTweens.Builders; using GTweensGodot.Extensions; @@ -12,6 +13,8 @@ public partial class GlobalState : Node private ColorRect _fader { get; set; } + public SessionSettings SessionSettings { get; set; } + public override void _Ready() { Instance = this; @@ -80,6 +83,10 @@ public partial class GlobalState : Node // Call deferred if it gives issues DeferredAddStartDataToGameManager(startData); } + + if (GameManager.Instance is not null) { + GameManager.Instance.ApplySessionState(SessionSettings); + } FadeIn(); } diff --git a/Scripts/UI/DebugMenu.cs b/Scripts/UI/DebugMenu.cs index 5e13261d..95f8b32c 100644 --- a/Scripts/UI/DebugMenu.cs +++ b/Scripts/UI/DebugMenu.cs @@ -52,6 +52,11 @@ public partial class DebugMenu : MenuBase EmitSignal(SignalName.MenuClosed); } + private void _on_check_box_toggled(bool state) + { + GlobalState.Instance.SessionSettings.SkipDialogues = state; + } + // Called every frame. 'delta' is the elapsed time since the previous frame. public override void _Process(double delta) { diff --git a/Scripts/Utils/SessionSettings.cs b/Scripts/Utils/SessionSettings.cs new file mode 100644 index 00000000..dcfb3b6c --- /dev/null +++ b/Scripts/Utils/SessionSettings.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +namespace Cirno.Scripts.Utils; + +public class SessionSettings +{ + public bool SkipDialogues { get; set; } = false; + public bool GodMode { get; set; } = false; + + public Dictionary Items {get;set;} = new(); + + public float Health {get;set;} + public float Shield {get;set;} +} diff --git a/Scripts/Utils/SessionSettings.cs.uid b/Scripts/Utils/SessionSettings.cs.uid new file mode 100644 index 00000000..a88bfcde --- /dev/null +++ b/Scripts/Utils/SessionSettings.cs.uid @@ -0,0 +1 @@ +uid://djtfoik0lusp