Skip to content

Commit

Permalink
Merge pull request #19 from med0rian/master
Browse files Browse the repository at this point in the history
Templates, Options fix and small Errors
  • Loading branch information
davidcraig authored Aug 25, 2024
2 parents 2f8cdfe + 2305cf8 commit 5e36974
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 15 deletions.
2 changes: 1 addition & 1 deletion FarmIt2_Button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function FI_Tooltip( self )
GameTooltip:SetHyperlink(sLink);

-- check for iTip
if IsAddOnLoaded("iTip") then
if C_AddOns.IsAddOnLoaded("iTip") then
-- let iTip do this part (prevents duplicate info)
else
GameTooltip:AddLine("\n"..sType.." ("..sSubType..")");
Expand Down
14 changes: 8 additions & 6 deletions FarmIt2_Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ local yellow,green,blue,white = "|cFFFFFF00","|cFF00FF00","|cFF00CCFF","|cFFFFFF
--------------------------------------------------------------------------------
FI_CONFIG.Panel = CreateFrame("Frame", "FI_Panel", UIParent);
FI_CONFIG.Panel.name = "FarmIt2";
Settings.CreateCategory(FI_CONFIG.Panel);

local mainCategory = Settings.RegisterCanvasLayoutCategory(FI_CONFIG.Panel, "FarmIt2");
Settings.RegisterAddOnCategory(mainCategory);

FI_CONFIG.Pages = {
CreateFrame("Frame", "FI_Panel_1", FI_CONFIG.Panel),
Expand All @@ -27,23 +29,23 @@ FI_CONFIG.Pages = {

FI_CONFIG.Pages[1]["name"] = "General";
FI_CONFIG.Pages[1]["parent"] = FI_CONFIG.Panel.name;
Settings.CreateCategory(FI_Panel_1);
Settings.RegisterCanvasLayoutSubcategory(mainCategory, FI_CONFIG.Pages[1], FI_CONFIG.Pages[1]["name"]);

FI_CONFIG.Pages[2]["name"] = "Buttons";
FI_CONFIG.Pages[2]["parent"] = FI_CONFIG.Panel.name;
Settings.CreateCategory(FI_Panel_2);
Settings.RegisterCanvasLayoutSubcategory(mainCategory, FI_CONFIG.Pages[2], FI_CONFIG.Pages[2]["name"]);

FI_CONFIG.Pages[3]["name"] = "Bars";
FI_CONFIG.Pages[3]["parent"] = FI_CONFIG.Panel.name;
Settings.CreateCategory(FI_Panel_3);
Settings.RegisterCanvasLayoutSubcategory(mainCategory, FI_CONFIG.Pages[3], FI_CONFIG.Pages[3]["name"]);

FI_CONFIG.Pages[4]["name"] = "Help";
FI_CONFIG.Pages[4]["parent"] = FI_CONFIG.Panel.name;
Settings.CreateCategory(FI_Panel_4);
Settings.RegisterCanvasLayoutSubcategory(mainCategory, FI_CONFIG.Pages[4], FI_CONFIG.Pages[4]["name"]);

FI_CONFIG.Pages[5]["name"] = "Commands";
FI_CONFIG.Pages[5]["parent"] = FI_CONFIG.Panel.name;
Settings.CreateCategory(FI_Panel_5);
Settings.RegisterCanvasLayoutSubcategory(mainCategory, FI_CONFIG.Pages[5], FI_CONFIG.Pages[5]["name"]);


--------------------------------------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions FarmIt2_Config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\..\FrameXML\UI.xsd">
<Scripts>
<OnLoad>
_G[self:GetName().."_Title"]:SetText("General Settings");
_G[self:GetName().."_Description"]:SetText("Due to the nature of FarmIt's purpose, most settings are saved on a per-character basis since different toons will have different professions, etc. However, statistical data and item related information such as farming templates (saved sets of items) are shared between characters.");
_G[self:GetName().."_Description"]:SetText("Due to the nature of FarmIt's purpose,\n most settings are saved on a per-character basis since different toons will have different professions, etc.\n"..
"However, statistical data and item related information such as farming templates (saved sets of items)\n"..
"are shared between characters."
);
</OnLoad>
</Scripts>

Expand Down Expand Up @@ -163,7 +166,7 @@ xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\..\FrameXML\UI.xsd">
<Scripts>
<OnLoad>
_G[self:GetName().."_Title"]:SetText(FI_TAGLINE.." - Buttons");
_G[self:GetName().."_Description"]:SetText("");
_G[self:GetName().."_Description"]:SetText(" - Buttons are not fully implemented or documentated ¯\_(ツ)_/¯ - ");
</OnLoad>
</Scripts>

Expand Down
15 changes: 9 additions & 6 deletions FarmIt2_Currency.lua
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,16 @@ function FI_Hook_Currency( tooltip )
-- Try getting the parent frame's name right off instead of getting the whole object, and if it's not a backpack or currency window frame just exit.
local parent = owner:GetParent();

if parent and (parent:GetName() == "BackpackTokenFrame") then
cid = tonumber(strsub(owner:GetName(), -1));
-- show objective if set
local line = FI_Currency_Tooltip(cid);
if line then GameTooltip:AddLine(line); tooltip:Show(); end
-- Sometimes cid can be nil? BugSack show Error
if cid == nil then
if FI_SV_CONFIG.debug then print("BackpackTokenFrame Error!"); end
else
cid = tonumber(strsub(owner:GetName(), -1));
-- show objective if set
local line = FI_Currency_Tooltip(cid);
if line then GameTooltip:AddLine(line); tooltip:Show(); end
end
end
end
end

--------------------------------------------------------------------------------
Expand Down
19 changes: 19 additions & 0 deletions FarmIt2_Templates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ FI_TPL.Templates = {
["BFA"] = {},
["SL"] = {},
["DF"] = {},
["TWW"] = {},
}

-- list order
Expand All @@ -70,6 +71,7 @@ FI_TPL.Order = {
[8] = "BFA",
[9] = "SL",
[10] = "DF",
[11] = "TWW",
}

--------------------------------------------------------------------------------
Expand All @@ -91,6 +93,10 @@ FI_TPL.Templates.DF.OreTier1 = {190395,190312,189143} -- Tier 1 Ores
FI_TPL.Templates.DF.OreTier2 = {190396,190313,188658} -- Tier 2 Ores
FI_TPL.Templates.DF.OreTier3 = {190394,190314,190311} -- Tier 3 Ores
FI_TPL.Templates.DF.Elements = {190315,190320,190322,190326,190328,190330} --Elements
-- 11.0 The War Within [Bismut,Aqirit,Eisenklauenerz]
FI_TPL.Templates.TWW.Ore = {210930,210933,210936}
FI_TPL.Templates.TWW.OreT2 = {210931,210934,210937}
FI_TPL.Templates.TWW.OreT3 = {210932,210935,210938}

-- Herbalism
FI_TPL.Templates.WOW.Herbs = {2447,765,785,2449,2450,2452,2453,3820,3369,3355,3356,3357,3818,3821,3358,3819}
Expand All @@ -107,6 +113,10 @@ FI_TPL.Templates.SL.Herbs = {168583,168586,168589,169701,170554,171315,187699}
FI_TPL.Templates.DF.HerbsTier1 = {191460,191464,191467,191470} -- Tier 1 Herbs
FI_TPL.Templates.DF.HerbsTier2 = {191461,191465,191468,191471} -- Tier 2 Herbs
FI_TPL.Templates.DF.HerbsTier3 = {191462,191466,191469,191472} -- Tier 3 Herbs
-- 11.0 The War Within
FI_TPL.Templates.TWW.Herbs = {210796,210808,210805,210799,210802}
FI_TPL.Templates.TWW.HerbsT2 = {210797,210809,210806,210800,210803}
FI_TPL.Templates.TWW.HerbsT3 = {210798,210810,210807,210801,210804}

-- Skinning
FI_TPL.Templates.WOW.Skin = {2934,2318,783,5082,2319,4232,4234,4235,8167,4304,8169,8154,8165,15415,15412,15416,8170,8171}
Expand All @@ -123,6 +133,12 @@ FI_TPL.Templates.SL.Skin = {172089,172092,172094,172096,172097,177279,187701}
FI_TPL.Templates.DF.SkinTier1 = {193208,193213,193216,193222} -- Tier 1 Lether
FI_TPL.Templates.DF.SkinTier2 = {193210,193214,193217,193223} -- Tier 2 Lether
FI_TPL.Templates.DF.SkinTier3 = {193211,193215,193218,193224} -- Tier 3 Lether
-- 11.0 The War Within [Stormcharged Leather, Gloom Chitin, Thunderous Hide, Sunles Carapace]
FI_TPL.Templates.TWW.Skin = {212664,212667,212670,212674}
FI_TPL.Templates.TWW.SkinT2 = {212665,212668,212672,212675}
FI_TPL.Templates.TWW.SkinT3 = {212666,212669,212673,212676}
-- Non Tier Materials [Gloomfathom Hide, Bottled Storm]
FI_TPL.Templates.TWW.Skin2 = {221757,218338}

-- Fishing
FI_TPL.Templates.WOW.Fish = {4603,6289,6291,6303,6308,6317,6361}
Expand All @@ -141,6 +157,9 @@ FI_TPL.Templates.LEGION.Fish = {124107,124109,124112,124111,124110,124108,133607
FI_TPL.Templates.BFA.Fish = {152543,152544,152545,152546,152547,152548,152549,168302,168646,174327,174328}
FI_TPL.Templates.SL.Fish = {173032,173033,173034,173035,173036,173037,187702}
FI_TPL.Templates.DF.Fish = {200061,194730,194967,194966,194968,194969,194970}
-- 11.0 The War Within
FI_TPL.Templates.TWW.Fishing = {222533,220134,220135,220136,220137,220138,220139,220141,220142,220143}
FI_TPL.Templates.TWW.Fishing2 = {220144,220145,220146,220147,220148,220149,220150,220151,220152,220153}

-- Archaeology
FI_TPL.Templates.WOW.Arch = {52843,63127,63128,64392,64394,64395,64396,64397}
Expand Down

0 comments on commit 5e36974

Please sign in to comment.