feat(kobling): spillerens AD 'Kør til' til et puljeredskabs egen parkering kobler det af (flow-vogne og puljeredskaber; faste sæt røres ikke) (v1.56.3.0)
This commit is contained in:
@@ -71,6 +71,13 @@ function ADHitch.stepAction(name)
|
||||
return ADHitch.parseMarker(name) or "arrive"
|
||||
end
|
||||
|
||||
-- Spillerens egen AD "Kør til": markørens navn (Connect/Afkobl) først, ellers er puljeredskabets egen parkering
|
||||
-- stedet vognen sættes af. -> "attach" | "detach" | nil
|
||||
function ADHitch.manualAction(parsedAction, isPoolImplementPark)
|
||||
if parsedAction ~= nil then return parsedAction end
|
||||
return isPoolImplementPark and "detach" or nil
|
||||
end
|
||||
|
||||
-- I en tur: en almindelig markør, der er AD-parkeringen for redskabet bag traktoren, er stedet vognen sættes af.
|
||||
function ADHitch.resolveAction(action, isImplementPark)
|
||||
if action == "arrive" and isImplementPark then return "detach" end
|
||||
@@ -464,7 +471,14 @@ local function watchManualTrips(adEnv)
|
||||
if jobs[vehicle] == nil and vehicle.spec_attacherJoints ~= nil and module ~= nil and module:isActive()
|
||||
and module:getMode() == adEnv.AutoDrive.MODE_DRIVETO then
|
||||
local marker = module:getFirstMarker()
|
||||
local action = marker ~= nil and ADHitch.parseMarker(marker.name) or nil
|
||||
local action = nil
|
||||
if marker ~= nil then
|
||||
local isPoolPark = false
|
||||
for _, parkId in ipairs(ADHitch.poolParkIds(adEnv, vehicle)) do
|
||||
if parkId == marker.id then isPoolPark = true end
|
||||
end
|
||||
action = ADHitch.manualAction(ADHitch.parseMarker(marker.name), isPoolPark)
|
||||
end
|
||||
if action ~= nil then jobs[vehicle] = ADHitch.newJob(marker.id, marker.name, action) end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.56.2.0</version>
|
||||
<version>1.56.3.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
Reference in New Issue
Block a user