Tweak modtools/create-item (creator = \LAST)

develop
expwnent 2015-09-15 02:32:58 -04:00
parent 836fbe8650
commit fdca83e17a
1 changed files with 6 additions and 1 deletions

@ -104,10 +104,11 @@ arguments:
-help
print this help message
-creator id
specify the id of the unit who will create the item
specify the id of the unit who will create the item, or \\LAST to indicate the unit with id df.global.unit_next_id-1
examples:
0
2
\\LAST
-material matstring
specify the material of the item to be created
examples:
@ -126,4 +127,8 @@ arguments:
return
end
if args.creator == '\\LAST' then
args.creator = tostring(df.global.unit_next_id-1)
end
createItem(tonumber(args.creator), args.item, args.material, args.leftHand, args.rightHand, args.quality)