Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Openarl committed Jun 8, 2018
2 parents 5e06240 + 6fc3334 commit d26fb89
Show file tree
Hide file tree
Showing 33 changed files with 1,384 additions and 932 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
### 1.4.95 - 2018/06/08
* Added the following new uniques:
* Sinvicta's Mettle
* Unyielding Flame
* Architect's Hand
* Transcendent Flesh
* Tempered Mind
* Transcendent Mind
* Tempered Spirit
* Transcendent Spirit
* Updated the rolls on many new uniques
* Updated the passive tree; in particular, this corrects the positioning of the Overcharged cluster
* You can now apply 2 corrupted implicits to an item
* Uniques in the unique database now show their source (if drop-limited) and upgrades (e.g Prophecy/Blessing/Vial)
* Aura/buff/curse skills are now correctly enabled by default when importing
* Slavedriver's Hand now correctly converts Attack and Cast Speed modifiers to Trap Throwing Speed

### 1.4.94 - 2018/06/03
* Fixed several issues with sorting gems by DPS
* Updated the game version selector
Expand Down
2 changes: 1 addition & 1 deletion Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ function ImportTabClass:ImportSocketedItems(item, socketedItems, slotName)
self:ImportItem(socketedItem, nil, slotName .. " Abyssal Socket "..abyssalSocketId)
abyssalSocketId = abyssalSocketId + 1
else
local gemInstance = { level = 20, quality = 0, enabled = true}
local gemInstance = { level = 20, quality = 0, enabled = true, enableGlobal1 = true }
gemInstance.nameSpec = socketedItem.typeLine:gsub(" Support","")
gemInstance.support = socketedItem.support
for _, property in pairs(socketedItem.properties) do
Expand Down
5 changes: 5 additions & 0 deletions Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ function ItemClass:ParseRaw(raw)
gameModeStage = "EXPLICIT"
elseif specName == "Unreleased" then
self.unreleased = (specVal == "true")
elseif specName == "Upgrade" then
self.upgradePaths = self.upgradePaths or { }
t_insert(self.upgradePaths, specVal)
elseif specName == "Source" then
self.source = specVal
elseif specName == "Evasion Rating" then
if self.baseName == "Two-Toned Boots (Armour/Energy Shield)" then
-- Another hack for Two-Toned Boots
Expand Down
66 changes: 53 additions & 13 deletions Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1469,40 +1469,65 @@ function ItemsTabClass:CorruptDisplayItem()
return a.level < b.level
end
end)
local function buildList(control, other)
local selfMod = control.selIndex and control.selIndex > 1 and control.list[control.selIndex].mod
local otherMod = other.selIndex and other.selIndex > 1 and other.list[other.selIndex].mod
wipeTable(control.list)
t_insert(control.list, { label = "None" })
for _, mod in ipairs(implicitList) do
if not otherMod or mod.group ~= otherMod.group then
t_insert(control.list, { label = table.concat(mod, "/"), mod = mod })
end
end
control:SelByValue(selfMod, "mod")
end
local function corruptItem()
local item = common.New("Item", self.build.targetVersion, self.displayItem:BuildRaw())
item.id = self.displayItem.id
item.corrupted = true
if controls.implicit.selIndex > 1 then
local newImplicit = { }
for _, control in ipairs{controls.implicit, controls.implicit2} do
if control.selIndex > 1 then
local mod = control.list[control.selIndex].mod
for _, modLine in ipairs(mod) do
t_insert(newImplicit, { line = modLine })
end
end
end
if #newImplicit > 0 then
for i = 1, item.implicitLines do
t_remove(item.modLines, 1)
end
local mod = implicitList[controls.implicit.selIndex - 1]
for _, modLine in ipairs(mod) do
t_insert(item.modLines, 1, { line = modLine })
for i, implicit in ipairs(newImplicit) do
t_insert(item.modLines, i, implicit)
end
item.implicitLines = #mod
item.implicitLines = #newImplicit
end
item:BuildAndParseRaw()
return item
end
controls.implicitLabel = common.New("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 65, 20, 0, 16, "^7Implicit:")
controls.implicit = common.New("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 70, 20, 450, 18, { "None" })
for _, mod in ipairs(implicitList) do
t_insert(controls.implicit.list, table.concat(mod, "/"))
end
controls.save = common.New("ButtonControl", nil, -45, 50, 80, 20, "Corrupt", function()
controls.implicitLabel = common.New("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 75, 20, 0, 16, "^7Implicit #1:")
controls.implicit = common.New("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 80, 20, 440, 18, nil, function()
buildList(controls.implicit2, controls.implicit)
end)
controls.implicit2Label = common.New("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 75, 40, 0, 16, "^7Implicit #2:")
controls.implicit2 = common.New("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 80, 40, 440, 18, nil, function()
buildList(controls.implicit, controls.implicit2)
end)
buildList(controls.implicit, controls.implicit2)
buildList(controls.implicit2, controls.implicit)
controls.save = common.New("ButtonControl", nil, -45, 70, 80, 20, "Corrupt", function()
self:SetDisplayItem(corruptItem())
main:ClosePopup()
end)
controls.save.tooltipFunc = function(tooltip)
tooltip:Clear()
self:AddItemTooltip(tooltip, corruptItem(), nil, true)
end
controls.close = common.New("ButtonControl", nil, 45, 50, 80, 20, "Cancel", function()
controls.close = common.New("ButtonControl", nil, 45, 70, 80, 20, "Cancel", function()
main:ClosePopup()
end)
main:OpenPopup(540, 80, "Corrupt Item", controls)
main:OpenPopup(540, 100, "Corrupt Item", controls)
end

-- Opens the custom modifier popup
Expand Down Expand Up @@ -1641,6 +1666,13 @@ function ItemsTabClass:AddItemSetTooltip(tooltip, itemSet)
end
end

function ItemsTabClass:FormatItemSource(text)
return text:gsub("unique{([^}]+)}",colorCodes.UNIQUE.."%1"..colorCodes.SOURCE)
:gsub("normal{([^}]+)}",colorCodes.NORMAL.."%1"..colorCodes.SOURCE)
:gsub("currency{([^}]+)}",colorCodes.CURRENCY.."%1"..colorCodes.SOURCE)
:gsub("prophecy{([^}]+)}",colorCodes.PROPHECY.."%1"..colorCodes.SOURCE)
end

function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
-- Item name
local rarityCode = colorCodes[item.rarity]
Expand Down Expand Up @@ -1675,6 +1707,14 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
if item.unreleased then
tooltip:AddLine(16, "^1Not yet available")
end
if item.source then
tooltip:AddLine(16, colorCodes.SOURCE.."Source: "..self:FormatItemSource(item.source))
end
if item.upgradePaths then
for _, path in ipairs(item.upgradePaths) do
tooltip:AddLine(16, colorCodes.SOURCE..self:FormatItemSource(path))
end
end
tooltip:AddSeparator(10)
end

Expand Down
2 changes: 1 addition & 1 deletion Data/2_6/ModCache.lua

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Data/3_0/ModCache.lua

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Data/Global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ colorCodes = {
UNIQUE = "^xAF6025",
RELIC = "^x60C060",
GEM = "^x1AA29B",
PROPHECY = "^xB54BFF",
CURRENCY = "^xAA9E82",
CRAFTED = "^xB8DAF1",
CUSTOM = "^x5CF0BB",
SOURCE = "^x88FFFF",
UNSUPPORTED = "^xF05050",
WARNING = "^xFF9922",
TIP = "^x80A080",
Expand Down
Loading

0 comments on commit d26fb89

Please sign in to comment.