|
|
@ -190,8 +190,13 @@ function hackWish(unit)
|
|
|
|
if args.multi then
|
|
|
|
if args.multi then
|
|
|
|
repeat amountok,amount=script.showInputPrompt('Wish','How many do you want? (numbers only!)',COLOR_LIGHTGREEN) until tonumber(amount)
|
|
|
|
repeat amountok,amount=script.showInputPrompt('Wish','How many do you want? (numbers only!)',COLOR_LIGHTGREEN) until tonumber(amount)
|
|
|
|
if mattype and itemtype then
|
|
|
|
if mattype and itemtype then
|
|
|
|
for i=1,tonumber(amount) do
|
|
|
|
if df.item_type.attrs[itemtype].is_stackable then
|
|
|
|
createItem({mattype,matindex},{itemtype,itemsubtype},quality,unit,description)
|
|
|
|
local proper_item=df.item.find(dfhack.items.createItem(itemtype, itemsubtype, mattype, matindex, unit))
|
|
|
|
|
|
|
|
proper_item:setStackSize(amount)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
for i=1,amount do
|
|
|
|
|
|
|
|
dfhack.items.createItem(itemtype, itemsubtype, mattype, matindex, unit)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
|
|
|
else
|
|
|
|