|
|
|
@ -190,8 +190,13 @@ function hackWish(unit)
|
|
|
|
|
if args.multi then
|
|
|
|
|
repeat amountok,amount=script.showInputPrompt('Wish','How many do you want? (numbers only!)',COLOR_LIGHTGREEN) until tonumber(amount)
|
|
|
|
|
if mattype and itemtype then
|
|
|
|
|
for i=1,tonumber(amount) do
|
|
|
|
|
createItem({mattype,matindex},{itemtype,itemsubtype},quality,unit,description)
|
|
|
|
|
if df.item_type.attrs[itemtype].is_stackable then
|
|
|
|
|
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
|
|
|
|
|
else
|
|
|
|
|