|
|
@ -173,21 +173,21 @@ if not args.command then
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
if args.weaponType then
|
|
|
|
if args.itemType then
|
|
|
|
local temp
|
|
|
|
local temp
|
|
|
|
for _,itemdef in ipairs(df.global.world.raws.itemdefs.weapons) do
|
|
|
|
for _,itemdef in ipairs(df.global.world.raws.itemdefs.all) do
|
|
|
|
if itemdef.id == args.weaponType then
|
|
|
|
if itemdef.id == args.itemType then
|
|
|
|
temp = itemdef.subtype
|
|
|
|
temp = itemdef.subtype
|
|
|
|
break
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if not temp then
|
|
|
|
if not temp then
|
|
|
|
error 'Could not find weapon type.'
|
|
|
|
error 'Could not find item type.'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
args.weaponType = temp
|
|
|
|
args.itemType = temp
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local numConditions = (args.material and 1 or 0) + (args.weaponType and 1 or 0) + (args.contaminant and 1 or 0)
|
|
|
|
local numConditions = (args.material and 1 or 0) + (args.itemType and 1 or 0) + (args.contaminant and 1 or 0)
|
|
|
|
if numConditions > 1 then
|
|
|
|
if numConditions > 1 then
|
|
|
|
error 'too many conditions defined: not (yet) supported (pester expwnent if you want it)'
|
|
|
|
error 'too many conditions defined: not (yet) supported (pester expwnent if you want it)'
|
|
|
|
elseif numConditions == 0 then
|
|
|
|
elseif numConditions == 0 then
|
|
|
|