refactor: Consolidate skill component logic into SkillComponentBase and update manager access to singletons.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user