Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ that repo.
- `gui/gm-editor`: new ``--freeze`` option for ensuring the game doesn't change while you're inspecting it
- `gui/launcher`: DFHack version now shown in the default help text
- `gui/prerelease-warning`: widgets are now clickable
- `unforbid`: renamed to `claim`; alias for 'unforbid' -> 'claim' added to default init script

# 50.07-r1

Expand Down
12 changes: 6 additions & 6 deletions unforbid.lua → claim.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- Unforbid all items
-- Claim all items

local argparse = require('argparse')

local function unforbid_all(include_unreachable, quiet)
if not quiet then print('Unforbidding all items...') end
local function claim_all(include_unreachable, quiet)
if not quiet then print('Claiming all items...') end

local citizens = dfhack.units.getCitizens()
local count = 0
Expand All @@ -24,15 +24,15 @@ local function unforbid_all(include_unreachable, quiet)
end
end

if not quiet then print((' unforbid: %s'):format(item)) end
if not quiet then print((' claim: %s'):format(item)) end
item.flags.forbid = false
count = count + 1

::skipitem::
end
end

if not quiet then print(('%d items unforbidden'):format(count)) end
if not quiet then print(('%d items claimed'):format(count)) end
end

-- let the common --help parameter work, even though it's undocumented
Expand All @@ -53,5 +53,5 @@ if positionals[1] == nil or positionals[1] == 'help' or options.help then
end

if positionals[1] == 'all' then
unforbid_all(options.include_unreachable, options.quiet)
claim_all(options.include_unreachable, options.quiet)
end
14 changes: 8 additions & 6 deletions docs/unforbid.rst → docs/claim.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
unforbid
========
.. _unforbid:

claim
=====

.. dfhack-tool::
:summary: Unforbid all items.
:summary: Claim all items.
:tags: fort productivity items

This tool quickly and easily unforbids all items. This is especially useful
This tool quickly and easily claims all items. This is especially useful
after a siege to allow cleaning up the mess (or dumping of caged prisoner's
equipment with `stripcaged`).

Expand All @@ -14,13 +16,13 @@ Usage

::

unforbid all [<options>]
claim all [<options>]

Options
-------

``-u``, ``--include-unreachable``
Allows the tool to unforbid unreachable items.
Allows the tool to claim unreachable items.

``-q``, ``--quiet``
Suppress non-error console output.
4 changes: 2 additions & 2 deletions forbid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if positionals[1] == "all" then
count = count + 1
end

print(("Forbade %s items, you can unforbid them by running `unforbid all`"):format(count))
print(("Forbade %s items, you can claim them by running `claim all`"):format(count))
end

if positionals[1] == "unreachable" then
Expand Down Expand Up @@ -93,5 +93,5 @@ if positionals[1] == "unreachable" then
:: skipitem ::
end

print(("Forbade %s items, you can unforbid them by running `unforbid all`"):format(count))
print(("Forbade %s items, you can claim them by running `claim all`"):format(count))
end