Restructured for new direction.
This commit is contained in:
@@ -179,7 +179,7 @@ namespace BriarQueen.Framework.Managers.Player
|
||||
}
|
||||
}
|
||||
|
||||
_audioManager.Play(AudioNameIdentifiers.Get(SFXKey.ItemCollected));
|
||||
_audioManager.Play(AudioNameIdentifiers.Get(SFXKey.ItemPickup));
|
||||
_eventCoordinator.PublishImmediate(new RequestGameSaveEvent());
|
||||
_eventCoordinator.Publish(new InventoryChangedEvent());
|
||||
}
|
||||
@@ -208,11 +208,21 @@ namespace BriarQueen.Framework.Managers.Player
|
||||
|
||||
#region Codex
|
||||
|
||||
public void UnlockCodex() => _codex.UnlockCodex();
|
||||
|
||||
public bool CodexUnlocked()
|
||||
{
|
||||
return _codex is { CodexUnlocked: true };
|
||||
}
|
||||
|
||||
public void UnlockCodexEntry(string uniqueIdentifier)
|
||||
{
|
||||
var entry = _codexRegistry.FindEntryByID(uniqueIdentifier);
|
||||
if (entry == null)
|
||||
{
|
||||
Debug.LogWarning($"[PlayerManager] Could not unlock codex entry '{uniqueIdentifier}'.");
|
||||
return;
|
||||
}
|
||||
|
||||
UnlockCodexEntry(entry);
|
||||
}
|
||||
@@ -243,7 +253,7 @@ namespace BriarQueen.Framework.Managers.Player
|
||||
}
|
||||
}
|
||||
|
||||
_tutorialService.DisplayTutorial(TutorialPopupID.Codex);
|
||||
_tutorialService.DisplayTutorial(TutorialPopupID.CodexKeyboard);
|
||||
|
||||
_eventCoordinator.PublishImmediate(new RequestGameSaveEvent());
|
||||
_eventCoordinator.Publish(new CodexChangedEvent(entry.EntryType));
|
||||
@@ -382,7 +392,7 @@ namespace BriarQueen.Framework.Managers.Player
|
||||
|
||||
private void LoadCodexFromSave(SaveGame save)
|
||||
{
|
||||
_codex = new Codex();
|
||||
_codex = new Codex(save.CodexUnlocked);
|
||||
|
||||
if (save.DiscoveredCodexEntries != null)
|
||||
{
|
||||
@@ -458,4 +468,4 @@ namespace BriarQueen.Framework.Managers.Player
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user