Fix soundbird clicking issues

This commit is contained in:
Michal Pikulski
2025-12-16 17:19:01 +01:00
parent 4b1095887b
commit b516b093af
2 changed files with 6 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ public class SoundGenerator : MonoBehaviour
[SerializeField] private Sprite exitSprite; [SerializeField] private Sprite exitSprite;
[SerializeField] private AudioClip enterSound; [SerializeField] private AudioClip enterSound;
[SerializeField] private AppleAudioSource audioSource; [SerializeField] private AppleAudioSource audioSource;
[SerializeField] private AppleMachine soundBirdSMRef; [SerializeField] public AppleMachine soundBirdSMRef;
[SerializeField] private soundBird_CanFly soundbirdHearingCheck; [SerializeField] private soundBird_CanFly soundbirdHearingCheck;
private bool playerInside = false; private bool playerInside = false;

View File

@@ -223,6 +223,11 @@ namespace Interactions
/// </summary> /// </summary>
protected override (bool canProceed, string errorMessage) CanProceedWithInteraction() protected override (bool canProceed, string errorMessage) CanProceedWithInteraction()
{ {
// TODO: Fuck this but it's late, check if the soundbird can sill be interacted with
var soundGenerator = FindFirstObjectByType<SoundGenerator>(FindObjectsInactive.Exclude);
if (soundGenerator)
return (soundGenerator.soundBirdSMRef.currentState.name.ToLower().Contains("soundbird_slot"), "Sound Bird!");
var heldItem = FollowerController?.CurrentlyHeldItemData; var heldItem = FollowerController?.CurrentlyHeldItemData;
// Check if slot is locked after completion // Check if slot is locked after completion