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 -help
print this help message print this help message
-creator id -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: examples:
0 0
2 2
\\LAST
-material matstring -material matstring
specify the material of the item to be created specify the material of the item to be created
examples: examples:
@ -126,4 +127,8 @@ arguments:
return return
end 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) createItem(tonumber(args.creator), args.item, args.material, args.leftHand, args.rightHand, args.quality)