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 |
local g_forceCenterResultsText = false
local pulseTexture = CreateControlFromVirtual ( "$(parent)PulseTexture" , control , "ZO_CraftingResultPulseTexture" )
control . pulseAnimation = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "CraftingResultPulse" , pulseTexture )
end
end
end
return craftingResults
end
control : RegisterForEvent ( EVENT_CRAFT_STARTED , function ( eventCode , ... ) self : OnCraftStarted ( ... ) end )
control : AddFilterForEvent ( EVENT_CRAFT_STARTED , REGISTER_FILTER_IS_IN_GAMEPAD_PREFERRED_MODE , showInGamepadPreferredModeOnly )
control : RegisterForEvent ( EVENT_CRAFT_COMPLETED , function ( eventCode , ... ) self : OnCraftCompleted ( ... ) end )
control : AddFilterForEvent ( EVENT_CRAFT_COMPLETED , REGISTER_FILTER_IS_IN_GAMEPAD_PREFERRED_MODE , showInGamepadPreferredModeOnly )
control : RegisterForEvent ( EVENT_RETRAIT_STARTED , function ( eventCode , ... ) self : OnRetraitStarted ( ... ) end )
control : AddFilterForEvent ( EVENT_RETRAIT_STARTED , REGISTER_FILTER_IS_IN_GAMEPAD_PREFERRED_MODE , showInGamepadPreferredModeOnly )
control : RegisterForEvent ( EVENT_RETRAIT_RESPONSE , function ( eventCode , ... ) self : OnRetraitCompleted ( ... ) end )
control : AddFilterForEvent ( EVENT_RETRAIT_RESPONSE , REGISTER_FILTER_IS_IN_GAMEPAD_PREFERRED_MODE , showInGamepadPreferredModeOnly )
self . enchantSoundPlayer : SetFinishedAllSoundsCallback ( function ( ) self : OnAllEnchantSoundsFinished ( ) end )
-- Create a pool of CraftingResultTooltipAnimation_Base to be applied to controls that are
-- not the "primary" crafting tooltip (self.tooltipControl), but are being displayed alongside of it
-- This allows us to have additional controls animate in-sync with the crafting tooltip
end
--nothing to do
end
end
end
end
if not tooltipControl then
end
end
function ZO_CraftingResults_Base : SetTooltipAnimationSounds ( tooltipAnimationSuccessSound , tooltipAnimationFailureSound )
end
end
end
self . resultTooltipAnimation = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "CraftingResultTooltipAnimation" )
end
self . resultTooltipAnimation : GetAnimationTimeline ( 1 ) : GetAnimation ( 1 ) : SetAnimatedControl ( tooltipBurst1 )
self . resultTooltipAnimation : GetAnimationTimeline ( 1 ) : GetAnimation ( 2 ) : SetAnimatedControl ( tooltipBurst2 )
end
end
end
end
end
-- Add a control that we want to have animate alongside the main crafting tooltip (self.tooltipControl)
-- These will not play the full set of animations, but will have the same alpha animations
end
end
end
if craftingType == CRAFTING_TYPE_PROVISIONING then
return false
elseif craftingType == CRAFTING_TYPE_ENCHANTING then
return true
elseif craftingType == CRAFTING_TYPE_ALCHEMY then
return true
if activeSmithing then
else
return true
end
end
end
--The result of DoesCraftingTypeHaveSlotAnimations for smithing depends on having an active smithing object. There is no such object if the smithing UI
--is closed. This means that the result of the function can change between OnCraftStarted and OnCraftEnded if the smithing UI is closed during a crafting
--operation. So store the results off here and don't call it later on.
-- Suppress item count-related messaging for Smithing Tradeskills' Improvement and Research actions.
self . craftingProcessProducesItems = not ( mode == SMITHING_MODE_IMPROVEMENT or mode == SMITHING_MODE_RESEARCH )
elseif SCENE_MANAGER : GetCurrentSceneName ( ) == "gamepad_smithing_research_confirm" then -- Separate case due to ancillary confirmation Scene
else
end
local potencySound , potencyLength , essenceSound , essenceLength , aspectSound , aspectLength = ZO_Enchanting_GetVisibleEnchanting ( ) : GetLastRunestoneSoundParams ( )
end
end
end
end
local playStopTooltipAnimation = true
end
local edgeTexture = "EsoUI/Art/Crafting/crafting_toolTip_glow_edge_blue64.dds"
local burstTexture = "EsoUI/Art/Crafting/burst_blue.dds"
if isFailure then
edgeTexture = "EsoUI/Art/Crafting/crafting_toolTip_glow_edge_red64.dds"
-- no burst texture for failue since we hide the bursts
elseif isExceptionalResult then
edgeTexture = "EsoUI/Art/Crafting/crafting_toolTip_glow_edge_gold64.dds"
burstTexture = "EsoUI/Art/Crafting/burst_gold.dds"
end
if isFailure then
else
end
end
else
end
end
function ZO_CraftingResults_Base : CompleteCraftProcess ( craftFailed , isExceptionalResult , craftingType )
self . processCompletedArguments = { craftFailed = craftFailed , isExceptionalResult = isExceptionalResult , craftingType = craftingType }
else
else
end
end
end
end
local craftFailed = numItemsGained == 0
local NOT_EXCEPTIONAL_RESULT = false
end
local craftFailed = result ~= RETRAIT_RESPONSE_SUCCESS
local EXCEPTIONAL_RESULT = true
end
self : CompleteCraftProcess ( arguments . craftFailed , arguments . isExceptionalResult , arguments . craftingType )
else
end
end
end
end
end
if craftingType == CRAFTING_TYPE_BLACKSMITHING then
return ITEMTYPE_BLACKSMITHING_BOOSTER
elseif craftingType == CRAFTING_TYPE_CLOTHIER then
return ITEMTYPE_CLOTHIER_BOOSTER
elseif craftingType == CRAFTING_TYPE_WOODWORKING then
return ITEMTYPE_WOODWORKING_BOOSTER
elseif craftingType == CRAFTING_TYPE_JEWELRYCRAFTING then
return ITEMTYPE_JEWELRYCRAFTING_BOOSTER
end
end
if craftingType == CRAFTING_TYPE_BLACKSMITHING then
return SOUNDS . BLACKSMITH_EXTRACTED_BOOSTER
elseif craftingType == CRAFTING_TYPE_CLOTHIER then
return SOUNDS . CLOTHIER_EXTRACTED_BOOSTER
elseif craftingType == CRAFTING_TYPE_WOODWORKING then
return SOUNDS . WOODWORKER_EXTRACTED_BOOSTER
elseif craftingType == CRAFTING_TYPE_JEWELRYCRAFTING then
return SOUNDS . JEWELRYCRAFTER_EXTRACTED_BOOSTER
end
end
local SMITHING_TYPE_TO_FAILED_EXTRACTION_SOUND =
{
[ CRAFTING_TYPE_BLACKSMITHING ] = SOUNDS . BLACKSMITH_FAILED_EXTRACTION ,
[ CRAFTING_TYPE_CLOTHIER ] = SOUNDS . CLOTHIER_FAILED_EXTRACTION ,
[ CRAFTING_TYPE_WOODWORKING ] = SOUNDS . WOODWORKER_FAILED_EXTRACTION ,
[ CRAFTING_TYPE_JEWELRYCRAFTING ] = SOUNDS . JEWELRYCRAFTER_FAILED_EXTRACTION ,
}
local failedExtractionSound = internalassert ( SMITHING_TYPE_TO_FAILED_EXTRACTION_SOUND [ craftingType ] )
return SI_SMITHING_EXTRACTION_FAILED , failedExtractionSound
end
for i = 1 , numItemsGained do
local name , icon , stack , sellPrice , meetsUsageRequirement , equipType , itemType = GetLastCraftingResultItemInfo ( i )
if itemType == boosterItemType then
return true
end
end
end
return false
end
g_forceCenterResultsText = forceCenterResultsText
end
end
end
do
local CRAFTING_RESULT_SORT_ORDER =
{
displayQuality = { tiebreaker = "quality" , isNumeric = true , tieBreakerSortOrder = ZO_SORT_ORDER_DOWN } ,
-- quality is depricated, included here for addon backwards compatibility
quality = { tiebreaker = "stack" , isNumeric = true , tieBreakerSortOrder = ZO_SORT_ORDER_DOWN } ,
stack = { tiebreaker = "resultIndex" , isNumeric = true , tieBreakerSortOrder = ZO_SORT_ORDER_UP } ,
resultIndex = { isNumeric = true } ,
}
return ZO_TableOrderingFunction ( left , right , "displayQuality" , CRAFTING_RESULT_SORT_ORDER , ZO_SORT_ORDER_DOWN )
end
end
if penaltyApplied then
end
if numItemsGained == 0 then
if craftingType == CRAFTING_TYPE_ALCHEMY then
-- Crafted inert potion
elseif craftingType == CRAFTING_TYPE_ENCHANTING then
-- No extraction results
-- Only display extraction-related messaging for operations that produce items.
-- No results from gear deconstruction
local failedExtractionStringId , failedExtractionSoundName = GetFailedSmithingExtractionResultInfo ( craftingType )
if penaltyApplied then
ZO_AlertNoSuppression ( UI_ALERT_CATEGORY_ALERT , failedExtractionSoundName , SI_SMITHING_DECONSTRUCTION_LEVEL_PENALTY )
else
end
end
end
else
local finalItemSoundCategory = ITEM_SOUND_CATEGORY_NONE
local resultItems = { }
for i = 1 , numItemsGained do
local name , icon , stack , sellPrice , meetsUsageRequirement , equipType , itemType , itemStyle , displayQuality , itemSoundCategory , itemInstanceId = GetLastCraftingResultItemInfo ( i )
-- Don't save messages if we can't display them immediately
if shouldDisplayMessages then
{
resultIndex = i ,
icon = icon ,
stack = stack ,
sellPrice = sellPrice ,
meetsUsageRequirement = meetsUsageRequirement ,
equipType = equipType ,
itemType = itemType ,
itemStyle = itemStyle ,
displayQuality = displayQuality ,
-- quality is depricated, included here for addon backwards compatibility
quality = displayQuality ,
itemSoundCategory = itemSoundCategory ,
itemInstanceId = itemInstanceId ,
} )
end
if finalItemSoundCategory == ITEM_SOUND_CATEGORY_NONE then
finalItemSoundCategory = itemSoundCategory
end
end
end
if gainedBooster then
else
end
if penaltyApplied then
end
end
if totalInspiration > 0 then
end
end
end
end
end
end
end
end
return false
end
assert ( false , "You must override the IsActive function when inheriting from ZO_CraftingResults_Base" )
end
assert ( false , "You must override the DisplayDiscoveredTraits function when inheriting from ZO_CraftingResults_Base" )
end
assert ( false , "You must override the DisplayTranslatedRunes function when inheriting from ZO_CraftingResults_Base" )
end
assert ( false , "You must override the ShouldDisplayMessages function when inheriting from ZO_CraftingResults_Base" )
end
assert ( false , "You must override the FadeAll function when inheriting from ZO_CraftingResults_Base" )
end |