forked from DFHack/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadvtools.lua
More file actions
32 lines (25 loc) · 765 Bytes
/
advtools.lua
File metadata and controls
32 lines (25 loc) · 765 Bytes
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
--@ module=true
local convo = reqscript('internal/advtools/convo')
local fastcombat = reqscript('internal/advtools/fastcombat')
local party = reqscript('internal/advtools/party')
OVERLAY_WIDGETS = {
conversation=convo.AdvRumorsOverlay,
fastcombat=fastcombat.AdvCombatOverlay,
}
if dfhack_flags.module then
return
end
local commands = {
party=party.run,
}
local args = {...}
local command = table.remove(args, 1)
if not command or command == 'help' or not commands[command] then
print(dfhack.script_help())
return
end
-- since these are "advtools", maybe don't let them run outside adventure mode.
if not dfhack.world.isAdventureMode() then
qerror("This script can only be used during adventure mode!")
end
commands[command](args)