getMissionTypeConstructor
Definition
-- @/lua/ge/extensions/gameplay/missions/missions.lua:96
local function getMissionTypeConstructor(missionTypeName)
if not missionTypeConstructors[missionTypeName] then
local reqPath = missionTypesDir.."/"..missionTypeName .."/" .. missionTypeConstructorFilename
local luaPath = reqPath..".lua"
if not FS:fileExists(luaPath) then
log("E", "", "Unable to load mission type, file not found: "..dumps(luaPath))
else
missionTypeConstructors[missionTypeName] = require(reqPath)
if not missionTypeConstructors[missionTypeName] then
log("E", "", "Unable to load mission type, couldn't require path: "..dumps(reqPath))
end
end
end
return missionTypeConstructors[missionTypeName]
end
Callers
@/lua/ge/extensions/gameplay/missions/missions.lua
-- load constructor
local missionTypeConstructor = getMissionTypeConstructor(missionData.missionType)
local infoPath = missionDir .. "/" .. infoFile