feat: kæden bemander selv tomme flows; raps/byg er løsvarer; palle-varer får Autoload-vogn; besked når vogn mangler; løsvarer og paller i hvert sit flow (1.62.336)

In-game 18/10 18:25: Canola → Oil Mill, Barley → Grain Mill og Canola Oil + Flour → Fish Food stod 'needs a tractor/trailer' for evigt.
This commit is contained in:
2026-10-18 18:39:04 +02:00
parent aad2f5ac5b
commit 3924516cbe
13 changed files with 273 additions and 43 deletions
+7 -1
View File
@@ -162,6 +162,12 @@ function ADPool.mayUsePool(decision, hasOwnForRole)
return (decision.count or 1) == 1 and not hasOwnForRole
end
-- Har vognen Universal Autoload (kan læsse paller selv)? Samme tjek som AutoDrive: tilgængelig og ikke slået fra.
function ADPool.hasAutoload(vehicle)
local spec = vehicle ~= nil and vehicle.spec_universalAutoload or nil
return spec ~= nil and spec.isAutoloadAvailable ~= false and spec.autoloadDisabled ~= true
end
-- Kan puljevognen bære varen? (implement.carries = {[fillType] = true}; nil vare = intet krav)
function ADPool.canCarry(implement, fillType)
if fillType == nil then return true end
@@ -599,7 +605,7 @@ function ADPool.collect(adEnv, isBusy)
if role ~= nil and not held and not targeted[connect.id] then
local x, z = positionOf(vehicle)
local carries, capacity = ADPool.cargoOf(vehicle)
table.insert(implements, {carries = carries, capacity = capacity,
table.insert(implements, {carries = carries, capacity = capacity, autoload = ADPool.hasAutoload(vehicle),
id = ADRunsController.getVehicleId(vehicle), vehicle = vehicle, name = ADRuns.vehicleLabel(vehicle),
role = role, roles = ADPool.rolesOf(role, specs.sprayRoles), filledRole = specs.filledRole, dumpable = specs.dumpable,
sprayNames = specs.sprayNames, -- gylle som gødning: fortrinsreglen ser varerne (v1.62.321)