feat: puljen må låne stoppet flows gyllevogn/spreder fra parkering (Stop alle satte Supercis'erne på plads; F27 fik MEGA) — 1.62.318
This commit is contained in:
@@ -338,13 +338,16 @@ end
|
||||
-- Må maskinpuljen/markarbejdet låne vognen? Et SOVENDE flows vogn står på sin parkering uden at lave noget: den må
|
||||
-- lånes (17/10: gyllevognene fra 'Slurry' skal gøde, mens reserven holder salget). Et kørende eller stoppet flows
|
||||
-- vogn er stadig flowets (29/9). Vågner flowet, mens vognen er lånt ud, venter det (startDecision: wagonAttached).
|
||||
function ADFlowWagons.isLendable(runs, wagonId)
|
||||
-- isSprayer: vognen er selv et arbejdsredskab (gyllevogn/spreder) — så må den også lånes fra et STOPPET flow
|
||||
-- (17/10 12:04: "Stop alle" satte Supercis'erne på parkering; puljen sprang dem over, og F27 fik MEGA'en igen).
|
||||
function ADFlowWagons.isLendable(runs, wagonId, isSprayer)
|
||||
local owner = ADFlowWagons.ownerOf(runs, wagonId)
|
||||
return owner == nil or owner.sleeping == true
|
||||
if owner == nil or owner.sleeping == true then return true end
|
||||
return isSprayer == true and owner.stopped == true
|
||||
end
|
||||
|
||||
function ADFlowWagons.isLendableWagon(wagonId)
|
||||
return ADFlowWagons.isLendable(runs(), wagonId)
|
||||
function ADFlowWagons.isLendableWagon(wagonId, isSprayer)
|
||||
return ADFlowWagons.isLendable(runs(), wagonId, isSprayer)
|
||||
end
|
||||
|
||||
-- Frakoblede vogne med parkering, som intet kørende flow holder, og som flowet ikke allerede har givet en traktor.
|
||||
|
||||
@@ -584,7 +584,8 @@ function ADPool.collect(adEnv, isBusy)
|
||||
local specs = connect ~= nil and ADCpBridge.getSpecs(vehicle) or nil
|
||||
local role = specs ~= nil and ADPool.roleOf(specs) or nil
|
||||
-- flowvogne: kun et sovende flows vogn må lånes (ADFlowWagons.isLendable)
|
||||
local held = role ~= nil and ADFlowWagons ~= nil and ADFlowWagons.isLendableWagon ~= nil and not ADFlowWagons.isLendableWagon(ADRunsController.getVehicleId(vehicle))
|
||||
local held = role ~= nil and ADFlowWagons ~= nil and ADFlowWagons.isLendableWagon ~= nil
|
||||
and not ADFlowWagons.isLendableWagon(ADRunsController.getVehicleId(vehicle), vehicle.spec_sprayer ~= nil)
|
||||
if role ~= nil and not held and not targeted[connect.id] then
|
||||
local x, z = positionOf(vehicle)
|
||||
local carries, capacity = ADPool.cargoOf(vehicle)
|
||||
@@ -641,7 +642,7 @@ function ADPool.overview(adEnv)
|
||||
attachedTo = attacher ~= nil and ADRuns.vehicleLabel(attacher) or nil,
|
||||
quarantineMin = id ~= nil and ADPool.quarantineMinutes(id, nowMs) or 0,
|
||||
reserved = id ~= nil and ADPool.isReserved(id),
|
||||
flowName = id ~= nil and ADFlowWagons ~= nil and ADFlowWagons.isLendableWagon ~= nil and not ADFlowWagons.isLendableWagon(id)
|
||||
flowName = id ~= nil and ADFlowWagons ~= nil and ADFlowWagons.isLendableWagon ~= nil and not ADFlowWagons.isLendableWagon(id, vehicle.spec_sprayer ~= nil)
|
||||
and tostring(ADFlowWagons.ownerOf(ADRunsController.store.runs, id).name) or nil,
|
||||
})
|
||||
table.insert(implements, {id = id, label = ADRuns.vehicleLabel(vehicle), role = role, status = key, arg = arg})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.62.317.0</version>
|
||||
<version>1.62.318.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
Reference in New Issue
Block a user