Skip to content

Commit

Permalink
Stonethorn update
Browse files Browse the repository at this point in the history
Add keybind to add items in the mail to the queue
Added minimum version LLC dependency.
Now uses the instant multicrafting! If you have a multiplier, then it will only create one row, with a ##x label
Added a button to show/hide the favourites window, and removed the settings menu option
Favourites window will resize along with the main set crafter window
Fixed a bug where selecting a favourites would not select the correct armour weight
When sending a request, Jewelry items will no longer have N/A as the style, and it will instead be blank
Added a request to chat button, which will allow you to easily put your crafting request into chat. Also added the option to right click links to add to queue
Fixed some bugs with removing items from queue
Fixed a bug where the auto crafting option would not correctly be set on reloadui
Fixed a bug where after sustained use the dropdown tooltips would gradually stop working
Fixed a bug where the preview tooltips incorrectly had weapon enchants
Added an option to the favourites so that you can save the queue as a favourite
API Bump
Increased the minimum height of the window, so that when resizing the queue always has a backdrop
  • Loading branch information
Dolgubon committed Aug 23, 2020
1 parent a3bbf6d commit 0e77ebd
Show file tree
Hide file tree
Showing 14 changed files with 255 additions and 104 deletions.
2 changes: 1 addition & 1 deletion ConstantSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ DolgubonSetCrafter.quality = {}
for i = 1, 5 do
local qualityColor = ZO_ColorDef:New(GetInterfaceColor(INTERFACE_COLOR_TYPE_ITEM_QUALITY_COLORS, i))

DolgubonSetCrafter.quality[i] = {[1] = i, [2] = qualityColor:Colorize(GetString(SI_ITEMQUALITY0 + i)) }
DolgubonSetCrafter.quality[i] = {[1] = i, [2] = qualityColor:Colorize(GetString(SI_ITEMQUALITY0 + i)), [3] = GetString(SI_ITEMQUALITY0 + i)}

end

Expand Down
10 changes: 6 additions & 4 deletions Crafter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ local function addRequirements(returnedTable, addAmounts)
end
end

DolgubonSetCrafter.addRequirements = addRequirements

local function clearTable (t)
for k, v in pairs(t) do
t[k] = nil
Expand Down Expand Up @@ -736,7 +738,7 @@ function DolgubonSetCrafter.removeFromScroll(reference, removeFromLLC, resultTab

for k, v in pairs(queue) do
if v.Reference == reference then
if (v.Quantity and v.Quantity[1] or 1) >1 then
if (v.Quantity and v.Quantity[1] or 1) >1 and not removeFromLLC then
v.Quantity[1] = v.Quantity[1] - 1
v.Quantity[2] = v.Quantity[1].."x"
else
Expand Down Expand Up @@ -791,7 +793,7 @@ function DolgubonSetCrafter.initializeFunctions.initializeCrafting()
table.remove(queue, k)
end
end
LazyCrafter:SetAllAutoCraft(DolgubonSetCrafter:GetSettings().autocraft)
LazyCrafter:SetAllAutoCraft(DolgubonSetCrafter.savedvars.autoCraft)
LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_MOUSE_UP_EVENT, InitializeItemLinkRightClick)
end

Expand Down Expand Up @@ -908,8 +910,8 @@ end

function DolgubonSetCrafter.isRequestInProgressByReference(referenceId)
local requestTable = LazyCrafter:findItemByReference(referenceId)
local equipInProgress = requestTable[1].equipInfo and #requestTable[1].equipInfo > 0
local glyphInProgress = requestTable[1].glyphInfo and #requestTable[1].glyphInfo > 0
local equipInProgress = requestTable and requestTable[1] and requestTable[1].equipInfo and #requestTable[1].equipInfo > 0
local glyphInProgress = requestTable and requestTable[1] and requestTable[1].glyphInfo and #requestTable[1].glyphInfo > 0
return requestTable and requestTable[1] and (equipInProgress or glyphInProgress)
end

Expand Down
12 changes: 6 additions & 6 deletions DolgubonsLazySetCrafter.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
; This Add-on is not created by, affiliated with or sponsored by ZeniMax
; This Add-on is not created by, affiliated with or sponsored by ZeniMax
; Media Inc. or its affiliates. The Elder Scrolls® and related logos are
; registered trademarks or trademarks of ZeniMax Media Inc. in the United
; States and/or other countries. All rights reserved.
; You can read the full terms at https://account.elderscrollsonline.com/add-on-terms

## Title: Dolgubon's Lazy Set Crafter v2.5.0
## APIVersion: 100030 100031
## Title: Dolgubon's Lazy Set Crafter v2.6.6
## APIVersion: 100031 100032
## Author: Dolgubon
## Version: 2.5.0
## Version: 2.6.6
## SavedVariables: dolgubonslazysetcraftersavedvars
## DependsOn: LibLazyCrafting LibAddonMenu-2.0
## OptionalDependsOn: pChat LibFeedback LibCustomMenu LibPrice LibStub
## DependsOn: LibLazyCrafting>=2996 LibAddonMenu-2.0 LibStub
## OptionalDependsOn: pChat LibFeedback LibCustomMenu LibPrice

; Libraries

Expand Down
47 changes: 42 additions & 5 deletions Favourites.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ return
selectedPatterns = {},
weight = {},
name = "",
type = "Selection"
}
end

Expand Down Expand Up @@ -103,11 +104,21 @@ local function addFavourite()
end
DolgubonSetCrafter.addFavourite = addFavourite

local function loadFavourite(selectedFavourite)
-- Load the favourite selection with that Id
d("LOADING Set Crafter selection: '"..selectedFavourite.name.."'")
if not selectedFavourite then d("error no favourite table passed") return end
if #selectedFavourite.selectedPatterns>0 then
local function addFavouriteQueue()
local faveTable =
{
type = "Queue",
}
faveTable.name = "Queue: "..DolgubonSetCrafter.countTotalQueuedItems().." items"
faveTable.queue = ZO_DeepTableCopy(DolgubonSetCrafter.savedvars.queue)
table.insert(DolgubonSetCrafter.savedvars.faves, faveTable)
DolgubonSetCrafter.FavouriteScroll:RefreshData()
end

DolgubonSetCrafter.addFavouriteQueue = addFavouriteQueue

local function loadSelectionFavourite(selectedFavourite)
if #selectedFavourite.selectedPatterns>0 then
for i = 1, #DolgubonSetCrafter.patternButtons do
DolgubonSetCrafter.patternButtons[i]:toggleOff()
end
Expand All @@ -130,7 +141,33 @@ local function loadFavourite(selectedFavourite)
DolgubonSetCrafter.CPToggle:setState(selectedFavourite.level.isChampion)
DolgubonSetCrafter.levelInput:SetText(selectedFavourite.level.lvl)
DolgubonSetCrafter.armourTypes[selectedFavourite.weight.id]:toggleOn()
end

local function loadQueueFavourite(selectedFavourite)

for k, v in pairs(selectedFavourite.queue) do
local copy = ZO_DeepTableCopy(v)
copy["CraftRequestTable"][11] = DolgubonSetCrafter.savedvars.counter
copy["Reference"] = DolgubonSetCrafter.savedvars.counter
DolgubonSetCrafter.savedvars.counter = DolgubonSetCrafter.savedvars.counter + 1
local returnedTable = DolgubonSetCrafter.LazyCrafter:CraftSmithingItemByLevel(unpack(copy["CraftRequestTable"]))
DolgubonSetCrafter.addRequirements(returnedTable, true)
if pcall(function()DolgubonSetCrafter.applyValidityFunctions(v)end) then else d("Request could not be displayed. However, you should still be able to craft it.") end
table.insert(DolgubonSetCrafter.savedvars.queue, copy)
end
DolgubonSetCrafter.LazyCrafter:SetAllAutoCraft(DolgubonSetCrafter.savedvars.autoCraft)
DolgubonSetCrafter.updateList()
end

local function loadFavourite(selectedFavourite)
-- Load the favourite selection with that Id
d("LOADING Set Crafter selection: '"..selectedFavourite.name.."'")
if not selectedFavourite then d("error no favourite table passed") return end
if selectedFavourite.type == "Selection" then
loadSelectionFavourite(selectedFavourite)
elseif selectedFavourite.type == "Queue" then
loadQueueFavourite(selectedFavourite)
end
end

DolgubonSetCrafter.loadFavourite = loadFavourite
Expand Down
9 changes: 4 additions & 5 deletions Lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ DolgubonSetCrafter.localizedStrings.UIStrings.jewelryEnchant = "Jewelry E
DolgubonSetCrafter.localizedStrings.UIStrings.weaponEnchant = "Weapon Enchantment"
DolgubonSetCrafter.localizedStrings.UIStrings.enchantQuality = "Enchantment Quality"
DolgubonSetCrafter.localizedStrings.UIStrings.inProgressCrafting = "This item is in progress. You can cancel it, but some items have already been created"

DolgubonSetCrafter.localizedStrings.UIStrings.addSelectionFavourite = "Save Selections"
DolgubonSetCrafter.localizedStrings.UIStrings.addQueueFavourite = "Save Queue"
DolgubonSetCrafter.localizedStrings.UIStrings.showFavourites = "Show Favourites"

DolgubonSetCrafter.localizedStrings.SettingsStrings = {}

Expand All @@ -63,10 +65,6 @@ DolgubonSetCrafter.localizedStrings.SettingsStrings.useCharacterSettingsTooltip
DolgubonSetCrafter.localizedStrings.SettingsStrings.showToggleButton = "Always show toggle button"
DolgubonSetCrafter.localizedStrings.SettingsStrings.showToggleButtonTooltip = "Show the UI toggle button at all times"

DolgubonSetCrafter.localizedStrings.SettingsStrings.showFavourites = "Favourites Window"
DolgubonSetCrafter.localizedStrings.SettingsStrings.showFavouritesTooltip = "Show the Favourites Window when the Set Crafter UI is visible"


DolgubonSetCrafter.localizedStrings.weaponNames =
{
"Axe", "Mace", "Sword", "Battle Axe", "Maul", "Greatsword", "Dagger", "Bow", "Fire Staff", "Ice Staff", "Lightning Staff", "Restoration Staff", "Shield"
Expand All @@ -84,6 +82,7 @@ DolgubonSetCrafter.localizedStrings.armourTypes =
"Heavy", "Medium", "Light"
}
ZO_CreateStringId("SI_BINDING_NAME_SET_CRAFTER_OPEN", "Open/close the Set Crafter")
ZO_CreateStringId("SI_BINDING_NAME_SET_CRAFTER_ADD_MAIL_ITEM", "Add item links in mail to queue")



Expand Down
Loading

0 comments on commit 0e77ebd

Please sign in to comment.