comparison ReagentMaker.lua @ 73:a77fd9d06ba4

Use the new internal data format everywhere
author contrebasse
date Sat, 14 May 2011 20:55:49 +0200
parents 9cf4ca2145a3
children e837f5681fbb
comparison
equal deleted inserted replaced
72:9cf4ca2145a3 73:a77fd9d06ba4
213 if not reagentID or not A.data[reagentID] then return end 213 if not reagentID or not A.data[reagentID] then return end
214 214
215 btn.textureHighlight:Show() 215 btn.textureHighlight:Show()
216 216
217 -- Check if the item is made by only one recipe. If not, return 217 -- Check if the item is made by only one recipe. If not, return
218 if #A.data[reagentID]>1 then 218 if not A.isRecipeUnique(A.data[reagentID]) then return end
219 local spellLink
220 for _,v in ipairs(A.data[reagentID]) do
221 if not spellLink then
222 spellLink = v.spellLink
223 else
224 if v.spellLink ~= spellLink then
225 return
226 end
227 end
228 end
229 end
230 219
231 -- Tooltips 220 -- Tooltips
232 local link = A.data[reagentID][1].spellLink 221 local link = A.data[reagentID][1].spellLink
233 if link then 222 if link then
234 A.tooltipRecipe:SetOwner(btn) 223 A.tooltipRecipe:SetOwner(btn)