Skip to content

Commit fe1612e

Browse files
committed
justice: implement code review suggestions
1 parent 3179f1b commit fe1612e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

docs/justice.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@ justice
22
=======
33

44
.. dfhack-tool::
5-
:summary: Commands related to the justice system
5+
:summary: Commands related to the justice system.
66
:tags: fort armok units
77

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

11-
usage
11+
Usage
1212
-----
1313

1414
::
1515
justice pardon [--unit <id>]
1616

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

2021

21-
options
22+
Options
2223
-------
2324

2425
``-u``, ``--unit <id>``

justice.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ local command = positionals[1]
3535

3636
if command == "pardon" then
3737
command_pardon(unit_id)
38+
elseif not command then
39+
qerror('Missing command')
40+
else
41+
qerror(("Unrecognised command: %s"):format(command))
3842
end
39-
40-
qerror(("Unrecognised command: %s"):format(command))

0 commit comments

Comments
 (0)