HelperLib: rename load() -> loadFile(), add doFile()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user