getState
Definition
-- @/lua/ge/extensions/core/replay.lua:69
local function getState()
return M.state.state
end
Callers
@/lua/vehicle/controller/vehicleController/shiftLogic/electricMotor.lua
local function getState()
local data = {grb_mde = automaticHandling.mode}
@/lua/vehicle/controller/vehicleController/shiftLogic/cvtGearbox2.lua
local function getState()
local data = {grb_mde = automaticHandling.mode}
@/lua/ge/extensions/gameplay/speedTraps.lua
local trafficSignal = core_trafficSignals.getSignalByName(data.trafficSignalId)
trafficSignalColor = trafficSignal:getState()
if trafficSignalColor == "redTrafficLight" then
@/lua/ge/extensions/freeroam/crashCamMode.lua
if timeSinceLastCrashCam > crashCamCooldown
and core_replay.getState() ~= "playback"
and not commands.isFreeCamera()
@/lua/ge/extensions/editor/gen/decal.lua
-- input.event("throttle", 2, "FILTER_AI", nil, nil, nil, "ai")
-- guihooks.trigger("AIStateChange") --, getState())
lo('?? to_input:'..tostring(cpos)..':'..tostring(veh:getVelocity()))
@/lua/vehicle/controller/vehicleController/shiftLogic/automaticGearbox.lua
local function getState()
local data = {grb_mde = automaticHandling.mode}
@/lua/vehicle/controller.lua
local function getState()
local data = {}
if controller.getState then
tableMergeRecursive(data, controller.getState())
end
@/lua/ge/extensions/flowgraph/nodes/vehicle/ai/getAIMode.lua
function C:getCmd()
return 'obj:queueGameEngineLua("local n = core_flowgraphManager.getManagerGraphNode('..self.mgr.id..', '..self.graph.id..', '..self.id..') if n then n:getAIMode(\'"..ai.getState().mode.."\') end")'
end
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/pursuitMode.lua
function C:workOnce()
if gameplay_traffic.getState() == 'on' then
local vehId = self.pinIn.targetId.value or be:getPlayerVehicleID(0)
builder:Middle()
if gameplay_traffic and gameplay_traffic.getState() ~= 'on' then
im.TextUnformatted('Traffic not active!')
@/lua/vehicle/controller/vehicleController/vehicleController.lua
local function getState()
local data = {grb_bhv = gearboxHandling.behavior, frzn = isFrozen}
if controlLogicModule.getState then
tableMergeRecursive(data, controlLogicModule.getState())
end
@/lua/ge/extensions/gameplay/missions/missionManager.lua
if gameplay_traffic.getState() == 'on' then
trafficSetup._prevTraffic, trafficSetup._prevPolice, trafficSetup._prevParking = gameplay_traffic.freezeState() -- stash previous traffic
if trafficSetup.useTraffic and trafficSetup.usePrevTraffic and gameplay_traffic.getState() == 'on' then -- use existing traffic
for _, id in ipairs(gameplay_traffic.getTrafficList()) do
end
if gameplay_traffic.getState() == 'on' then
gameplay_traffic.scatterTraffic()
@/lua/vehicle/controller/vehicleController/shiftLogic/manualGearbox.lua
local function getState()
local data = {grb_idx = gearbox.gearIndex}
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/getTrafficState.lua
function C:work()
self.pinOut.state.value = gameplay_traffic.getState()
for _, s in ipairs(states) do
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/signals/instance.lua
local stateName, stateData = instance:getState()
self.pinOut.stateName.value = stateName
@/lua/ge/extensions/gameplay/parking.lua
local function getState()
return active
@/lua/vehicle/ai.lua
local function getState()
return M
if playerInfo.anyPlayerSeated then
guihooks.trigger("AIStateChange", getState())
end
@/lua/ge/extensions/gameplay/police.lua
local function onVehicleSwitched(oldId, newId)
if gameplay_traffic.getState() ~= 'on' then return end
local function onVehicleResetted(id)
if gameplay_traffic.getState() ~= 'on' or not next(policeVehs) then return end
if not M.enabled or not be:getEnabled() then return end
if gameplay_traffic.getState() ~= 'on' or not next(policeVehs) then
suspectActive = false
@/lua/vehicle/controller/vehicleController/shiftLogic/cvtGearbox.lua
local function getState()
local data = {grb_mde = automaticHandling.mode}
@/lua/ge/extensions/scenario/busdriver.lua
end
if scenario.busdriver.traffic and gameplay_traffic.getState() == "off" then
local amount = core_settings_settings.getValue('trafficAmount')
@/lua/ge/extensions/core/trafficSignals.lua
else
local stateName, stateData = self:getState()
function SignalInstance:getState() -- returns the state name and data of the signal (signal system must be active)
return self:getStateAfterTime()
local stateName, stateData = self:getState()
signalUpdates[self.name] = stateName
if not instance._invalid then
local stateName, stateData = instance:getState()
local n1, n2 = instance.road.n1, instance.road.n2
for _, instance in ipairs(instances) do
if instance:getState() == stateName then
instance:setLights(stateDef.lights)
@/lua/ge/map.lua
local function getState()
for k, v in pairs(M.objectNames) do
@/lua/vehicle/controller/vehicleController/shiftLogic/dctGearbox.lua
local function getState()
local data = {grb_mde = automaticHandling.mode}
@/lua/ge/extensions/editor/camPathEditor.lua
core_replay.loadFile(path.replay)
if (core_replay.getState() == 'playback') and not core_replay.isPaused() then
core_replay.togglePlay()
-- Path has no replay or replay doesn't exist - stop any current replay
if core_replay.getState() == 'playback' or core_replay.getLoadedFile() ~= '' then
core_replay.stop()
if linkReplay[0] and (core_replay.getState() == 'playback') then
core_replay.seek(M.currentPath.markers[1].time / core_replay.getTotalSeconds())
core_replay.seek(M.currentPath.markers[1].time / core_replay.getTotalSeconds())
if (core_replay.getState() == 'playback') and core_replay.isPaused() then
core_replay.togglePlay()
if M.currentPath and path.id == M.currentPath.id then
local linkedReplay = linkReplay[0] and (core_replay.getState() == 'playback')
local firstMarker
end
if linkReplay[0] and (core_replay.getState() == 'playback') then
marker.time = core_replay.getPositionSeconds()
-- Sync replay time if replay is playing
if core_replay.getState() == 'playback' then
local totalTime = core_replay.getTotalSeconds()
if core_replay.getState() == 'playback' then
if im.IsItemHovered() then
core_paths.stopCurrentPath()
if (core_replay.getState() == 'playback') and not core_replay.isPaused() then
core_replay.togglePlay()
@/lua/ge/extensions/gameplay/traffic.lua
local function getState() -- returns traffic system state
return state
if state == 'on' or gameplay_parking.getState() or M.forceFocus then -- always updates focus data while traffic or parking systems are running
if focus.mode == 'vehicle' then
@/ui/modules/apps/AIControl/app.js
// console.log('AISTATECHANGE EVENT:', data)
// Same thing as in ai.getState() callback in ctrl._updateAiState() function
scope.$evalAsync(function () {
vm._updateAiState = function () {
bngApi.activeObjectLua('ai.getState()', (response) => {
// console.log('ai.getState(): ', response)
bngApi.activeObjectLua('ai.getState()', (response) => {
// console.log('ai.getState(): ', response)
$scope.$evalAsync(function () {
vm._updateMapState = function () {
bngApi.engineLua('map.getState()', (response) => {
// console.log('map.getState(): ', response)
bngApi.engineLua('map.getState()', (response) => {
// console.log('map.getState(): ', response)
@/lua/ge/extensions/career/modules/playerDriving.lua
local function setupTraffic(forceSetup)
if forceSetup or (gameplay_traffic.getState() == "off" and not gameplay_traffic.getTrafficList(true)[1] and playerData.trafficActive == 0) then
log("I", "career", "Now spawning traffic for career mode")
@/lua/ge/extensions/core/environment.lua
-------------------------------------------------------------
local function getState()
local res = {}
end
guihooks.trigger("EnvironmentStateUpdate", getState())
guihooks.trigger("EnvironmentCanUpdateChanged", environmentChangesEnabled)
envObjectIdCache = {}
init_env=getState()
--init_env.time = init_env.startTime --TOD:onAdd is already doing that
local function sendState()
guihooks.trigger("EnvironmentStateUpdate", getState())
guihooks.trigger("EnvironmentCanUpdateChanged", environmentChangesEnabled)
@/lua/vehicle/controller/vehicleController/shiftLogic/sequentialGearbox.lua
local function getState()
local data = {grb_idx = gearbox.gearIndex}
@/lua/ge/extensions/gameplay/walk.lua
local function setWalkingMode(enabled, pos, rot, force)
if (enabled == active) or ((not atParkingSpeed or not togglingEnabled or (core_replay.getState() == 'playback')) and not force) then
return false, getPlayerUnicycle() and getPlayerUnicycle():getId()
@/lua/ge/extensions/flowgraph/modules/missionReplayModule.lua
function C:stopIfRec()
if core_replay.getState() == "recording" then
core_replay.toggleMissionRecording()
if core_replay.getState() == "inactive" and self.replayRecording then
self.currentReplayFile = core_replay.toggleMissionRecording()