2023-04-09 13:35:35 +08:00
|
|
|
|
-- SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
2023-02-26 15:01:14 +08:00
|
|
|
|
AI = require "server.ai.ai"
|
|
|
|
|
TrustAI = require "server.ai.trust_ai"
|
|
|
|
|
RandomAI = require "server.ai.random_ai"
|
2023-10-07 23:13:17 +08:00
|
|
|
|
|
|
|
|
|
--[[ 在release版暂时不启动。
|
2023-09-19 14:27:54 +08:00
|
|
|
|
SmartAI = require "server.ai.smart_ai"
|
2023-12-03 18:45:25 +08:00
|
|
|
|
---[[ 调试中,暂且不加载额外的AI。
|
2023-09-19 14:27:54 +08:00
|
|
|
|
-- load ai module from packages
|
|
|
|
|
local directories = FileIO.ls("packages")
|
|
|
|
|
require "packages.standard.ai"
|
|
|
|
|
require "packages.standard_cards.ai"
|
|
|
|
|
require "packages.maneuvering.ai"
|
|
|
|
|
table.removeOne(directories, "standard")
|
|
|
|
|
table.removeOne(directories, "standard_cards")
|
|
|
|
|
table.removeOne(directories, "maneuvering")
|
|
|
|
|
|
|
|
|
|
local _disable_packs = json.decode(fk.GetDisabledPacks())
|
|
|
|
|
|
|
|
|
|
for _, dir in ipairs(directories) do
|
|
|
|
|
if (not string.find(dir, ".disabled")) and not table.contains(_disable_packs, dir)
|
|
|
|
|
and FileIO.isDir("packages/" .. dir)
|
|
|
|
|
and FileIO.exists("packages/" .. dir .. "/ai/init.lua") then
|
|
|
|
|
|
|
|
|
|
require(string.format("packages.%s.ai", dir))
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
end
|
2023-10-07 23:13:17 +08:00
|
|
|
|
--]]
|