1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 |
local ACCEPT = true
local REJECT = false
-- Style Constants
local FRAME_BORDER_PADDING_KEYBOARD = 4
local FRAME_BORDER_PADDING_GAMEPAD = 8
ZO_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_KEYBOARD = 64
ZO_FRAMED_ANTIQUITY_ICON_DIMENSIONS_KEYBOARD = ZO_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_KEYBOARD - FRAME_BORDER_PADDING_KEYBOARD
ZO_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_GAMEPAD = 64
ZO_FRAMED_ANTIQUITY_ICON_DIMENSIONS_GAMEPAD = ZO_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_GAMEPAD - FRAME_BORDER_PADDING_GAMEPAD
ZO_SET_COMPLETE_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_KEYBOARD = 100
ZO_SET_COMPLETE_FRAMED_ANTIQUITY_ICON_DIMENSIONS_KEYBOARD = ZO_SET_COMPLETE_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_KEYBOARD - FRAME_BORDER_PADDING_KEYBOARD
ZO_SET_COMPLETE_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_GAMEPAD = 100
ZO_SET_COMPLETE_FRAMED_ANTIQUITY_ICON_DIMENSIONS_GAMEPAD = ZO_SET_COMPLETE_FRAMED_ANTIQUITY_FRAME_DIMENSIONS_GAMEPAD - FRAME_BORDER_PADDING_GAMEPAD
-- Timeline Constants
ZO_ANTIQUITY_DIGGING_FANFARE_OUT_DELAY = 30
ZO_ANTIQUITY_DIGGING_FANFARE_OUT_DURATION = 40
local SET_PROGRESSION_FRAMED_ICON_DELAY_MODIFIER_MS = 35
ZO_PROGRESSION_FRAMED_ICON_FADE_DURATION_MS = 300
ZO_PROGRESSION_FRAMED_ICON_SCALE_DURATION_MS = 100
ZO_END_OF_GAME_FANFARE_TRIGGER_COMMANDS =
{
BEGIN = "Begin" ,
NEXT = "Next" ,
ANIMATION_COMPLETE = "AnimationComplete" ,
PARTIAL_ANIMATION_COMPLETE = "PartialAnimationComplete" , -- For use in the animation event count trigger where we expect more than one call before we count all animations as complete and move on
}
return object
end
if newState == SCENE_FRAGMENT_HIDDEN then
end
end )
-- make sure we start at the beginning of the state machine on start
end )
end
end )
end
self . modalUnderlayTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingModalUnderlayFade" , self . modalUnderlay )
-- Control style tamplating
end
end
end
end
end
--Keybind
self . keybindTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingSummaryKeybindFade" , self . keybindButtonsControl )
local primaryDescriptor =
{
end ,
}
local secondaryDescriptor =
{
end ,
}
-- Failure
self . failureTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingFailureFade" , self . failureControl )
-- Rewards
self . rewardsOutTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingRewardsOutTimeline" , self . rewardsControl )
-- SetSkipAnimationsBehindPlayheadOnInitialPlay is needed because the animations have delays.
-- Without this, when playing the animation directly to start, it won't set the various states because the position is technically beyond the playhead
-- Antiquity Reward
self . antiquityRewardTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingAntiquityRewardInTimeline" , self . antiquityRewardControl )
self . rewardAntiquityHeaderLabelRevealer : SetSizeAnimation ( self . antiquityRewardTimeline : GetAnimation ( 2 ) )
self . rewardAntiquitySubHeaderLabelRevealer : SetSizeAnimation ( self . antiquityRewardTimeline : GetAnimation ( 8 ) )
self . rewardAntiquityNameLabelRevealer : SetSizeAnimation ( self . antiquityRewardTimeline : GetAnimation ( 9 ) )
-- New Lead
self . newLeadTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingRewardNewLeadFade" , self . newLeadControl )
-- Bonus Loot
self . bonusesRowControlPool = ZO_ControlPool : New ( "ZO_AntiquityBonusLootRowContainer_Control" , bonusItemsContainer )
end )
end )
self . bonusRewardsTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingRewardBonusesFade" , self . bonusRewardsControl )
-- Set Progression
self . setProgressionTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingSetProgressionFade" , self . setProgressionControl )
local desaturation = desaturateControl and 1 or 0
local rgbSampleProcessingWeight = showSilhouette and 0.7 or 1.0
local alphaAsRGBSampleProcessingWeight = showSilhouette and 0.3 or 0.0
control . iconTexture : SetTextureSampleProcessingWeight ( TEX_SAMPLE_PROCESSING_RGB , rgbSampleProcessingWeight )
control . iconTexture : SetTextureSampleProcessingWeight ( TEX_SAMPLE_PROCESSING_ALPHA_AS_RGB , alphaAsRGBSampleProcessingWeight )
end
if completedPlaying then
ANTIQUITY_DIGGING_SUMMARY : HandleCommand ( ZO_END_OF_GAME_FANFARE_TRIGGER_COMMANDS . PARTIAL_ANIMATION_COMPLETE )
end
end
self . setProgressionAntiquityIconPool = ZO_ControlPool : New ( "ZO_AntiquityDigging_FramedAntiquityIcon" , self . setProgressionEntriesContainer , "AntiquityIcon" )
control . fadeTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingFramedAntiquityIconFade" , control )
end )
local IGNORE_ANIMATION_CALLBACKS = true
end )
-- Control will be set when we know which one is the relevant one
self . setProgressionAntiquityIconScaleTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingFramedAntiquityIconScale" )
self . setProgressionAntiquityIconScaleTimeline : SetHandler ( "OnStop" , function ( timeline , completedPlaying )
if completedPlaying then
-- 1. The control started out regular size and unfulfilled, then it started growing
-- 4. Done shrinking, ready to move on
else
-- 2. After fully growing, mark fulfilled
local DONT_DESATURATE , DONT_SHOW_SILHOUETTE = false , false
self . setProgressionControlForCurrentAntiquity : SetDisplayBehavior ( DONT_DESATURATE , DONT_SHOW_SILHOUETTE )
if self . isAntiquitySetComplete then
else
end
-- 3. Then start shrinking back to normal
end
end
end )
-- Set Complete
self . setCompleteFramedAntiquityIconTexture = self . setCompleteFramedAntiquityControl : GetNamedChild ( "Icon" )
self . setCompleteTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingSetCompleteFade" , self . setCompleteControl )
-- Transfer
self . transferTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingTransferFade" , self . transferControl )
-- Lore
self . loreTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingLoreFade" , self . loreControl )
end
local setProgressionSparksParticleSystem = ZO_ControlParticleSystem : New ( ZO_AnalyticalPhysicsParticle_Control )
setProgressionSparksParticleSystem : SetParticleParameter ( "Texture" , "EsoUI/Art/PregameAnimatedBackground/ember.dds" )
setProgressionSparksParticleSystem : SetParticleParameter ( "DurationS" , ZO_UniformRangeGenerator : New ( 1 , 1.5 ) )
setProgressionSparksParticleSystem : SetParticleParameter ( "PhysicsInitialVelocityElevationRadians" , ZO_UniformRangeGenerator : New ( 0 , FULL_CIRCLE_RADIANS ) )
setProgressionSparksParticleSystem : SetParticleParameter ( "PhysicsInitialVelocityMagnitude" , ZO_UniformRangeGenerator : New ( 15 , 60 ) )
setProgressionSparksParticleSystem : SetParticleParameter ( "Size" , ZO_UniformRangeGenerator : New ( 5 , 10 ) )
self . setProgressionSparksParticleSystem = setProgressionSparksParticleSystem
local setCompleteBlastParticleSystem = ZO_ControlParticleSystem : New ( ZO_NumericalPhysicsParticle_Control )
setCompleteBlastParticleSystem : SetParticleParameter ( "Texture" , "EsoUI/Art/PregameAnimatedBackground/ember.dds" )
setCompleteBlastParticleSystem : SetParticleParameter ( "DurationS" , ZO_UniformRangeGenerator : New ( 1.5 , 2.5 ) )
setCompleteBlastParticleSystem : SetParticleParameter ( "PhysicsInitialVelocityElevationRadians" , ZO_UniformRangeGenerator : New ( 0 , FULL_CIRCLE_RADIANS ) )
setCompleteBlastParticleSystem : SetParticleParameter ( "PhysicsAccelerationElevationRadians1" , math . rad ( 270 ) ) --Down; Right is 0
setCompleteBlastParticleSystem : SetParticleParameter ( "PhysicsInitialVelocityMagnitude" , ZO_UniformRangeGenerator : New ( 500 , 900 ) )
self . setCompleteBlastParticleSystem = setCompleteBlastParticleSystem
local setCompleteSparksParticleSystem = ZO_ControlParticleSystem : New ( ZO_AnalyticalPhysicsParticle_Control )
setCompleteSparksParticleSystem : SetParticleParameter ( "Texture" , "EsoUI/Art/PregameAnimatedBackground/ember.dds" )
setCompleteSparksParticleSystem : SetParticleParameter ( "DurationS" , ZO_UniformRangeGenerator : New ( 1.5 , 2.0 ) )
setCompleteSparksParticleSystem : SetParticleParameter ( "PhysicsInitialVelocityElevationRadians" , ZO_UniformRangeGenerator : New ( 0 , FULL_CIRCLE_RADIANS ) )
setCompleteSparksParticleSystem : SetParticleParameter ( "PhysicsInitialVelocityMagnitude" , ZO_UniformRangeGenerator : New ( 15 , 60 ) )
self . setCompleteSparksParticleSystem = setCompleteSparksParticleSystem
local setCompleteStarbustParticleSystem = ZO_ControlParticleSystem : New ( ZO_StationaryParticle_Control )
setCompleteStarbustParticleSystem : SetParticleParameter ( "Texture" , "EsoUI/Art/Miscellaneous/lensflare_star_256.dds" )
setCompleteStarbustParticleSystem : SetParticleParameter ( "StartScale" , ZO_UniformRangeGenerator : New ( 1.5 , 1.8 ) )
setCompleteStarbustParticleSystem : SetParticleParameter ( "EndScale" , ZO_UniformRangeGenerator : New ( 1.05 , 1.5 ) )
setCompleteStarbustParticleSystem : SetParticleParameter ( "DurationS" , ZO_UniformRangeGenerator : New ( 1 , 2 ) )
setCompleteStarbustParticleSystem : SetParticleParameter ( "StartRotationRadians" , ZO_UniformRangeGenerator : New ( 0 , FULL_CIRCLE_RADIANS ) )
MIN_ROTATION_SPEED , 0.25 ,
MAX_ROTATION_SPEED , 0.25 ,
- MIN_ROTATION_SPEED , 0.25 ,
- MAX_ROTATION_SPEED , 0.25 )
setCompleteStarbustParticleSystem : SetParticleParameter ( "RotationSpeedRadians" , headerStarbustRotationSpeedGenerator )
self . setCompleteStarbustParticleSystem = setCompleteStarbustParticleSystem
end
else
end
end
self . fanfareStateMachine = fanfareStateMachine
local IGNORE_ANIMATION_CALLBACKS = true
do
end )
end
do
-- This state primarily exists to allow the two possible paths (REWARD_IN/FAILURE_IN) to run their conditionals
-- And to animate shared controls
end )
end
do
self : ConfigureKeybindButton ( self . primaryKeybindButton , true , GetString ( SI_ANTIQUITY_DIGGING_FANFARE_NEXT ) )
end )
end
end )
end
do
end )
end
do
end )
end
do
-- We may have gotten here via a skip, which means we may never have even made it into the interstitial states
-- So just ensure these animations are where we want them to be by this point in the flow
if self . hasNewLead then
end
-- The bonus rewards section always shows even if there aren't any rewards
end )
end
do
end )
end
end )
end
do
end )
if primaryAnimationIsPlaying then
end
end
end
local DONT_DESATURATE , DONT_SHOW_SILHOUETTE = false , false
self . setProgressionControlForCurrentAntiquity : SetDisplayBehavior ( DONT_DESATURATE , DONT_SHOW_SILHOUETTE )
end
end )
end
do
end )
end
end )
end
do
end )
end
end )
end
do
end )
end
end )
end
do
end )
end )
end
do
end )
end
do
end
end )
end
do
end )
end
do
end )
end
-- Edges --
do
return self . gameOverFlags == ANTIQUITY_DIGGING_GAME_OVER_FLAGS_VICTORY
end )
local antiquityRewardToNewLeadInEdge = fanfareStateMachine : AddEdgeAutoName ( "ANTIQUITY_REWARD_IN" , "NEW_LEAD_IN" )
return self . hasNewLead
end )
local antiquityRewardToBonusRewardsInEdge = fanfareStateMachine : AddEdgeAutoName ( "ANTIQUITY_REWARD_IN" , "BONUS_REWARDS_IN" )
return not self . hasNewLead
end )
fanfareStateMachine : AddEdge ( "ANTIQUITY_REWARD_IN_TO_REWARDS_SKIP" , "ANTIQUITY_REWARD_IN" , "REWARDS" )
return self . showLore or self . hasAntiquitySet
end )
local rewardsOutToSetProgressionInEdge = fanfareStateMachine : AddEdgeAutoName ( "REWARDS_OUT" , "SET_PROGRESSION_IN" )
return self . hasAntiquitySet
end )
return not self . hasAntiquitySet and self . showLore
end )
local setProgressionOutEdge = fanfareStateMachine : AddEdgeAutoName ( "SET_PROGRESSION" , "SET_PROGRESSION_OUT" )
return self . isAntiquitySetComplete or self . showLore
end )
local setProgressionOutToTransferEdge = fanfareStateMachine : AddEdgeAutoName ( "SET_PROGRESSION_OUT" , "TRANSFER" )
return not self . isAntiquitySetComplete and self . showLore
end )
local setProgressionOutToSetCompleteInEdge = fanfareStateMachine : AddEdgeAutoName ( "SET_PROGRESSION_OUT" , "SET_COMPLETE_IN" )
return self . isAntiquitySetComplete
end )
return not self . showLore
end )
end )
return self . showLore
end )
return self . gameOverFlags ~= ANTIQUITY_DIGGING_GAME_OVER_FLAGS_VICTORY
end )
return not ( self . showLore or self . hasAntiquitySet )
end )
end )
self : ConfigureKeybindButton ( self . secondaryKeybindButton , true , GetString ( SI_ANTIQUITY_DIGGING_FANFARE_CODEX ) )
end )
return not ( self . showLore or self . isAntiquitySetComplete )
end )
end )
-- If the player skips the failure at any point, just let them quit
end
-- Triggers --
fanfareStateMachine : AddTrigger ( "BEGIN" , ZO_StateMachine_TriggerStateCallback , ZO_END_OF_GAME_FANFARE_TRIGGER_COMMANDS . BEGIN )
fanfareStateMachine : AddTrigger ( "NEXT" , ZO_StateMachine_TriggerStateCallback , ZO_END_OF_GAME_FANFARE_TRIGGER_COMMANDS . NEXT )
fanfareStateMachine : AddTrigger ( "ANIMATION_COMPLETE" , ZO_StateMachine_TriggerStateCallback , ZO_END_OF_GAME_FANFARE_TRIGGER_COMMANDS . ANIMATION_COMPLETE )
do
local trigger = fanfareStateMachine : AddTrigger ( "SET_PROGRESSION_ANIMATIONS_COMPLETE" , ZO_StateMachine_TriggerStateCallback , ZO_END_OF_GAME_FANFARE_TRIGGER_COMMANDS . PARTIAL_ANIMATION_COMPLETE )
local NUM_SCALE_ANIMATIONS = 1
return numFadeAnimations + NUM_SCALE_ANIMATIONS
end )
end
fanfareStateMachine : AddTrigger ( "TIME_HAS_PASSED" , ZO_StateMachine_TriggerStateCallback , ZO_END_OF_GAME_FANFARE_TRIGGER_COMMANDS . TIME_HAS_PASSED )
-- Add triggers to edges --
fanfareStateMachine : AddTriggerToEdge ( "ANIMATION_COMPLETE" , "ANTIQUITY_REWARD_IN_TO_BONUS_REWARDS_IN" )
fanfareStateMachine : AddTriggerToEdge ( "SET_PROGRESSION_ANIMATIONS_COMPLETE" , "SET_PROGRESSION_IN_TO_SET_PROGRESSION" )
fanfareStateMachine : AddTriggerToEdge ( "ANIMATION_COMPLETE" , "SET_PROGRESSION_OUT_TO_SET_COMPLETE_IN" )
-- Animation callbacks --
if completedPlaying then
end
end
else
end
end
end )
local transferToNextDayCompleteTrigger = fanfareStateMachine : AddTrigger ( "TRANSFER_TO_LORE_IN" , ZO_StateMachine_TriggerEventManager , EVENT_ANTIQUITY_DIGGING_TRANSITION_TO_NEXT_DAY_COMPLETE )
fanfareStateMachine : GetEdgeByName ( "TRANSFER_TO_LORE_IN" ) : AddTrigger ( transferToNextDayCompleteTrigger )
-- Reset state machine
end
ApplyTemplateToControl ( self . failureControl , ZO_GetPlatformTemplate ( "ZO_AntiquityDiggingSummary_Failure" ) )
ApplyTemplateToControl ( self . antiquityRewardControl , ZO_GetPlatformTemplate ( "ZO_AntiquityDiggingSummary_AntiquityReward" ) )
ApplyTemplateToControl ( self . newLeadControl , ZO_GetPlatformTemplate ( "ZO_AntiquityDiggingSummary_NewLead" ) )
ApplyTemplateToControl ( self . bonusRewardsControl , ZO_GetPlatformTemplate ( "ZO_AntiquityDiggingSummary_BonusRewards" ) )
ApplyTemplateToControl ( self . transferControl , ZO_GetPlatformTemplate ( "ZO_AntiquityDiggingSummary_Transfer" ) )
end
ApplyTemplateToControl ( self . setProgressionControl , ZO_GetPlatformTemplate ( "ZO_AntiquityDiggingSummary_SetProgression" ) )
ApplyTemplateToControl ( self . setCompleteControl , ZO_GetPlatformTemplate ( "ZO_AntiquityDiggingSummary_SetComplete" ) )
end
end
-- Reset the text here to handle the force uppercase on gamepad
end
self . gameOverFlags = gameOverFlags
if gameOverFlags ~= ANTIQUITY_DIGGING_GAME_OVER_FLAGS_VICTORY then
return
end
self . hasAntiquitySet = antiquitySetId ~= 0
-- Antiquity Reward
local rewardSubheaderHeaderStringId = self . hasAntiquitySet and SI_ANTIQUITY_DIGGING_REWARDS_ANTIQUITY_FRAGMENT_HEADER or SI_ANTIQUITY_DIGGING_REWARDS_ANTIQUITY_HEADER
-- New Lead
self . hasNewLead = newLeadAntiquityId ~= 0
if self . hasNewLead then
local antiquityLeadName = zo_strformat ( SI_ANTIQUITY_LEAD_NAME_FORMATTER , GetAntiquityName ( newLeadAntiquityId ) )
self . hasNewLead = true
else
self . hasNewLead = false
end
-- Bonus Rewards
local currentRowControl = nil
local previousControl = nil
local maxBonusLootPerRow = 3
self . hasBonusRewards = numBonusLootRewards > 0
for i = 1 , numBonusLootRewards do
local qualityColorDef = nil
local countText = ""
if lootType == LOOT_TABLE_ENTRY_TYPE_CURRENCY then
local USE_SHORT_FORMAT = true
elseif lootType == LOOT_TABLE_ENTRY_TYPE_ITEM then
end
elseif lootType == LOOT_TABLE_ENTRY_TYPE_ANTIQUITY_LEAD then
end
if qualityColorDef then
end
--See if we've reached the maximum items for the current row
if i % maxBonusLootPerRow == 1 then
--If there is no row control yet, we need to create one
if not currentRowControl then
else
--If we get here, this is not the first row, so anchor it underneath the previous row
currentRowControl = rowControl
previousControl = nil
end
end
--If this is not the first control, put it to the right of the previous control, otherwise anchor it to the top left of the row
if previousControl then
else
end
end
-- Lore
self . showLore = true
else
self . showLore = false
end
-- Set Progression
if self . hasAntiquitySet then
local MAX_ICONS_PER_ROW = 8
local antiquitySetName = zo_strformat ( SI_ANTIQUITY_NAME_FORMATTER , GetAntiquitySetName ( antiquitySetId ) )
-- TODO: This logic will need to change when we implement the fancy translation animations
local firstControlInRow = nil
local previousControl = nil
for i = 1 , numAntiquitiesInSet do
local isAntiquityFragmentDigSpotAntiquity = antiquityFragmentId == antiquityId
-- If the set is complete, the flag will have already been cleared before we hit this rewards fanfare, so treat it like it had been set.
local antiquityFragmentNeedsCombination = DoesAntiquityNeedCombination ( antiquityFragmentId ) or isAntiquitySetComplete
local antiquityFragmentDiscovered = isAntiquityFragmentDigSpotAntiquity or antiquityFragmentRecovered
if not antiquityFragmentDiscovered then
antiquityFragmentDiscovered = meetsLeadRequirement
end
-- TODO: Still need hidden antiquity icon
local icon = antiquityFragmentDiscovered and GetAntiquityIcon ( antiquityFragmentId ) or "EsoUI/Art/Icons/U26_Unknown_Antiquity_QuestionMark.dds"
-- The just dug up antiquity will start incomplete and become complete through animations
local desaturateControl = not antiquityFragmentNeedsCombination or isAntiquityFragmentDigSpotAntiquity
local showSilhouette = ( antiquityFragmentDiscovered and not antiquityFragmentNeedsCombination ) or isAntiquityFragmentDigSpotAntiquity
if isAntiquityFragmentDigSpotAntiquity then
end
local delayMs = ( i - 1 ) * SET_PROGRESSION_FRAMED_ICON_DELAY_MODIFIER_MS
if i % MAX_ICONS_PER_ROW == 1 then
if firstControlInRow then
else
end
else
end
end
self . setProgressionAntiquityIconScaleTimeline : SetAllAnimationOffsets ( ( numAntiquitiesInSet * SET_PROGRESSION_FRAMED_ICON_DELAY_MODIFIER_MS ) + ZO_PROGRESSION_FRAMED_ICON_FADE_DURATION_MS )
-- Set Complete
self . isAntiquitySetComplete = isAntiquitySetComplete
if isAntiquitySetComplete then
end
end
end
local USE_MAGIC_VIEW = true
local loreDocumentControl = ANTIQUITY_LORE_DOCUMENT_MANAGER : AcquireWideDocumentForLoreEntry ( self . loreControl , GetDigSpotAntiquityId ( ) , GetNumAntiquityLoreEntriesAcquired ( GetDigSpotAntiquityId ( ) ) , USE_MAGIC_VIEW )
-- The XL size is large enough that we need to move the header up in the post-dig summary to avoid the bottom being cut off
-- If we ever did need more than XL we'd need to rethink our approach and design
if loreDocumentControl . sizeDescriptor == "XL" then
else
end
end
end
end
end
end
end
end
-- Global / XML --
end |