HelperLib: rename load() -> loadFile(), add doFile()

This commit is contained in:
Van
2026-11-13 17:06:08 +03:00
parent 2243ed7532
commit 1e91290b02
4 changed files with 52 additions and 26 deletions

View File

@@ -7,7 +7,8 @@ Mod = {}
---@field shortName string
---@field path string
---@field require fun(fileName:string):table
---@field load fun(class:table, fileName:string)
---@field loadFile fun(class:table, fileName:string)
---@field doFile fun(fileName:string)
---Returns the mod name without prefixes
---@param name string
@@ -27,14 +28,16 @@ function Mod.getInfo(modname)
local path = core.get_modpath(name)
assert(path ~= nil, ('A mod `%s` does not exist.'):format(name))
local require = Require:getModRequire(name, path)
local load = Require:getModLoad(name, path)
local loadFile = Require:getModLoadFile(name, path)
local doFile = Require:getModDoFile(path)
local info = {
name = name,
shortName = shortName,
path = path,
require = require,
load = load
loadFile = loadFile,
doFile = doFile
}
return info