getRoadRules
Definition
-- @/lua/ge/map.lua:153
local function getRoadRules()
return rules or {}
end
Callers
@/lua/ge/extensions/gameplay/police.lua
if pursuit.mode ~= 0 then
--local legalSide = map.getRoadRules().rightHandDrive and -1 or 1
local arrestRadius = pursuit.policeVisible and vars.arrestRadius or 5 -- very small radius if police visibility is blocked, prevents false arresting
@/lua/ge/extensions/gameplay/traffic/vehicle.lua
local mapNodes = map.getMap().nodes
local mapRules = map.getRoadRules()
@/lua/ge/extensions/editor/trafficManager.lua
-- with respect to traffic rule for driving side
if map.getRoadRules().rightHandDrive then
lanes = '+-'
@/lua/ge/extensions/gameplay/traffic/baseRole.lua
if self.veh.isAi then
local legalSide = map.getRoadRules().rightHandDrive and -1 or 1
local changeLaneDist = args.dist or self.veh:getBrakingDistance(nil, 0.5) -- uses expected braking distance
@/lua/ge/extensions/gameplay/traffic/trafficUtils.lua
local legalSide = map.getRoadRules().rightHandDrive and -1 or 1
local roadWidth = radius * 2
@/lua/ge/extensions/gameplay/taxi.lua
veh:queueLuaCommand('electrics.stop_turn_signal()')
local isRightHand = map.getRoadRules().rightHandDrive
local useRight = (isRightHand and rightForRightHand) or (not isRightHand and not rightForRightHand)
@/lua/ge/extensions/core/multiSpawn.lua
local n1, n2 = map.findClosestRoad(pos)
local legalSide = map.getRoadRules().rightHandDrive and -1 or 1
@/lua/ge/spawn.lua
local mapData = map.getMap()
local legalSide = map.getRoadRules().rightHandDrive and -1 or 1
local veh = getPlayerVehicle(0)