File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ local utils = require (' utils' )
2+ local argparse = require (' argparse' )
3+
4+ local function commute_sentence (unit )
5+ for _ ,punishment in ipairs (df .global .plotinfo .punishments ) do
6+ if punishment .criminal == unit .id then
7+ punishment .prison_counter = 0
8+ return
9+ end
10+ end
11+ qerror (' Unit is not currently serving a sentence!' )
12+ end
13+
14+ unit = dfhack .gui .getSelectedUnit (true )
15+ if not unit then
16+ qerror (' No unit selected!' )
17+ else
18+ commute_sentence (unit )
19+ end
Original file line number Diff line number Diff line change 1+ commute-sentence
2+ ================
3+
4+ .. dfhack-tool ::
5+ :summary: Commute the prison sentences of convicted criminals.
6+ :tags: fort armok units
7+
8+ If a unit is currently serving out their sentence but you want them released
9+ for whatever reason, this tool can commute their sentence. Just select the unit
10+ and run the command.
11+
12+ usage
13+ -----
14+
15+ ::
16+ commute-sentence
You can’t perform that action at this time.
0 commit comments