-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.lua
26 lines (22 loc) · 889 Bytes
/
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
if type(jit) ~= "table" then
error("Must be run with luajit!")
end
local arg_parser = require("arg_parser")
local options = arg_parser.parse(arg)
local fake_engine = require("fake_engine")
fake_engine.data_path = options.data_path
fake_engine.mods_path = options.mods_path
fake_engine.make_fake_api(options)
local renderer = require("renderer")
local text_formatter = require("text_formatter")
---@diagnostic disable-next-line: lowercase-global
print_table = require("print")
local mod_interface = require("mod_interface")
-- ---@type image
--local image = require("image")
mod_interface.load_mods(options.mods)
fake_engine.initialise_engine(text_formatter, options)
text_formatter.set_colours(options.ansi)
fake_engine.evaluate(options, text_formatter)
--image.render(fake_engine.calls, options.spells)
print(renderer.render(fake_engine.calls, fake_engine, text_formatter, options))