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 |
ENDLESS_DUNGEON_SUMMARY_SCENE = scene
ENDLESS_DUNGEON_MANAGER : RegisterCallback ( "StateChanged" , ZO_GetCallbackForwardingFunction ( self , self . OnEndlessDungeonStateChanged ) )
end
end
end
local switchToBuffsKeybindDescriptor =
{
--Even though this is an ethereal keybind, the name will still be read during screen narration
etherealNarrationOrder = 1 ,
end ,
}
local closeDescriptor =
{
--Even though this is an ethereal keybind, the name will still be read during screen narration
etherealNarrationOrder = 2 ,
-- For when the user clicks the button
end
}
local backKeybindDescriptor = ZO_DeepTableCopy ( KEYBIND_STRIP : GetDefaultGamepadBackButtonDescriptor ( ) )
{
-- Switch To Tracker
switchToBuffsKeybindDescriptor ,
-- Close (For narration only)
closeDescriptor ,
-- Back Button (Hidden)
backKeybindDescriptor ,
}
end
local narrationInfo =
{
end ,
local narrations = { }
local endlessDungeonManager = ENDLESS_DUNGEON_MANAGER
-- Title
ZO_AppendNarration ( narrations , SCREEN_NARRATION_MANAGER : CreateNarratableObject ( GetString ( SI_ENDLESS_DUNGEON_SUMMARY_TITLE ) ) )
-- Progress Header
ZO_AppendNarration ( narrations , SCREEN_NARRATION_MANAGER : CreateNarratableObject ( GetString ( SI_ENDLESS_DUNGEON_SUMMARY_PROGRESS_HEADER ) ) )
--Arc/Cycle/Stage
local stageNarration , cycleNarration , arcNarration = endlessDungeonManager : GetCurrentProgressionNarrationDescriptions ( )
ZO_AppendNarration ( narrations , SCREEN_NARRATION_MANAGER : CreateNarratableObject ( GetString ( SI_ENDLESS_DUNGEON_SUMMARY_STAGE_HEADER ) ) )
-- Score
local scoreNarration = zo_strformat ( SI_ENDLESS_DUNGEON_SUMMARY_STAT_VALUE_NARRATION , GetString ( SI_ENDLESS_DUNGEON_SUMMARY_SCORE_HEADER ) , endlessDungeonManager : GetScore ( ) )
-- Buffs Header
ZO_AppendNarration ( narrations , SCREEN_NARRATION_MANAGER : CreateNarratableObject ( GetString ( SI_ENDLESS_DUNGEON_SUMMARY_BUFFS_HEADER ) ) )
-- Verses/Visions/Avatar Visions
local numVerses , numNonAvatarVisions , numAvatarVisions = endlessDungeonManager : GetNumLifetimeVerseAndVisionStackCounts ( )
local versesNarration = zo_strformat ( SI_ENDLESS_DUNGEON_SUMMARY_STAT_VALUE_NARRATION , GetString ( SI_ENDLESS_DUNGEON_SUMMARY_VERSES_HEADER ) , numVerses )
local nonAvatarVisionsNarration = zo_strformat ( SI_ENDLESS_DUNGEON_SUMMARY_STAT_VALUE_NARRATION , GetString ( SI_ENDLESS_DUNGEON_SUMMARY_VISIONS_HEADER ) , numNonAvatarVisions )
local avatarVisionsNarration = zo_strformat ( SI_ENDLESS_DUNGEON_SUMMARY_STAT_VALUE_NARRATION , GetString ( SI_ENDLESS_DUNGEON_SUMMARY_AVATAR_VISIONS_HEADER ) , numAvatarVisions )
ZO_AppendNarration ( narrations , SCREEN_NARRATION_MANAGER : CreateNarratableObject ( nonAvatarVisionsNarration ) )
ZO_AppendNarration ( narrations , SCREEN_NARRATION_MANAGER : CreateNarratableObject ( avatarVisionsNarration ) )
return narrations
end ,
}
end
-- Expectation: The first time we are inside an Endless Dungeon while it's complete after having been present for it ending and not being dead, we will force show the summary
local wasActive = oldState == ZO_ENDLESS_DUNGEON_STATES . ACTIVE
local isActive = newState == ZO_ENDLESS_DUNGEON_STATES . ACTIVE
local isComplete = newState == ZO_ENDLESS_DUNGEON_STATES . COMPLETED
if not isComplete then
-- If we were planning on showing the summary, but managed to get into a new run, don't try to show the summary
elseif wasActive and isComplete then
-- If we are in a run and it goes from active to complete, intend to show the summary at first valid opportunity (not dead)
end
-- Don't try to show the summary until we're back to life
self . control : RegisterForEvent ( EVENT_PLAYER_ALIVE , ZO_GetEventForwardingFunction ( self , self . OnPlayerAlive ) )
else
local PLAY_RUN_COMPLETE_SOUND = true
end
end
end
ENDLESS_DUNGEON_SUMMARY_SCENE : RemoveFragmentGroup ( FRAGMENT_GROUP . MOUSE_DRIVEN_UI_WINDOW_NO_KEYBIND_BACKGROUND_WINDOW )
ENDLESS_DUNGEON_SUMMARY_SCENE : RemoveFragmentGroup ( FRAGMENT_GROUP . GAMEPAD_DRIVEN_UI_NO_KEYBIND_BACKGROUND_WINDOW )
ENDLESS_DUNGEON_SUMMARY_SCENE : AddFragmentGroup ( FRAGMENT_GROUP . GAMEPAD_DRIVEN_UI_NO_KEYBIND_BACKGROUND_WINDOW )
else
ENDLESS_DUNGEON_SUMMARY_SCENE : AddFragmentGroup ( FRAGMENT_GROUP . MOUSE_DRIVEN_UI_WINDOW_NO_KEYBIND_BACKGROUND_WINDOW )
end
end
-- If we became alive and had intended to show the summary and we're still inside the dungeon, show it
if self . shouldShowSummary and ENDLESS_DUNGEON_MANAGER : GetState ( ) == ZO_ENDLESS_DUNGEON_STATES . COMPLETED then
local PLAY_RUN_COMPLETE_SOUND = true
end
end
if playRunCompleteSound then
end
end
local endlessDungeonManager = ENDLESS_DUNGEON_MANAGER
local numVerses , numNonAvatarVisions , numAvatarVisions = endlessDungeonManager : GetNumLifetimeVerseAndVisionStackCounts ( )
end
end
end |