File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 2
2
-- @ module = true
3
3
4
4
local argparse = require (' argparse' )
5
+ local guidm = require (' gui.dwarfmode' )
5
6
6
7
local function parse_args (args )
7
8
local opts = {}
@@ -17,18 +18,6 @@ local function parse_args(args)
17
18
return opts
18
19
end
19
20
20
- function get_active_cursor () -- Return active fort/adv cursor or nil
21
- if dfhack .world .isAdventureMode () then
22
- local look = df .global .game .main_interface .adventure .look
23
- if look .open and look .cursor :isValid () then
24
- return look .cursor -- Note: This is a df.coord
25
- end
26
- elseif df .global .cursor .x >= 0 then
27
- return df .global .cursor
28
- end
29
- return nil -- Not active
30
- end
31
-
32
21
local months =
33
22
{
34
23
' Granite, in early Spring.' ,
@@ -129,7 +118,7 @@ if dfhack_flags.module then
129
118
end
130
119
131
120
function main (opts )
132
- local cursor = get_active_cursor ()
121
+ local cursor = guidm . getCursorPos ()
133
122
134
123
if opts .copy then -- Copy keyboard cursor to clipboard
135
124
if not cursor then
You can’t perform that action at this time.
0 commit comments