-- @/lua/ge/map.lua:2575
local function getPath(start, target, cutOffDrivability, dirMult, penaltyAboveCutoff, penaltyBelowCutoff)
-- arguments:
-- start: starting node
-- target: target node
-- cutOffDrivability: penalize roads with drivability <= cutOffDrivability
-- dirMult: amount of penalty to impose to path if it does not respect road
-- legal directions (should be larger than 1). If equal to nil or 1 then it means no penalty.
-- penaltyAboveCutoff: penalty multiplier for roads above the drivability cutoff
-- penaltyBelowCutoff: penalty multiplier for roads below the drivability cutoff
if gp == nil then return {} end
return gp:getFilteredPath(start, target, cutOffDrivability, dirMult, penaltyAboveCutoff, penaltyBelowCutoff)
end
local imgPath = mat:getField("diffuseMap", 0)
local absPath = imgPath ~= emptyStr and (string.find(imgPath, "/") and imgPath or (mat:getPath() .. imgPath)) or emptyStr
local texture = getTexObj(absPath)
@/lua/ge/extensions/core/cameraModes/path.lua
else
path = core_paths.getPath(self.pathName)
end
@/lua/ge/extensions/editor/decalSpline.lua
if absPath ~= "" then
absPath = (string.find(absPath, "/") ~= nil and absPath or (mat:getPath() .. absPath))
end
if absPath ~= "" then
absPath = (string.find(absPath, "/") ~= nil and absPath or (mat:getPath() .. absPath))
end
if absPath ~= "" then
absPath = (string.find(absPath, "/") ~= nil and absPath or (mat:getPath() .. absPath))
end
if absPath ~= "" then
absPath = (string.find(absPath, "/") ~= nil and absPath or (mat:getPath() .. absPath))
end
@/lua/vehicle/ai.lua
local wp2 = wpList[i+1]
local route = mapData:getPath(wp1, wp2, opt.driveInLaneFlag and 1e4 or 1)
local routeLen = #route
@/lua/ge/extensions/editor/toolUtilities/geom.lua
for i = 1, #nodes - 1 do
local section = map.getPath(nodes[i], nodes[i + 1])
for j = startIdx, #section do
if legalRoute == nil then legalRoute = true end
local route = map.getPath(tempNodes.posA, tempNodes.posB, nil, legalRoute and 1000 or 1)
self.pinOut.navgraphRoute.value = route
@/lua/ge/extensions/gameplay/route/raceRoute.lua
for i = 1, #wpList-1 do
local path = map.getPath(wpList[i], wpList[i + 1], self.cutOffDrivability, self.dirMult, self.penaltyAboveCutoff, self.penaltyBelowCutoff)
local pathLen = #self.path
local ps = ap.ps
local id = string.format("delivery-parking-%s-%s", fac.id, ps:getPath())
local loc = {type = "facilityParkingspot", facId = fac.id, psPath = ps:getPath()}
local id = string.format("delivery-parking-%s-%s", fac.id, ps:getPath())
local loc = {type = "facilityParkingspot", facId = fac.id, psPath = ps:getPath()}
local cargoCount = #dParcelManager.getAllCargoForLocationUnexpiredUndelivered(loc)
local icon = "poi_pickup_round"
if interactiveParkingSpots[ps:getPath()] then
icon = "poi_dropoff_round"
local focus = interactiveParkingSpots[ps:getPath()] ~= nil
local elem = {
id = id,
data = {type = "logisticsParking", facId = fac.id, psPath = ps:getPath(), canInspectCargo = ap.isInspectSpot, hasPlayerCargo = interactiveParkingSpots[ps:getPath()] and true or false },
markerInfo = {
id = id,
data = {type = "logisticsParking", facId = fac.id, psPath = ps:getPath(), canInspectCargo = ap.isInspectSpot, hasPlayerCargo = interactiveParkingSpots[ps:getPath()] and true or false },
markerInfo = {
-- only include parking marker if there is an action
parkingMarker = cargoCount and {path = ps:getPath(), pos = ps.pos, rot = ps.rot, scl = ps.scl, icon = icon, focus = focus} or nil,
}
else
if interactiveParkingSpots[ps:getPath()] then
local tasks = {}
if next(interactiveParkingSpots[ps:getPath()].dropOffs) then
table.insert(tasks, string.format("Deliver %d cargo items here.", #interactiveParkingSpots[ps:getPath()].dropOffs))
if next(interactiveParkingSpots[ps:getPath()].dropOffs) then
table.insert(tasks, string.format("Deliver %d cargo items here.", #interactiveParkingSpots[ps:getPath()].dropOffs))
end
end
if next(interactiveParkingSpots[ps:getPath()].pickUps) then
table.insert(tasks, string.format("Pick up %d cargo items here.", #interactiveParkingSpots[ps:getPath()].pickUps))
if next(interactiveParkingSpots[ps:getPath()].pickUps) then
table.insert(tasks, string.format("Pick up %d cargo items here.", #interactiveParkingSpots[ps:getPath()].pickUps))
end
end
if next(interactiveParkingSpots[ps:getPath()].vehicles) then
table.insert(tasks, string.format("Deliver %d vehicles here.", #interactiveParkingSpots[ps:getPath()].vehicles))
if next(interactiveParkingSpots[ps:getPath()].vehicles) then
table.insert(tasks, string.format("Deliver %d vehicles here.", #interactiveParkingSpots[ps:getPath()].vehicles))
end
end
if interactiveParkingSpots[ps:getPath()] or ap.isInspectSpot or dCargoScreen.isCargoScreenOpen() then
--dump(string.format("%s -> %s", fac.name, name))
local id = string.format("delivery-parking-%s-%s", fac.id, ps:getPath())
local loc = {type = "facilityParkingspot", facId = fac.id, psPath = ps:getPath()}
local id = string.format("delivery-parking-%s-%s", fac.id, ps:getPath())
local loc = {type = "facilityParkingspot", facId = fac.id, psPath = ps:getPath()}
local icon = "poi_pickup_round"
if interactiveParkingSpots[ps:getPath()] then
icon = "poi_dropoff_round"
id = id,
data = {type = "logisticsParking", facId = fac.id, psPath = ps:getPath(), hasPlayerCargo = interactiveParkingSpots[ps:getPath()] and true or false },
markerInfo = {
id = id,
data = {type = "logisticsParking", facId = fac.id, psPath = ps:getPath(), hasPlayerCargo = interactiveParkingSpots[ps:getPath()] and true or false },
markerInfo = {
@/lua/ge/extensions/gameplay/race/segment.lua
table.clear(self.capsulePoints)
local path = map.getPath(self:getFrom().navgraphName, self:getTo().navgraphName)
if path and #path > 2 then
@/lua/ge/extensions/scenario/raceDebug.lua
--print("path from '" .. lastwp .. "' to '".. wp .. "':")
local path = map.getPath(lastwp, wp)
local lastWpp = nil
local distanceKey = string.format("%d-%s-%s", con.vehId, fac.facId, fac.dropOffSpots[1]:getPath())
if vehToLocationDistanceCache[distanceKey] == nil then
vehToLocationDistanceCache[distanceKey] = false
local a, b = dGenerator.getLocationCoordinates({type="vehicle", vehId=con.vehId}), dGenerator.getLocationCoordinates({type="facilityParkingspot", facId=fac.facId, psPath=fac.dropOffSpots[1]:getPath()})
if a and b then
local fac = dGenerator.getFacilityById(locationId)
local toPos = dGenerator.getLocationCoordinates({type="facilityParkingspot", facId = fac.id, psPath=(asProvider and fac.pickUpSpots[1] or fac.dropOffSpots[1]):getPath()})
if fromPos and toPos then
if not name_a or not name_b then return 1 end
local path = map.getPath(name_a, name_b)
local d = 0
if ap.logisticTypesReceivedLookup[template.logisticType] then
table.insert(destination.destinations, {type = "facilityParkingspot", facId = f.id, psPath = s:getPath()})
end
fac.closestMaterialProviders = {}
local facLocation = {type = "facilityParkingspot", facId = fac.id, psPath = fac.dropOffSpots[1]:getPath()}
for materialType, storage in pairs(fac.materialStorages) do
if otherFac.logisticTypesProvidedLookup[materialType] then
local otherLocation = {type = "facilityParkingspot", facId = otherFac.id, psPath = otherFac.pick UpSpots[1]:getPath()}
local otherApName = otherFac.materialStorages[materialType] and otherFac.materialStorages[materialType].pickUpSpotName
if otherApName then
otherLocation.psPath = otherFac.accessPointsByName[otherApName].ps:getPath()
end
if fac.pickUpSpots[1] then
local facLocation = {type = "facilityParkingspot", facId = fac.id, psPath = fac.pickUpS pots[1]:getPath()}
for materialType, storage in pairs(fac.materialStorages) do
if ap.logisticTypesReceivedLookup[materialType] then
table.insert(destination.destinations, {type = "facilityParkingspot", facId = f.id, psPath = ap.ps:getPath()})
end
if absPath ~= "" then -- Check if path is absolute or relative.
absPath = (string.find(absPath, "/") ~= nil and absPath or (mat:getPath() .. absPath))
end
@/inspector/Models/RecordingState.js
if (WI.ImageUtilities.supportsCanvasPathDebugging())
data.setPath = [context.getPath()];
@/lua/ge/extensions/gameplay/rally/geometry.lua
local endNode1, _ = map.findClosestRoad(targetPos)
local path = map.getGraphpath():getPath(startNode1, endNode1)
@/lua/ge/extensions/util/export.lua
for i = 1, 100 do
fn = playerVehicle:getPath() .. 'export_' .. string.format('%03d', i)
if M.gltfBinaryFormat then
@/lua/ge/main.lua
local nid = newVehicle and newVehicle:getId() or -1
-- local oldinfo = oldVehicle and ("id "..dumps(oid).." ("..oldVehicle:getPath()..")") or dumps(oldVehicle)
-- local newinfo = newVehicle and ("id "..dumps(nid).." ("..newVehicle:getPath()..")") or dumps(newVehicle)
-- local oldinfo = oldVehicle and ("id "..dumps(oid).." ("..oldVehicle:getPath()..")") or dumps(oldVehicle)
-- local newinfo = newVehicle and ("id "..dumps(nid).." ("..newVehicle:getPath()..")") or dumps(newVehicle)
--log('I', 'main', "Player #"..dumps(player).." vehicle switched from: "..oldinfo.." to: "..newinfo)
function C:getPath()
return self.sites.dir .. self.sites.filename .. '#'..self.name
@/lua/ge/extensions/editor/materialEditor.lua
if not string.find(p, "/", 1, true) then
return p, (mat:getPath() .. p)
else
if absPath ~= "" and not isTaggedTexture and not isLevelRelativeTexture then
absPath = (string.find(absPath, "/") ~= nil and absPath or (currentMaterial:getPath() .. absPath))
if absPath ~= imgPath then
function Graphpath:getPath(start, goal, dirMult)
local graph = self.graph
local path = self:getPath(wpAhead, twpAhead, dirMult)
@/lua/ge/extensions/editor/inspector.lua
if texturePath ~= ""then
texturePath = (string.find(texturePath, "/") ~= nil and texturePath or (groundCoverMaterial:getPath() .. texturePath))
texture = editor.getTempTextureObj(texturePath)
@/lua/ge/extensions/gameplay/route/route.lua
for i = 1, #wpList-1 do
local path = map.getPath(wpList[i], wpList[i + 1], self.cutOffDrivability, self.dirMult, self.penaltyAboveCutoff, self.penaltyBelowCutoff)
local pathLen = #self.path
@/lua/ge/extensions/gameplay/race/race.lua
local path = map.getPath(self.aiDetailedPath[inNextAiPathIdx].wp, self.aiDetailedPath[outPrevAiPathIdx].wp)
local distanceAlongPath = 0
@/lua/vehicle/controller/tech/roadsSensor.lua
local pFKey, pRKey, pH = getPointAhead(frontAxleMidpointProjGround, fwd, lookAheadDistance)
local path = mapmgr.mapData:getPath(pRKey, pFKey, nil)
coeffsCL = { uA = 0, uB = 0, uC = 0, uD = 0, vA = 0, vB = 0, vC = 0, vD = 0 }