loadManager
Definition
-- @/lua/ge/extensions/core/flowgraphManager.lua:96
local function loadManager(filepath, hidden, keepSavedDirs)
local data = jsonReadFile(filepath)
local mgr = require('/lua/ge/extensions/flowgraph/manager')(M)
table.insert(managers, mgr)
if data then
local dir, filename, ext = path.split(filepath)
data.savedDir = keepSavedDirs and data.savedDir or dir
data.savedFilename = keepSavedDirs and data.savedFilename or filename
mgr:_onDeserialized(data)
mgr.hidden = hidden
mgr:historySnapshot("Loaded File " .. filepath)
return mgr, true
else
log("E", "Load Manager", "Could not find file " .. filepath)
return mgr, false
end
end
Callers
@/lua/ge/extensions/gameplay/traffic/baseRole.lua
-- load the flowgraph and set its variables
self.flowgraph = core_flowgraphManager.loadManager(fgFile)
self.flowgraph.transient = true -- prevent flowgraph from restarting flowgraphs after ctrl+L
@/lua/ge/extensions/editor/flowgraphEditor.lua
--local targetMgr = fgMgr.addManager(data)
local targetMgr = fgMgr.loadManager(fCbData.filepath, nil, keepSavedDirs)
M.setManager(targetMgr)
@/lua/ge/extensions/freeroam/freeroam.lua
if path then
local mgr = core_flowgraphManager.loadManager(path)
--core_flowgraphManager.startOnLoadingScreenFadeout(mgr)
@/lua/ge/extensions/core/flowgraphManager.lua
--M.addManager()
--M.loadManager("flowgraphEditor/demo/helloWorld.flow.json")
--M.loadManager("flowgraphEditor/demo/helloVariables.flow.json")
--M.loadManager("flowgraphEditor/demo/helloWorld.flow.json")
--M.loadManager("flowgraphEditor/demo/helloVariables.flow.json")
end
@/lua/ge/extensions/flowgraph/nodes/util/loadProject.lua
local file, valid = self.mgr:getRelativeAbsolutePath({self.pinIn.filepath.value,self.pinIn.filepath.value..".flow.json", "flowgraphEditor/" .. self.pinIn.filepath.value .. ".flow.json"})
local mgr = core_flowgraphManager.loadManager(file)
if self.pinIn.startNextFrame.value then
@/lua/ge/extensions/career/modules/linearTutorial.lua
log("I","","Loading Vehicle buying Intro...")
core_flowgraphManager.loadManager("gameplay/tutorials/buyVehicle.flow.json"):setRunning(true)
saveData.buyVehicleFlowgraphStarted = true
if step == 1 then
core_flowgraphManager.loadManager("gameplay/tutorials/01-movementBasics.flow.json"):setRunning(true)
end
-- local fgPath = tutorialsFolder .. tutorialData[step].fgPath
-- local mgr = core_flowgraphManager.loadManager(fgPath)
-- mgr.transient = true
@/lua/ge/extensions/scenario/quickRace.lua
if sc and sc.track and sc.track.flowgraph then
fg = core_flowgraphManager.loadManager(sc.track.flowgraph.file)
for name, value in pairs(sc.track.flowgraph.variables or {}) do
@/lua/ge/extensions/gameplay/missions/missionTypes/flowMission.lua
-- load the flowgraph and set its variables
self.mgr = core_flowgraphManager.loadManager(path)
self.mgr.transient = true -- prevent flowgraph from re-strating flowgraphs after ctrl+L
@/lua/ge/extensions/editor/trafficManager.lua
elseif sessionData.aiType == "user" then
sessionData._tempData.flowgraph = core_flowgraphManager.loadManager(aiData.flowgraphFile)
if sessionData._tempData.flowgraph then
@/lua/ge/extensions/editor/util/editorElementHelper.lua
else
mgr = core_flowgraphManager.loadManager("gameplay/missionTypes/flowgraph/"..template)
end
@/lua/ge/extensions/flowgraph/nodes/macro/foreach.lua
for key, value in ipairs(list) do
local mgr = core_flowgraphManager.loadManager(self.pinIn.filepath.value)
mgr.modules.foreach.key = key
@/lua/ge/extensions/scenario/scenariosLoader.lua
local mgr = core_flowgraphManager.loadManager(path)
for name, value in pairs(sc.variables or {}) do
@/lua/ge/extensions/flowgraph/modules/threadModule.lua
function C:startProjectFromFilepath(file, sourceNode)
local mgr = core_flowgraphManager.loadManager(file)
mgr:setRunning(true)
@/lua/ge/extensions/gameplay/missions/missionTypes/editorHelper.lua
else
mgr = core_flowgraphManager.loadManager("gameplay/missionTypes/flowgraph/"..template)
end