Merge remote-tracking branch 'Putnam3145/patch-10' into develop

Conflicts:
	NEWS
develop
lethosor 2015-02-06 17:08:00 -05:00
commit 7823a14a8f
2 changed files with 8 additions and 2 deletions

@ -3,6 +3,7 @@ DFHack Future
Lua scripts will only be reloaded if necessary and will delete their old globals if the file was changed.
Fixes
Gave add-thought a proper subthought arg.
Made hack-wish stack properly.
New Plugins
New Scripts
modtools/reaction-product-trigger: triggers callbacks when products are produced (contrast with when reactions complete)

@ -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