diff --git a/changelog.txt b/changelog.txt index 5ecf8024e..8b0e0f79d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -29,6 +29,7 @@ Template for new versions: ## New Tools ## New Features +- `combine`: added functionality to override the max stack quantity ## Fixes diff --git a/combine.lua b/combine.lua index 3253d28db..1b584e4cd 100644 --- a/combine.lua +++ b/combine.lua @@ -9,6 +9,7 @@ local opts, args = { types = nil, quiet = false, verbose = 0, + override = nil, }, {...} -- TODO: @@ -18,7 +19,6 @@ local opts, args = { -- - Combine partial bars in smelters. -- - Combine thread, quality of thread. -- - Quality for food, currently ignoring. --- - Override stack size; armok option. -- - Override container limits; quantum containers armok option. -- list of types that use race and caste @@ -169,6 +169,10 @@ local function stack_type_new(type_vals) stack_type[k] = v end + if opts.override then + stack_type.max_stack_qty = opts.override + end + -- item info stack_type.comp_items = CList:new() -- key:comp_key, val:comp_item stack_type.item_qty = 0 -- total quantity of items types @@ -785,6 +789,7 @@ local function parse_commandline(opts, args) {'d', 'dry-run', handler=function() opts.dry_run = true end}, {'q', 'quiet', handler=function() opts.quiet = true end}, {'v', 'verbose', hasArg=true, handler=function(optarg) opts.verbose = math.tointeger(optarg) or 0 end}, + {'o', 'override', hasArg=true, handler=function(optarg) opts.override = math.tointeger(optarg) or 0 end} }) -- if stockpile option is not specificed, then default to all diff --git a/docs/combine.rst b/docs/combine.rst index 9a0ec5f53..906e2ab30 100644 --- a/docs/combine.rst +++ b/docs/combine.rst @@ -68,6 +68,9 @@ Options ``-v``, ``--verbose n`` Print verbose output for debugging purposes, n from 1 to 4. +``-o``, ``--override n`` + Override the default max stack qty. + Notes -----