comparison ReagentMaker.lua @ 72:9cf4ca2145a3

Correct localization again, forgot to save file...
author contrebasse
date Sat, 14 May 2011 20:28:05 +0200
parents 32ec6417874a
children a77fd9d06ba4
comparison
equal deleted inserted replaced
71:4f9fd025112b 72:9cf4ca2145a3
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][1].macro then 129 if #(A.data[reagentID]) == 1 and not A.data[reagentID][1].macro 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(L["The recipe to make the reagent seems to be hidden, it is not makable."]) 132 A.Error(A.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][1].manyReagents) and A.data[A.data[reagentID][1][1]] then 142 if (not A.data[reagentID][1].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(L["You do not have enough reagents to craft [%s]"]:format(GetItemInfo(reagentID) or "item #"..reagentID)) 145 A.Error(A.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