Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrielChaoti committed Nov 10, 2023
1 parent 84fe195 commit c24a0cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docs/unforbid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ Options

``-q``, ``--quiet``
Suppress non-error console output.

``-x``, ``-include-worn``
Include worn (X) and tattered (XX) items when unforbidding.
8 changes: 2 additions & 6 deletions unforbid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ local argparse = require('argparse')

local function unforbid_all(include_unreachable, quiet, include_worn)
local p
if quiet then
p=function(s) return end;
else
p=function(s) return print(s) end;
end
if quiet then p=function(s) return end; else p=function(s) return print(s) end; end
p('Unforbidding all items...')

local citizens = dfhack.units.getCitizens(true)
Expand Down Expand Up @@ -57,7 +53,7 @@ local options, args = {
local positionals = argparse.processArgsGetopt(args, {
{ 'h', 'help', handler = function() options.help = true end },
{ 'q', 'quiet', handler = function() options.quiet = true end },
{ 'X', 'include-tattered', handler = function() options.include_worn = true end},
{ 'X', 'include-worn', handler = function() options.include_worn = true end},
{ 'u', 'include-unreachable', handler = function() options.include_unreachable = true end },
})

Expand Down

0 comments on commit c24a0cb

Please sign in to comment.