getWIPWarningLabel
Definition
-- @/lua/ge/extensions/core/gameContext.lua:25
local function getWIPWarningLabel()
if gameplay_missions_missionManager.getForegroundMissionId() then
local m = gameplay_missions_missions.getMissionById(gameplay_missions_missionManager.getForegroundMissionId())
if m then
if m.missionType == 'rallyStage' or m.missionType == 'rallyLoop' or m.missionType == 'rallyLoop2' then
if not settings.getValue('rallyHideExperimentalBanner') then
return "ui.rally.experimentalWarning"
end
end
end
end
if career_career.isActive() then
return "ui.career.experimentalWarning"
end
return nil
end
Callers
@/ui/modules/career/career.js
$scope.$on("$stateChangeSuccess", () => {
bngApi.engineLua("core_gameContext and core_gameContext.getWIPWarningLabel()", data => {
$scope.show = !!data; // Assuming Lua returns an object with a `key` property