diff --git a/docs/justice.rst b/docs/justice.rst index 4334f5057..e5ff93cbc 100644 --- a/docs/justice.rst +++ b/docs/justice.rst @@ -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 ] -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 `` diff --git a/justice.lua b/justice.lua index f86b4fbed..bfefe52f0 100644 --- a/justice.lua +++ b/justice.lua @@ -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))