Skip to content

Commit 0a022e8

Browse files
committed
Update manager-quantity docs and fix with Lua 5.3
1 parent b65ef97 commit 0a022e8

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

gui/manager-quantity.lua

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
-- Sets the quantity of the selected manager job
2-
--[[
3-
Sample usage:
4-
keybinding add Alt-Q@jobmanagement manager-quantity
5-
]]
2+
--[====[
3+
4+
gui/manager-quantity
5+
====================
6+
7+
Sets the quantity of the selected manager job
8+
9+
Sample usage::
10+
11+
keybinding add Alt-Q@jobmanagement gui/manager-quantity
12+
13+
]====]
614

715
local dialog = require 'gui.dialogs'
816
local args = {...}
@@ -16,6 +24,7 @@ if dfhack.gui.getCurFocus() == 'jobmanagement' then
1624
local orders = df.global.world.manager_orders
1725
function set_quantity(value)
1826
if tonumber(value) then
27+
value = tonumber(value)
1928
local i = scr.sel_idx
2029
local old_total = orders[i].amount_total
2130
orders[i].amount_total = math.max(1, value)
@@ -41,4 +50,4 @@ if dfhack.gui.getCurFocus() == 'jobmanagement' then
4150
end
4251
else
4352
dfhack.printerr('Must be called on the manager screen (j-m or u-m)')
44-
end
53+
end

0 commit comments

Comments
 (0)