| 551 | } |
| 552 | |
| 553 | bool AAlsxtCharacter::TrySetOverlaySlot(const FGameplayTag& TargetSlot, const FGameplayTag& NewOverlayMode, const FGameplayTag& NewCombatStance, const bool bForce) |
| 554 | { |
| 555 | bool ReturnValue = false; |
| 556 | if (bForce) |
| 557 | { |
| 558 | if (TargetSlot == ALSXTHandTags::BothHands) |
| 559 | { |
| 560 | if (auto OverlayInfo = ALSXTSettings->OverlaySettings.Overlays->Overlays.Find(GetOverlayMode())) |
| 561 | { |
| 562 | if (OverlayInfo->AvailableSlots.HasTag(ALSXTHandTags::BothHands)) |
| 563 | { |
| 564 | const FGameplayTagContainer EmptyContainer; |
| 565 | AnimationParametersState.OverlaySlots.OverlaySlotLeftHand = EmptyContainer; |
| 566 | AnimationParametersState.OverlaySlots.OverlaySlotRightHand = EmptyContainer; |
| 567 | AnimationParametersState.OverlaySlots.OverlaySlotBothHands.AddTagFast(NewOverlayMode); |
| 568 | AnimationParametersState.OverlaySlots.OverlaySlotBothHands.AppendTags(OverlayInfo->Settings); |
| 569 | return true; |
| 570 | } |
| 571 | } |
| 572 | else |
| 573 | { |
| 574 | return false; |
| 575 | } |
| 576 | } |
| 577 | else |
| 578 | { |
| 579 | if (TargetSlot == ALSXTHandTags::Left) |
| 580 | { |
| 581 | if (auto OverlayInfo = ALSXTSettings->OverlaySettings.Overlays->Overlays.Find(GetOverlayMode())) |
| 582 | { |
| 583 | // Find existing entry for slot |
| 584 | AnimationParametersState.OverlaySlots.OverlaySlotRightHand.HasTag(AlsxtOverlaySlotStanceTags::Active); |
| 585 | if (ALSXTSettings->OverlaySettings.Overlays->Overlays.Find(GetOverlayMode())->AvailableStances.HasTag(Stance)) |
| 586 | { |
| 587 | return true; |
| 588 | } |
| 589 | |
| 590 | //OverlayInfo. |
| 591 | AnimationParametersState.OverlaySlots.OverlaySlotLeftHand.AddTag(NewOverlayMode); |
| 592 | AnimationParametersState.OverlaySlots.OverlaySlotLeftHand.AddTag(Stance); |
| 593 | AnimationParametersState.OverlaySlots.OverlaySlotLeftHand.AppendTags(OverlayInfo->Settings); |
| 594 | return true; |
| 595 | } |
| 596 | else |
| 597 | { |
| 598 | return false; |
| 599 | } |
| 600 | } |
| 601 | else if (TargetSlot == ALSXTHandTags::Right) |
| 602 | { |
| 603 | return true; |
| 604 | } |
| 605 | else |
| 606 | { |
| 607 | return false; |
| 608 | } |
| 609 | } |
| 610 | } |
nothing calls this directly
no outgoing calls
no test coverage detected