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 |
-----------------------
-- Antiquity Digging --
-----------------------
local ANTIQUITY_DIGGING_INTERACTION =
{
interactTypes = { INTERACTION_ANTIQUITY_DIG_SPOT } ,
}
local ONE_BAR_STYLE =
{
digPowerBarWidth = 168 ,
}
local TWO_BAR_STYLE =
{
digPowerBar1Width = 80 ,
digPowerBar2Width = 88 ,
}
local ONE_SPENDER_STYLE =
{
digPowerIconFrameWidth = 128 ,
digPowerIconFrameOffsetX = 42 ,
}
local TWO_SPENDER_STYLE =
{
digPowerIconFrameWidth = 256 ,
digPowerIconFrameOffsetX = 21 ,
}
local HAS_ONE_BAR = false
local HAS_TWO_BARS = true
end
local KEYBOARD_STYLE =
{
stabilityBarTemplate = "ZO_AntiquityDiggingStabilityBar_Keyboard_Template" ,
digPowerFrameTexture = { [ HAS_ONE_BAR ] = "EsoUI/Art/Antiquities/Keyboard/Digging_1Bar_Border.dds" , [ HAS_TWO_BARS ] = "EsoUI/Art/Antiquities/Keyboard/Digging_2Bar_Border.dds" } ,
digPowerBackgroundTexture = { [ HAS_ONE_BAR ] = "EsoUI/Art/Antiquities/Keyboard/Digging_1Bar_Border_BG.dds" , [ HAS_TWO_BARS ] = "EsoUI/Art/Antiquities/Keyboard/Digging_2Bar_Border_BG.dds" } ,
digPowerSingleBarGlowTexture = "EsoUI/Art/Antiquities/Keyboard/Digging_1Bar_Glow.dds" ,
digPowerDoubleBarSingleGlowTexture = "EsoUI/Art/Antiquities/Keyboard/Digging_2Bar_Single_Glow.dds" ,
digPowerDoubleBarDoubleGlowTexture = "EsoUI/Art/Antiquities/Keyboard/Digging_2Bar_Glow.dds" ,
digPowerIconFrameTexture = { [ HAS_ONE_BAR ] = "EsoUI/Art/Antiquities/Keyboard/Digging_1Icon_Border.dds" , [ HAS_TWO_BARS ] = "EsoUI/Art/Antiquities/Keyboard/Digging_2Icon_Border.dds" } ,
radarCountFont = "ZoFontWinH3" ,
radarCountSize = 64 ,
radarCountFrameTexture = "EsoUI/Art/Antiquities/digging_crystal_border.dds" ,
helpTutorialsDescriptor =
{
} ,
}
local GAMEPAD_STYLE =
{
stabilityBarTemplate = "ZO_AntiquityDiggingStabilityBar_Gamepad_Template" ,
digPowerFrameTexture = { [ HAS_ONE_BAR ] = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_1Bar_Border.dds" , [ HAS_TWO_BARS ] = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_2Bar_Border.dds" } ,
digPowerBackgroundTexture = { [ HAS_ONE_BAR ] = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_1Bar_Border_BG.dds" , [ HAS_TWO_BARS ] = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_2Bar_Border_BG.dds" } ,
digPowerSingleBarGlowTexture = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_1Bar_Glow.dds" ,
digPowerDoubleBarSingleGlowTexture = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_2Bar_Single_Glow.dds" ,
digPowerDoubleBarDoubleGlowTexture = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_2Bar_Glow.dds" ,
digPowerIconFrameTexture = { [ HAS_ONE_BAR ] = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_1Icon_Border.dds" , [ HAS_TWO_BARS ] = "EsoUI/Art/Antiquities/Gamepad/GP_Digging_2Icon_Border.dds" } ,
radarCountFont = "ZoFontGamepadBold27" ,
radarCountSize = 80 ,
radarCountFrameTexture = "EsoUI/Art/Antiquities/GP_digging_crystal_border.dds" ,
helpTutorialsDescriptor =
{
} ,
}
local DIG_POWER_REFUND_INCREMENT_INTERVAL_S = 0.05
return object
end
local DEFAULT_SHOW_UNBOUND = nil
local DEFAULT_GAMEPAD_PREFERRED_KEYBIND = nil
local DEFAULT_ALWAYS_PREFER_GAMEPAD_MODE = nil
local SHOW_AS_HOLD = true
self . moreInfoKeybindButton : SetKeybind ( "ANTIQUITY_DIGGING_MORE_INFO" , DEFAULT_SHOW_UNBOUND , DEFAULT_GAMEPAD_PREFERRED_KEYBIND , DEFAULT_ALWAYS_PREFER_GAMEPAD_MODE , SHOW_AS_HOLD )
local STABILITY_BAR_GRADIENT = { ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_ANTIQUITY_DIGGING , ANTIQUITY_DIGGING_COLORS_STABILITY_START ) ) , ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_ANTIQUITY_DIGGING , ANTIQUITY_DIGGING_COLORS_STABILITY_END ) ) }
local DIG_POWER_BAR_GRADIENT = { ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_ANTIQUITY_DIGGING , ANTIQUITY_DIGGING_COLORS_DIG_POWER_START ) ) , ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_ANTIQUITY_DIGGING , ANTIQUITY_DIGGING_COLORS_DIG_POWER_END ) ) }
self . digPowerBars = { self . digPowerControl : GetNamedChild ( "Bar1" ) , self . digPowerControl : GetNamedChild ( "Bar2" ) }
end
self . digPowerIconTextures = { self . digPowerIconFrameTexture : GetNamedChild ( "Icon1" ) , self . digPowerIconFrameTexture : GetNamedChild ( "Icon2" ) }
self . digPowerGlowTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingDigPowerGlowLoop" , self . digPowerGlowTexture )
self . digPowerRefundGlowTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingDigPowerRefundGlow" , self . digPowerRefundGlowTexture )
self . keybindContainerTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingHUDFade" , self . keybindContainer )
self . keybindContainerFastTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingHUDFastFade" , self . keybindContainer )
self . meterContainerTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingHUDFade" , self . meterContainer )
self . meterContainerFastPartialTimeline = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_AntiquityDiggingHUDFastPartialFade" , self . meterContainer )
ANTIQUITY_DIGGING_SCENE = ZO_RemoteInteractScene : New ( "antiquityDigging" , SCENE_MANAGER , ANTIQUITY_DIGGING_INTERACTION )
local overlaySceneInfo =
{
systemFilters = { UI_SYSTEM_ANTIQUITY_DIGGING } ,
}
if newState == SCENE_FRAGMENT_SHOWING then
control : RegisterForEvent ( EVENT_ANTIQUITY_DIGGING_READY_TO_PLAY , function ( ) self : OnAntiquityDiggingReadyToPlay ( ) end )
elseif newState == SCENE_FRAGMENT_HIDING then
elseif newState == SCENE_FRAGMENT_HIDDEN then
end
end )
ANTIQUITY_DIGGING_SCENE : SetHideSceneConfirmationCallback ( function ( ... ) self : OnConfirmHideScene ( ... ) end )
ANTIQUITY_DIGGING_SCENE : SetHandleGamepadPreferredModeChangedCallback ( function ( ... ) return self : HandleGamepadPreferredModeChanged ( ... ) end )
CENTER_SCREEN_ANNOUNCE : RemoveAllCSAsOfAnnounceType ( CENTER_SCREEN_ANNOUNCE_TYPE_ANTIQUITY_DIGGING_GAME_UPDATE )
-- When the end of game summary fragment comes in, we want to get rid of the keybinds
-- and tone down the bars so they don't feel like they're part of the summary but can still be referenced
end
end )
end )
end )
end )
end )
end )
end )
end )
control : RegisterForEvent ( EVENT_ANTIQUITY_DIGGING_MOUSE_OVER_ACTIVE_SKILL_CHANGED , function ( _ , mousedOverSkill )
-- Only handle mouseover on keyboard
if mousedOverSkill then
else
end
end
end )
--This anchor does nothing. It's controlled by the keyboard and gamepad XML templates
self . durabilityUnitFrame = UNIT_FRAMES : CreateFrame ( "durability" , ANCHOR , ZO_UNIT_FRAME_BAR_TEXT_MODE_HIDDEN , "ZO_TargetUnitFrame" , "ZO_AntiquityDurabilityFrame" )
if unitFrame . nameLabel then
if antiquityId ~= 0 then
end
end
end
end
if unitFrame . resourceNumbersLabel then
unitFrame . resourceNumbersLabel : SetText ( ZO_FormatResourceBarCurrentAndMax ( unitFrame . currentValue , unitFrame . maxValue , RESOURCE_NUMBERS_SETTING_NUMBER_ONLY ) )
end
end
end )
self . platformStyle = ZO_PlatformStyle : New ( function ( style ) self : ApplyPlatformStyle ( style ) end , KEYBOARD_STYLE , GAMEPAD_STYLE )
end
end
--Remove the digging actions fragment so it can be on top of the gamepad UI mode fragment
end
else
end
-- Re-add the digging actions fragment so it can be on top of the gamepad UI mode fragment
end
end
--Reset the text here to handle the force uppercase on gamepad
--Reset the text here to handle the force uppercase on gamepad
end
if not isGamepadPreferred then
if mouseOverSkill then
end
end
-- We don't want to hide the scene. The internal version will update the styles
local HANDLED = true
return HANDLED
end
function ZO_AntiquityDigging : OnConfirmHideScene ( scene , nextSceneName , bypassHideSceneConfirmationReason )
if bypassHideSceneConfirmationReason == nil then
else
end
end
end )
end
end
end
local halfCurrentStability , halfMaxStability = currentStability * 0.5 , maxStability * 0.5
self . stabilityText : SetText ( ZO_FormatTime ( remainingTimeS , TIME_FORMAT_STYLE_SHOW_LARGEST_TWO_UNITS , TIME_FORMAT_PRECISION_TWENTY_FOUR_HOUR ) )
end
do
if not skillData then
return
end
if not skillProgressionData then
return
end
end
end
--Refreshs visuals that only change as a result of things that happen outside of the game (skill purchases) or gamepad mode changing
local ownedDigPowerSpenderIcons = { }
local numOwnedDigPowerSpenders = # ownedDigPowerSpenderIcons
if numOwnedDigPowerSpenders == 0 then
return
else
end
self . digPowerIconFrameTexture : SetTexture ( style . digPowerIconFrameTexture [ numOwnedDigPowerSpenders == 2 ] )
if i <= numOwnedDigPowerSpenders then
else
end
end
if hasTwoBars then
else
end
local spenderStyle = numOwnedDigPowerSpenders == 1 and ONE_SPENDER_STYLE or TWO_SPENDER_STYLE
self . digPowerIconFrameTexture : SetAnchor ( TOPLEFT , nil , TOPLEFT , spenderStyle . digPowerIconFrameOffsetX , 29 )
end
end
end
end
end
--Refreshes visuals that change when dig power is gained or spent
local hasLeadingEdgeOnBar1
local glowIsHidden = false
if hasTwoBars then
--The first of the two bars has a flat right side. We use the pointed leading edge on the bar when it is half full (1 dig power), but use no leading edge when full (2 dig power).
hasLeadingEdgeOnBar1 = current <= 1
if current < minSpendablePower then
glowIsHidden = true
else
end
else
hasLeadingEdgeOnBar1 = true
glowIsHidden = true
else
end
end
if glowWasHidden ~= glowIsHidden then
if glowIsHidden then
else
end
end
end
if current == 0 then
else
end
else
end
end
else
end
end
end
end
self . nextOverrideVisualDigPowerIncrementS = GetGameTimeSeconds ( ) + DIG_POWER_REFUND_INCREMENT_INTERVAL_S
end
end
if self . nextOverrideVisualDigPowerIncrementS and timeS > self . nextOverrideVisualDigPowerIncrementS then
else
end
end
end
-- this keybind is currently only enabled for gamepad and hidden for keyboard
-- keyboard shows the tooltip by mousing over
end
end
if not skill then
return
end
if skillType == SKILL_TYPE_NONE then
return
end
if not skillData then
return
end
if not skillProgressionData then
return
end
else
local TOOLTIP_HORIZONTAL_OFFSET = 50
offsetX = offsetX + TOOLTIP_HORIZONTAL_OFFSET
else
offsetX = offsetX - TOOLTIP_HORIZONTAL_OFFSET
end
local DONT_SHOW_SKILL_POINT_COST = false
end
end
end
end
-- Global XML --
end |