Skip to content

Commit

Permalink
- Remove obsolete options
Browse files Browse the repository at this point in the history
- Fix for old queue entries
  • Loading branch information
b-morgan committed Feb 21, 2021
1 parent 358d904 commit e157bce
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 25 deletions.
2 changes: 2 additions & 0 deletions Skillet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1264,10 +1264,12 @@ function Skillet:HideTradeSkillWindow()
if frame and frame:IsVisible() then
frame:Hide()
closed = true
--[[
if Skillet.db.profile.use_blizzard_for_optional and TradeSkillFrame then
self:RestoreBlizzardFrame()
Skillet.BlizzardUIshowing = false
end
--]]
end
return closed
end
Expand Down
2 changes: 2 additions & 0 deletions SkilletData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,13 @@ end

function Skillet:SetTradeSkillUnlearned()
Skillet:SetGroupSelection(nil)
--[[
if Skillet.db.profile.use_blizzard_for_optional and TradeSkillFrame and TradeSkillFrame:IsVisible() then
Skillet:RestoreBlizzardFrame()
HideUIPanel(TradeSkillFrame)
Skillet.BlizzardUIshowing = false
end
--]]
C_TradeSkillUI.SetOnlyShowLearnedRecipes(false);
C_TradeSkillUI.SetOnlyShowUnlearnedRecipes(true);
Skillet.unlearnedRecipes = true
Expand Down
4 changes: 4 additions & 0 deletions SkilletOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Skillet.options =
width = "double",
order = 19
},
--[[
queue_more_than_one = {
type = "toggle",
name = L["QUEUEMORETHANONENAME"],
Expand All @@ -160,6 +161,7 @@ Skillet.options =
width = "double",
order = 20
},
--]]
queue_glyph_reagents = {
type = "toggle",
name = L["QUEUEGLYPHREAGENTSNAME"],
Expand Down Expand Up @@ -329,6 +331,7 @@ Skillet.options =
width = "double",
order = 5
},
--[[
use_blizzard_for_optional = {
type = "toggle",
name = L["USEBLIZZFOROPTIONNAME"],
Expand All @@ -342,6 +345,7 @@ Skillet.options =
width = "double",
order = 6
},
--]]
enhanced_recipe_display = {
type = "toggle",
name = L["ENHANCHEDRECIPEDISPLAYNAME"],
Expand Down
8 changes: 5 additions & 3 deletions SkilletQueue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ local function queueAppendReagent(command, reagentID, need, queueCraftables)
if not Skillet.TradeSkillIgnoredMats[recipeSourceID] and
not Skillet.db.realm.userIgnoredMats[Skillet.currentPlayer][recipeSourceID] then
Skillet:QueueAppendCommand(newCommand, queueCraftables, true)
if not Skillet.db.profile.queue_more_than_one then
-- if not Skillet.db.profile.queue_more_than_one then
break
end
-- end
else
DA.DEBUG(3,"Did Not Queue "..tostring(recipeSourceID).." ("..tostring(recipeSource.name)..")")
end
Expand Down Expand Up @@ -394,6 +394,7 @@ function Skillet:ProcessQueue(altMode)
craftCount = numAvailable
end
local recipe = self:GetRecipe(command.recipeID)
--[[
if self.db.profile.use_blizzard_for_optional and recipe.numOptional and recipe.numOptional ~= "0" then
--
-- Temporarily skip crafting if the recipe needs optional reagents
Expand All @@ -402,6 +403,7 @@ function Skillet:ProcessQueue(altMode)
self:RemoveFromQueue(qpos)
return
end
--]]
DA.DEBUG(1,"Crafting: "..tostring(command.count).." of "..tostring(self.processingSpell).." ("..tostring(command.recipeID)..")")
self.queuecasting = true
self.processingCount = craftCount
Expand Down Expand Up @@ -657,7 +659,7 @@ function Skillet:ScanQueuedReagents()
end
for i=1,#recipe.reagentData do
local reagent = recipe.reagentData[i]
if command.recipeLevel > 0 then
if command.recipeLevel and command.recipeLevel > 0 then
--DA.DEBUG(2,"ScanQueuedReagents: recipeID= "..tostring(command.recipeID)..", recipeLevel= "..tostring(command.recipeLevel))
local reagentName, reagentTexture, reagentCount, playerReagentCount = C_TradeSkillUI.GetRecipeReagentInfo(command.recipeID, i, command.recipeLevel)
--DA.DEBUG(2,"ScanQueuedReagents: reagentName= "..tostring(reagentName)..", reagentCount= "..tostring(reagentCount))
Expand Down
48 changes: 26 additions & 22 deletions UI/MainFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ function Skillet:UpdateTradeButtons(player)
end
end
end
--[[
--
-- One more button to toggle the Blizzard TradeSkillFrame
--
Expand All @@ -843,6 +844,7 @@ function Skillet:UpdateTradeButtons(player)
position = position + button:GetWidth()
button:Show()
end
--]]
end

function Skillet.PluginDropdown_OnClick(this)
Expand Down Expand Up @@ -1951,6 +1953,7 @@ function Skillet:UpdateDetailsWindow(skillIndex)
button:Hide()
end
end
--[[
--
-- Temporarily, show the Blizzard UI with this recipe selected (unless this is an unlearned recipe).
--
Expand All @@ -1967,6 +1970,7 @@ function Skillet:UpdateDetailsWindow(skillIndex)
TradeSkillFrame:SelectRecipe(skill.id)
end
end
--]]
else
--
-- Recipe has no optional reagents.
Expand Down Expand Up @@ -2710,13 +2714,13 @@ function Skillet:SkilletFrameForceClose()
return self:HideAllWindows()
end
end
--[[
if Skillet.db.profile.use_blizzard_for_optional and TradeSkillFrame and TradeSkillFrame:IsVisible() then
Skillet.RestoreBlizzardFrame()
end
--]]
C_TradeSkillUI.CloseTradeSkill()
return self:HideAllWindows()


end

function Skillet:InventoryFilterButton_OnClick(button)
Expand Down Expand Up @@ -2786,13 +2790,13 @@ end
--

local skillMenuSelection = {
--@alpha@
--[=[@alpha@
{
text = "skillMenuSelection",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Select All"],
func = function() Skillet:SkillButton_SetAllSelections(true) Skillet:UpdateTradeSkillWindow() end,
Expand All @@ -2804,13 +2808,13 @@ local skillMenuSelection = {
}

local skillMenuGroup = {
--@alpha@
--[=[@alpha@
{
text = "skillMenuGroup",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Empty Group"],
func = function() Skillet:SkillButton_NewGroup() end,
Expand All @@ -2822,13 +2826,13 @@ local skillMenuGroup = {
}

local favoriteMenu = {
--@alpha@
--[=[@alpha@
{
text = "favoriteMenu",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
text = "",
func = function()
local recipeID = Skillet.menuButton.skill.recipeID
Expand All @@ -2839,13 +2843,13 @@ local favoriteMenu = {
}

local skillMenuIgnore = {
--@alpha@
--[=[@alpha@
{
text = "skillMenuIgnore",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Add Recipe to Ignored List"],
func = function()
Expand Down Expand Up @@ -2875,13 +2879,13 @@ local skillMenuIgnore = {
}

local skillMenuList = {
--@alpha@
--[=[@alpha@
{
text = "skillMenuList",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Link Recipe"],
func = function()
Expand Down Expand Up @@ -2940,13 +2944,13 @@ local skillMenuList = {
}

local skillMenuListLocked = {
--@alpha@
--[=[@alpha@
{
text = "skillMenuListLocked",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Link Recipe"],
func = function()
Expand Down Expand Up @@ -2986,13 +2990,13 @@ local skillMenuListLocked = {
}

local headerMenuList = {
--@alpha@
--[=[@alpha@
{
text = "headerMenuList",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Rename Group"],
func = function() Skillet:SkillButton_NameEditEnable(Skillet.menuButton) end,
Expand Down Expand Up @@ -3032,13 +3036,13 @@ local headerMenuList = {
}

local headerMenuListLocked = {
--@alpha@
--[=[@alpha@
{
text = "headerMenuListLocked",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Selection"],
hasArrow = true,
Expand All @@ -3051,13 +3055,13 @@ local headerMenuListLocked = {
}

local headerMenuListMainGroup = {
--@alpha@
--[=[@alpha@
{
text = "headerMenuListMainGroup",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["New Group"],
hasArrow = true,
Expand Down Expand Up @@ -3093,13 +3097,13 @@ local headerMenuListMainGroup = {
}

local headerMenuListMainGroupLocked = {
--@alpha@
--[=[@alpha@
{
text = "headerMenuListMainGroupLocked",
isTitle = true,
notCheckable = true,
},
--@end-alpha@
--@end-alpha@]=]
{
text = L["Copy"],
func = function() Skillet:SkillButton_CopySelected() end,
Expand Down

0 comments on commit e157bce

Please sign in to comment.