fix: lastbil med eget lad vælges ikke som tømmevogn under høst (v1.62.19)
This commit is contained in:
@@ -353,6 +353,13 @@ function ADFieldWork.distanceToNetworkUncached(adEnv, x, z)
|
||||
return ok and best ~= math.huge and best or nil
|
||||
end
|
||||
|
||||
-- Tømmevogn under høst: traktor med vogn eller puljevogn — ikke en lastbil med eget lad (Courseplays mejetærsker
|
||||
-- registrerer den ikke som tømmevogn; in-game 4/10: Lizard-tiplastbilen holdt ved F5 uden at blive tømt i)
|
||||
function ADFieldWork.unloaderAccepts(vehicle)
|
||||
if vehicle == nil then return false end
|
||||
return not (vehicle.spec_motorized ~= nil and vehicle.spec_trailer ~= nil)
|
||||
end
|
||||
|
||||
local function acceptFor(field, info, role)
|
||||
if role == "harvester" then
|
||||
local fruit = info.fruitIndex
|
||||
@@ -363,6 +370,8 @@ local function acceptFor(field, info, role)
|
||||
return function(candidate)
|
||||
return (candidate.hasSeeds or candidate.seedsOnPallets) and fruitIndex ~= nil and candidate.seedFruits[fruitIndex] == true
|
||||
end
|
||||
elseif role == "unloader" then
|
||||
return function(candidate) return ADFieldWork.unloaderAccepts(candidate.vehicle) end
|
||||
elseif role == "weeder" then
|
||||
local large = (info.weed or 0) > ADFieldModel.WEED_MECHANICAL_MAX
|
||||
return function(candidate) return not (large and candidate.mechanical) end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.62.18.0</version>
|
||||
<version>1.62.19.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
Reference in New Issue
Block a user