Skip to content

Commit

Permalink
justice: implement code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
master-spike committed Oct 28, 2024
1 parent 987397e commit 62739f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 6 additions & 5 deletions docs/justice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ justice
=======

.. dfhack-tool::
:summary: Commands related to the justice system
:summary: Commands related to the justice system.
:tags: fort armok units

This tool allows control over aspects of the justice system, such as the
ability to pardon criminals.

usage
Usage
-----

::
justice pardon [--unit <id>]

Pardon the selected unit or the one specified by unit id if provided. Currently
only applies to prison time and doesn't cancel beatings or hammerings.
Pardon the selected unit or the one specified by unit id (if provided).
Currently only applies to prison time and doesn't cancel beatings or
hammerings.


options
Options
-------

``-u``, ``--unit <id>``
Expand Down
6 changes: 4 additions & 2 deletions justice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ local command = positionals[1]

if command == "pardon" then
command_pardon(unit_id)
elseif not command then
qerror('Missing command')
else
qerror(("Unrecognised command: %s"):format(command))
end

qerror(("Unrecognised command: %s"):format(command))

0 comments on commit 62739f7

Please sign in to comment.