using Cthangover.Core.Audio; using Cthangover.Core.Battle; using Cthangover.Core.Mods; using Cthangover.Core.Mods.Resolvers; using Cthangover.Core.Scenes; using Cthangover.Core.Settings; using Cthangover.Mods.Interface.Base.Lists; using Cthangover.Core.UI.Theming; using Cthangover.Core.Utils; using Godot; namespace Cthangover.TurnBattle { /// /// Defeat screen widget. Minimal compared to WingroundBehaviour — /// only sets the deadground background texture (resolved from mods) /// and offers a Main Menu button that clears BattleData and reloads /// the menu scene. No loot, no EXP. /// public partial class DeadgroundBehaviour : TransitionWidget { /// /// Clears battle data and switches to the main menu scene. /// Bound to the "Main Menu" button on the defeat screen. /// public void ToMainMenuClick() { var sceneService = GetNode("/root/GodotSceneService"); sceneService?.SwitchToMenu(); BattleRequest.Current = null; } /// /// Plays the defeat sound, resolves the deadground background /// texture from mods, and shows the transition widget. /// public override void Show() { CthangoverTheme.Apply(this); CthangoverTheme.ApplyPrimary(GetNodeOrNull