refactor: Consolidate skill component logic into SkillComponentBase and update manager access to singletons.

This commit is contained in:
2026-01-31 17:35:27 +01:00
parent 425fa5b940
commit 288f0b1916
27 changed files with 212 additions and 179 deletions

View File

@@ -1,4 +1,5 @@
using Godot;
using System.Collections.Generic;
using Mr.BrickAdventures.scripts.Resources;
using Mr.BrickAdventures.scripts.State;
@@ -163,6 +164,19 @@ public partial class GameStateStore : Node
Session.SkillsUnlocked.Clear();
}
/// <summary>
/// Gets all unlocked skills from player persistence and current session.
/// </summary>
public List<SkillData> GetAllUnlockedSkills()
{
var result = new List<SkillData>(Player.UnlockedSkills);
foreach (var skill in Session.SkillsUnlocked)
{
if (!result.Contains(skill)) result.Add(skill);
}
return result;
}
#endregion
#region Reset Operations