Mercurial > wow > reagentmaker
comparison ReagentMaker.lua @ 65:60871b43531d
Add localization
author | contrebasse |
---|---|
date | Fri, 13 May 2011 02:17:52 +0200 |
parents | 512660b07eda |
children | 32ec6417874a |
comparison
equal
deleted
inserted
replaced
64:4d0ec5b598d0 | 65:60871b43531d |
---|---|
127 | 127 |
128 -- If only one recipe is known for the reagent, use it | 128 -- If only one recipe is known for the reagent, use it |
129 if #(A.data[reagentID]) == 1 and not A.data[reagentID].spell then | 129 if #(A.data[reagentID]) == 1 and not A.data[reagentID].spell then |
130 local numMakable, reagentIndex = A.numMakable(reagentID) | 130 local numMakable, reagentIndex = A.numMakable(reagentID) |
131 if not numMakable then | 131 if not numMakable then |
132 A.Error("The recipe to make the reagent seems to be hidden, it is not makable.") | 132 A.Error(L["The recipe to make the reagent seems to be hidden, it is not makable."]) |
133 return | 133 return |
134 end | 134 end |
135 if numMakable>0 then | 135 if numMakable>0 then |
136 A.craft(recipeIndex,reagentRecipeIndex,reagentIndex,numMakable,chooseNumberToCraft) | 136 A.craft(recipeIndex,reagentRecipeIndex,reagentIndex,numMakable,chooseNumberToCraft) |
137 return | 137 return |
140 -- If we can make the item needed to make the reagent, open a window to make it | 140 -- If we can make the item needed to make the reagent, open a window to make it |
141 -- one step recursion, enables to mill to create an ink | 141 -- one step recursion, enables to mill to create an ink |
142 if (not A.data[reagentID].manyReagents) and A.data[A.data[reagentID][1][1]] then | 142 if (not A.data[reagentID].manyReagents) and A.data[A.data[reagentID][1][1]] then |
143 A.externalCraftWindow(A.data[reagentID][1][1],reagentID) | 143 A.externalCraftWindow(A.data[reagentID][1][1],reagentID) |
144 else | 144 else |
145 A.Error("You do not have enough reagents to craft ["..(GetItemInfo(reagentID) or "item #"..reagentID).."]") | 145 A.Error(L["You do not have enough reagents to craft [%s]"]:format(GetItemInfo(reagentID) or "item #"..reagentID)) |
146 end | 146 end |
147 return | 147 return |
148 else | 148 else |
149 A.externalCraftWindow(reagentID) | 149 A.externalCraftWindow(reagentID) |
150 end -- if | 150 end -- if |
222 A.tooltipRecipe:Show() | 222 A.tooltipRecipe:Show() |
223 A.tooltipRecipe:ClearAllPoints() | 223 A.tooltipRecipe:ClearAllPoints() |
224 A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT") | 224 A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT") |
225 else | 225 else |
226 -- Shouldn't happend, but just in case... | 226 -- Shouldn't happend, but just in case... |
227 A.Error("Recipe link not found for "..reagentID) | 227 A.Error(L["Recipe link not found for %s"]:format(reagentID)) |
228 end | 228 end |
229 end | 229 end |
230 | 230 |
231 function A.btnLeft(btn) | 231 function A.btnLeft(btn) |
232 btn.textureHighlight:Hide() | 232 btn.textureHighlight:Hide() |