Fix puzzle unlock issues

This commit is contained in:
Michal Pikulski
2025-10-02 07:16:39 +02:00
parent eabc1de569
commit a6c63af911
3 changed files with 26 additions and 5 deletions

View File

@@ -136,7 +136,16 @@ namespace Interactions
}
FollowerController?.TryPickupItem(gameObject, itemData);
bool wasPickedUp = (combinationResult == FollowerController.CombinationResult.NotApplicable);
var step = GetComponent<PuzzleS.ObjectiveStepBehaviour>();
if (step != null && !step.IsStepUnlocked())
{
Interactable.BroadcastInteractionComplete(false);
return;
}
bool wasPickedUp = (combinationResult == FollowerController.CombinationResult.NotApplicable
|| combinationResult == FollowerController.CombinationResult.Unsuccessful);
Interactable.BroadcastInteractionComplete(wasPickedUp);
// Update pickup state and invoke event when the item was picked up successfully