Skip to content

Commit 9a1ef9e

Browse files
committed
allow the state change hook to take effect when loaded as a module
1 parent cde14ae commit 9a1ef9e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

quickfort.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ function apply_blueprint(params)
5555
return quickfort_api.clean_stats(ctx.stats)
5656
end
5757

58-
-- interactive script
59-
if dfhack_flags.module then
60-
return
61-
end
62-
6358
local function do_help()
6459
print(dfhack.script_help())
6560
end
@@ -79,6 +74,11 @@ dfhack.onStateChange[GLOBAL_KEY] = function(sc)
7974
end
8075
end
8176

77+
-- interactive script
78+
if dfhack_flags.module then
79+
return
80+
end
81+
8282
local action_switch = {
8383
set=quickfort_set.do_set,
8484
reset=do_reset,

0 commit comments

Comments
 (0)