Implement bazar quick sell, import emojis, bazaar iteration
This commit is contained in:
@@ -103,6 +103,18 @@ void UDialogueComponent::TriggerDialogue(USpeechDataAsset* DialogueAssetPath, co
|
||||
CurrentActiveDialogue = DialogueAssetPath;
|
||||
CurrentDialogueReplacementMap = ReplacementMap;
|
||||
DialogueWidget->DisplayDialogue(CurrentActiveDialogue, GetOwner(), CurrentDialogueReplacementMap);
|
||||
|
||||
if (DialogueAssetPath->RandomizeLines && !DialogueAssetPath->PlayerSpeechMap.IsEmpty())
|
||||
{
|
||||
MappedDialogueOptions.Empty();
|
||||
TArray<FText> PlayerSpeakOptions;
|
||||
for (int32 i = 0; i <= CurrentActiveDialogue->PlayerSpeechMap.Num() - 1; i++)
|
||||
{
|
||||
MappedDialogueOptions.Add(i, CurrentActiveDialogue->PlayerSpeechMap[i]);
|
||||
PlayerSpeakOptions.Add(CurrentActiveDialogue->PlayerSpeechMap[i].PlayerSpeak);
|
||||
}
|
||||
TriggerDialogueSelect(PlayerSpeakOptions, false);
|
||||
}
|
||||
}
|
||||
|
||||
TArray<USpeechDataAsset*> UDialogueComponent::GetActiveSpeechData() { return ActiveSpeechData; }
|
||||
@@ -166,13 +178,16 @@ void UDialogueComponent::AdvanceDialogue()
|
||||
return;
|
||||
}
|
||||
|
||||
const FSoftObjectPath EventToTrigger = CurrentActiveDialogue->DialogueLines[CurrentLineIndex].TriggerEventStart;
|
||||
if (!EventToTrigger.IsNull())
|
||||
if (CurrentLineIndex < CurrentActiveDialogue->DialogueLines.Num())
|
||||
{
|
||||
UGameEventSubsystem::GetGameEventSubsystem()->StartEvent(EventToTrigger);
|
||||
const FSoftObjectPath EventToTrigger = CurrentActiveDialogue->DialogueLines[CurrentLineIndex].TriggerEventStart;
|
||||
if (!EventToTrigger.IsNull())
|
||||
{
|
||||
UGameEventSubsystem::GetGameEventSubsystem()->StartEvent(EventToTrigger);
|
||||
}
|
||||
}
|
||||
|
||||
if (CurrentLineIndex < CurrentActiveDialogue->DialogueLines.Num() - 1)
|
||||
if (!CurrentActiveDialogue->RandomizeLines && (CurrentLineIndex <= CurrentActiveDialogue->DialogueLines.Num() - 1))
|
||||
{
|
||||
CurrentLineIndex++;
|
||||
DialogueWidget->AdvanceDialogue(CurrentActiveDialogue->DialogueLines[CurrentLineIndex].DialogueLine, CurrentActiveDialogue->DialogueLines[CurrentLineIndex].SpeakerName);
|
||||
@@ -183,7 +198,7 @@ void UDialogueComponent::AdvanceDialogue()
|
||||
{
|
||||
MappedDialogueOptions.Empty();
|
||||
TArray<FText> PlayerSpeakOptions;
|
||||
for (int32 i = 0; i < CurrentActiveDialogue->PlayerSpeechMap.Num() - 1; i++)
|
||||
for (int32 i = 0; i <= CurrentActiveDialogue->PlayerSpeechMap.Num() - 1; i++)
|
||||
{
|
||||
MappedDialogueOptions.Add(i, CurrentActiveDialogue->PlayerSpeechMap[i]);
|
||||
PlayerSpeakOptions.Add(CurrentActiveDialogue->PlayerSpeechMap[i].PlayerSpeak);
|
||||
|
||||
@@ -11,3 +11,8 @@ void UDialogueWidget::NativeOnInitialized()
|
||||
|
||||
EleriPlayerController = Cast<AEleriPlayerController>(UGameplayStatics::GetPlayerController(GetWorld(), 0));
|
||||
}
|
||||
|
||||
void UDialogueWidget::HandleUiInputAction_Implementation(EEleriUIInputAction InputAction)
|
||||
{
|
||||
UE_LOG(LogTemp, Warning, TEXT(""));
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ public:
|
||||
|
||||
bool IsTypingDialogue() const { return bIsTypingDialogue; }
|
||||
|
||||
virtual void HandleUiInputAction_Implementation(EEleriUIInputAction InputAction) override;
|
||||
|
||||
protected:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool bIsAnimating = false;
|
||||
|
||||
@@ -64,7 +64,7 @@ int32 UInventoryComponent::ItemExists(FPrimaryAssetId ItemToCheck, bool IsSeed,
|
||||
|
||||
bool UInventoryComponent::AddItemToInventory(FPrimaryAssetId ItemToAdd, int32 StackSize, bool Seed, bool HighQuality)
|
||||
{
|
||||
if (ItemList.Num() >= Capacity || !ItemToAdd.IsValid()) return false;
|
||||
if (!ItemToAdd.IsValid()) return false;
|
||||
|
||||
int32 itemIndex = ItemExists(ItemToAdd, Seed, HighQuality);
|
||||
if (itemIndex == -1)
|
||||
|
||||
@@ -10,3 +10,32 @@ enum class ECurrentlyDoing : uint8
|
||||
WATERING
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ENpcEmotion : uint8
|
||||
{
|
||||
None,
|
||||
Neutral,
|
||||
|
||||
// Happiness
|
||||
Content,
|
||||
Happy,
|
||||
Overjoyed,
|
||||
|
||||
// Sadness
|
||||
Down,
|
||||
Sad,
|
||||
Devastated,
|
||||
|
||||
// Anger
|
||||
Annoyed,
|
||||
Angry,
|
||||
Furious,
|
||||
|
||||
// Fear
|
||||
Uneasy,
|
||||
Afraid,
|
||||
Terrified,
|
||||
|
||||
MAX UMETA(Hidden)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user