forked from DFHack/scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadvtools.lua
34 lines (27 loc) · 831 Bytes
/
advtools.lua
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
--@ module=true
local convo = reqscript('internal/advtools/convo')
local shooting = reqscript('internal/advtools/shooting')
local party = reqscript('internal/advtools/party')
local pets = reqscript('internal/advtools/pets')
OVERLAY_WIDGETS = {
conversation=convo.AdvRumorsOverlay,
fix_shooting=shooting.FixShootingOverlay,
}
if dfhack_flags.module then
return
end
local commands = {
party=party.run,
pets=pets.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)