Registry Mirror
搜索
Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Files
Expand file tree
master
Breadcrumbs
scripts
/
flashstep.lua
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
26 lines (24 loc) · 917 Bytes
master
Breadcrumbs
scripts
/
flashstep.lua
Copy path
Top
File metadata and controls
Code
Blame
26 lines (24 loc) · 917 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local function reveal_tile(pos)
local block = dfhack.maps.getTileBlock(pos)
local des = block.designation[pos.x%16][pos.y%16]
des.hidden = false
des.pile = true -- reveal the tile on the map
end
local function flashstep()
local unit = dfhack.world.getAdventurer()
if not unit then return end
local pos = dfhack.gui.getMousePos()
if not pos then return end
if dfhack.units.teleport(unit, pos) then
reveal_tile(xyz2pos(pos.x-1, pos.y-1, pos.z))
reveal_tile(xyz2pos(pos.x, pos.y-1, pos.z))
reveal_tile(xyz2pos(pos.x+1, pos.y-1, pos.z))
reveal_tile(xyz2pos(pos.x-1, pos.y, pos.z))
reveal_tile(pos)
reveal_tile(xyz2pos(pos.x+1, pos.y, pos.z))
reveal_tile(xyz2pos(pos.x-1, pos.y+1, pos.z))
reveal_tile(xyz2pos(pos.x, pos.y+1, pos.z))
reveal_tile(xyz2pos(pos.x+1, pos.y+1, pos.z))
end
end
flashstep()
You can’t perform that action at this time.