Add MVP campfire audio hooks

This commit is contained in:
2026-05-19 12:08:16 -07:00
parent 47cd7a5479
commit 280fa76af2
5 changed files with 140 additions and 1 deletions
+20
View File
@@ -12,6 +12,8 @@
class UPointLightComponent;
class UParticleSystemComponent;
class UAgrarianPersistentActorComponent;
class UAudioComponent;
class USoundBase;
class UStaticMeshComponent;
UCLASS(Blueprintable)
@@ -49,6 +51,12 @@ public:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Agrarian|Fire|Effects")
TObjectPtr<UParticleSystemComponent> SmokeEffect;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Agrarian|Fire|Audio")
TObjectPtr<UAudioComponent> FireLoopAudioComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Agrarian|Fire|Audio")
TObjectPtr<UAudioComponent> FireEventAudioComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Agrarian|Fire|Persistence")
TObjectPtr<UAgrarianPersistentActorComponent> PersistentActorComponent;
@@ -85,6 +93,15 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Fire|Weather")
bool bWetWeatherCanExtinguish = true;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Fire|Audio")
TObjectPtr<USoundBase> FireLoopSound;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Fire|Audio")
TObjectPtr<USoundBase> IgniteSound;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|Fire|Audio")
TObjectPtr<USoundBase> ExtinguishSound;
virtual FText GetInteractionText_Implementation(const AAgrarianGameCharacter* Interactor) const override;
virtual bool CanInteract_Implementation(const AAgrarianGameCharacter* Interactor) const override;
virtual void Interact_Implementation(AAgrarianGameCharacter* Interactor) override;
@@ -113,6 +130,9 @@ protected:
UFUNCTION()
void OnRep_FireState();
UFUNCTION(NetMulticast, Unreliable)
void MulticastPlayFireEventSound(bool bIgnited);
EAgrarianWeatherType GetCurrentWeather() const;
void SetLit(bool bNewLit);
void UpdateVisualState();