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);
|
||||
|
||||
Reference in New Issue
Block a user