GE Lua Documentation

Press F to search!

onCareerActive

Definition


-- @/lua/ge/extensions/gameplay/statistic.lua:637


local function onCareerActive(active)
  if active then
    -- load current saveslot stats
    local saveSlot, savePath = career_saveSystem.getCurrentSaveSlot()
    if not saveSlot then return end
    fileDataCareer = jsonReadFile(savePath.. "/career/gameplay_stat.json")
    -- if no stats are found, create empty data.
    if not fileDataCareer or not fileDataCareer.entries or type(fileDataCareer.entries)~="table" or not fileDataCareer.version then
      fileDataCareer = {version=1, entries={}}
    end
  else
    if fileDataCareer then
      _save()
    end
    -- if career is deactivated, remove local career data.
    fileDataCareer = nil
  end
end

Callers

@/lua/ge/extensions/career/modules/logbook.lua

local function onCareerActive(active)
  local clear = false
@/lua/ge/extensions/career/modules/spawnPoints.lua

local function onCareerActive(active)
  loadDataFromFile()
@/lua/ge/extensions/career/modules/linearTutorial.lua

local function onCareerActive(active)
  if active then
@/lua/ge/extensions/gameplay/forceField.lua

local function onCareerActive(enabled)
  if enabled then
@/lua/ge/extensions/gameplay/drift/saveLoad.lua

local function onCareerActive()
  spotsById = nil
@/lua/ge/extensions/gameplay/backgroundActivities/g2g.lua

local function onCareerActive(enabled)
  if enabled then
@/lua/ge/extensions/career/modules/playbookWriter.lua

local function onCareerActive(active)
  loadDataFromFile()
@/lua/ge/extensions/gameplay/crawl/saveSystem.lua

local function onCareerActive()
  playerTrailsById = nil
@/lua/ge/extensions/gameplay/drag/general.lua

local function onCareerActive()
  gameplay_drag_saveSystem.onCareerActive()
local function onCareerActive()
  gameplay_drag_saveSystem.onCareerActive()
end

local function onCareerActive()
  local dialData = nil