-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.lua
37 lines (30 loc) · 1.07 KB
/
main.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
35
36
37
--- STEAMODDED HEADER
--- MOD_NAME: Balatrobot
--- MOD_ID: Balatrobot-v0.3
--- MOD_AUTHOR: [Besteon]
--- MOD_DESCRIPTION: A botting API for Balatro
function SMODS.INIT.BALATROBOT()
mw = SMODS.findModByID("Balatrobot-v0.3")
-- Load the mod configuration
assert(load(NFS.read(mw.path .. "config.lua")))()
if not BALATRO_BOT_CONFIG.enabled then
return
end
-- External libraries
assert(load(NFS.read(mw.path .. "lib/list.lua")))()
assert(load(NFS.read(mw.path .. "lib/hook.lua")))()
assert(load(NFS.read(mw.path .. "lib/bitser.lua")))()
assert(load(NFS.read(mw.path .. "lib/sock.lua")))()
assert(load(NFS.read(mw.path .. "lib/json.lua")))()
-- Mod specific files
assert(load(NFS.read(mw.path .. "src/utils.lua")))()
assert(load(NFS.read(mw.path .. "src/bot.lua")))()
assert(load(NFS.read(mw.path .. "src/middleware.lua")))()
assert(load(NFS.read(mw.path .. "src/botlogger.lua")))()
assert(load(NFS.read(mw.path .. "src/api.lua")))()
sendDebugMessage("Balatrobot v0.3 loaded")
Middleware.hookbalatro()
Botlogger.path = mw.path
Botlogger.init()
BalatrobotAPI.init()
end