Improved detective board system

This commit is contained in:
2026-02-10 03:00:42 +01:00
parent b172762d4f
commit 8758d6eaeb
28 changed files with 3211 additions and 305 deletions
@@ -67,17 +67,32 @@ namespace Unheimlich.Managers
BoardPosition = clueData.InitialPosition
};
Debug.Log($"[DetectiveBoardManager] Unlocked clue: {clueData.Title}");
OnClueUnlocked?.Invoke(clueData);
}
else if (!_clueStates[clueData.ClueID].IsUnlocked)
{
_clueStates[clueData.ClueID].IsUnlocked = true;
Debug.Log($"[DetectiveBoardManager] Unlocked clue: {clueData.Title}");
OnClueUnlocked?.Invoke(clueData);
}
}
/// <summary>
/// Returns a list of all currently unlocked clues.
/// Used by DetectiveBoardCanvas to display already-unlocked clues on initialization.
/// </summary>
public List<ClueData> GetUnlockedClues()
{
List<ClueData> unlockedClues = new List<ClueData>();
foreach (var state in _clueStates.Values)
{
if (state.IsUnlocked)
{
unlockedClues.Add(state.Data);
}
}
return unlockedClues;
}
/// <summary>
/// Unlocks a clue by its ID string.
/// </summary>
@@ -88,7 +103,6 @@ namespace Unheimlich.Managers
if (!state.IsUnlocked)
{
state.IsUnlocked = true;
Debug.Log($"[DetectiveBoardManager] Unlocked clue: {state.Data.Title}");
OnClueUnlocked?.Invoke(state.Data);
}
}