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
/
clear-smoke.lua
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
39 lines (33 loc) · 910 Bytes
master
Breadcrumbs
scripts
/
clear-smoke.lua
Copy path
Top
File metadata and controls
Code
Blame
39 lines (33 loc) · 910 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
27
28
29
30
31
32
33
34
35
36
37
38
39
--
@
module
= true
function
removeFlow
(
flow
)
--
have DF remove the flow
if
not
flow
then
return
end
flow
.
flags
.
DEAD
=
true
local
block
=
dfhack
.
maps
.
getTileBlock
(
flow
.
pos
)
if
block
then
block
.
flow_pool
.
flags
.
active
=
true
else
df
.
global
.
world
.
orphaned_flow_pool
.
flags
.
active
=
true
end
end
function
removeFlows
(
flow_type
)
--
remove all if flow_type is nil
local
count
=
0
for
_
,
flow
in
ipairs
(
df
.
global
.
flows
)
do
if
not
flow
.
flags
.
DEAD
and
(
flow_type
==
nil
or
flow
.
type
==
flow_type
)
then
removeFlow
(
flow
)
count
=
count
+
1
end
end
return
count
end
function
clearSmoke
()
if
dfhack
.
isWorldLoaded
()
then
print
((
'
%d smoke flows removed.
'
):
format
(
removeFlows
(
df
.
flow_type
.
Smoke
)))
else
qerror
(
'
World not loaded!
'
)
end
end
if
not
dfhack_flags
.
module
then
clearSmoke
()
end
You can’t perform that action at this time.