Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/Assets/itemsheaderfoilleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderfoilmiddle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderfoilright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheadergemleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheadergemmiddle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheadergemright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheadermagicleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheadermagicmiddle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheadermagicright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderrareleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderraremiddle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderrareright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderuniqueleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderuniquemiddle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderuniqueright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderwhiteleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderwhitemiddle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsheaderwhiteright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsseparatorfoil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsseparatorgem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsseparatormagic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsseparatorrare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsseparatorunique.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/itemsseparatorwhite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/jewelpassiveheaderleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/jewelpassiveheadermiddle.png
Binary file added src/Assets/jewelpassiveheaderright.png
Binary file added src/Assets/keystonepassiveheaderleft.png
Binary file added src/Assets/keystonepassiveheadermiddle.png
Binary file added src/Assets/keystonepassiveheaderright.png
Binary file added src/Assets/normalpassiveheaderleft.png
Binary file added src/Assets/normalpassiveheadermiddle.png
Binary file added src/Assets/normalpassiveheaderright.png
Binary file added src/Assets/notablepassiveheaderleft.png
Binary file added src/Assets/notablepassiveheadermiddle.png
Binary file added src/Assets/notablepassiveheaderright.png
4 changes: 2 additions & 2 deletions src/Classes/GemSelectControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ function GemSelectClass:Draw(viewPort, noTooltip)
local cursorX, cursorY = GetCursorPos()
self.tooltip:Clear()
if gemInstance and gemInstance.gemData then
if main.showFlavourText then self.tooltip.titleYOffset = 5 end --The image for Gems has an aspect ratio that makes the title not centered.
self:AddGemTooltip(gemInstance)
else
self.tooltip:AddLine(16, toolTipText)
Expand Down Expand Up @@ -510,7 +511,6 @@ function GemSelectClass:Draw(viewPort, noTooltip)
SetDrawColor(colorA,colorA,colorA)
DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "A")


SetDrawLayer(nil, 10)
self.tooltip:Draw(x, y, width, height, viewPort)
SetDrawLayer(nil, 0)
Expand All @@ -528,7 +528,7 @@ function GemSelectClass:AddGemTooltip(gemInstance)
self.tooltip.color = colorCodes.GEM
local grantedEffect = gemInstance.gemData.grantedEffect
local additionalEffects = gemInstance.gemData.additionalGrantedEffects

self.tooltip.itemTooltip = "GEM"
if grantedEffect.name:match("^Spectre:") or grantedEffect.name:match("^Companion:") then
self.tooltip:AddLine(20, colorCodes.GEM .. (gemInstance.displayEffect and gemInstance.displayEffect.nameSpec or gemInstance.gemData.name))
else
Expand Down
71 changes: 69 additions & 2 deletions src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ local catalystQualityFormat = {
"^x7F7F7FQuality (Attribute Modifiers): "..colorCodes.MAGIC.."+%d%% (augmented)",
}

local flavourLookup = {}

for _, entry in pairs(data.flavourText) do
if entry.name and entry.id and entry.text then
flavourLookup[entry.name] = flavourLookup[entry.name] or {}
flavourLookup[entry.name][entry.id] = entry.text
end
end


local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Control", function(self, build)
self.UndoHandler()
self.ControlHost()
Expand Down Expand Up @@ -1499,7 +1509,7 @@ end
function ItemsTabClass:UpdateDisplayItemTooltip()
self.displayItemTooltip:Clear()
self:AddItemTooltip(self.displayItemTooltip, self.displayItem)
self.displayItemTooltip.center = false
self.displayItemTooltip.center = true
end

function ItemsTabClass:UpdateClusterJewelControls()
Expand Down Expand Up @@ -2585,6 +2595,8 @@ end
function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
-- Item name
local rarityCode = colorCodes[item.rarity]
tooltip.maxWidth = 600 -- Should instead get the longest mod and set the width to that. Some flavour text is way too long so we need a cap of sorts.
tooltip.itemTooltip = item.rarity
tooltip.center = true
tooltip.color = rarityCode
if item.title then
Expand Down Expand Up @@ -2901,8 +2913,63 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
if item.corrupted then
tooltip:AddLine(16, colorCodes.NEGATIVE.."Corrupted")
end
tooltip:AddSeparator(14)
end

-- Show flavour text:
if item.rarity == "UNIQUE" and main.showFlavourText == true then
local flavourTable = flavourLookup[item.title]
if flavourTable then
local flavour = nil

if item.title == "Sekhema's Resolve" then
local selectedFlavourId = nil
for _, lineEntry in ipairs(tooltip.lines or {}) do
local lineText = lineEntry.text or ""
if lineText:find("Emerald") then
selectedFlavourId = "FourUniqueSanctum4a"
break
elseif lineText:find("Sapphire") then
selectedFlavourId = "FourUniqueSanctum4b"
break
elseif lineText:find("Ruby") then
selectedFlavourId = "FourUniqueSanctum4c"
break
end
end
if selectedFlavourId then
flavour = flavourTable[selectedFlavourId]
end

elseif item.title == "Grand Spectrum" then
local selectedFlavourId = nil
local baseName = item.baseName
if baseName == "Ruby" then
selectedFlavourId = "FourUniqueJewel1"
elseif baseName == "Emerald" then
selectedFlavourId = "FourUniqueJewel2"
elseif baseName == "Sapphire" then
selectedFlavourId = "FourUniqueJewel3"
end
if selectedFlavourId then
flavour = flavourTable[selectedFlavourId]
end

else
for _, text in pairs(flavourTable) do
flavour = text
break
end
end

if flavour then
for _, line in ipairs(flavour) do
tooltip:AddLine(16, colorCodes.UNIQUE .. line)
end
tooltip:AddSeparator(14)
end
end
end
tooltip:AddSeparator(14)

-- Stat differences
if not self.showStatDifferences then
Expand Down
8 changes: 8 additions & 0 deletions src/Classes/PassiveTreeView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision) then
self:AddNodeTooltip(self.tooltip, node, build, incSmallPassiveSkillEffect)
end
self.tooltip.center = true
self.tooltip:Draw(m_floor(scrX - size), m_floor(scrY - size), size * 2, size * 2, viewPort)
end
end
Expand Down Expand Up @@ -1073,6 +1074,13 @@ end

function PassiveTreeViewClass:AddNodeName(tooltip, node, build)
tooltip:SetRecipe(node.infoRecipe)
local tooltipMap = {
Normal = "PASSIVE",
Notable = "NOTABLE",
Socket = "JEWEL",
Keystone = "KEYSTONE",
}
tooltip.itemTooltip = tooltipMap[node.type] or "UNKNOWN"
tooltip:AddLine(24, "^7"..node.dn..(launch.devModeAlt and " ["..node.id.."]" or ""))
if launch.devModeAlt and node.id > 65535 then
-- Decompose cluster node Id
Expand Down
Loading