diff --git a/FS25_ADSmartPickup/adFieldSilos.lua b/FS25_ADSmartPickup/adFieldSilos.lua
index fbe5bd0..48c318f 100644
--- a/FS25_ADSmartPickup/adFieldSilos.lua
+++ b/FS25_ADSmartPickup/adFieldSilos.lua
@@ -138,7 +138,8 @@ function ADFieldSilos.collectBuildings(adEnv)
local x, z = position(building.placeable ~= nil and building.placeable.rootNode or nil)
if not seen[building.id] and not ADFieldSiloConfig.hasStore(ADFieldSilos.config, building.id) and not nearStore(stores, x, z) then
seen[building.id] = true
- table.insert(silos, {id = building.id, name = building.name, markerId = firstMarker(building, "load"),
+ -- marknummeret først: navnet skæres af i fanen, og mange siloer hedder ens ("Farma 500 …")
+ table.insert(silos, {id = building.id, name = string.format("F%s %s", tostring(info.id), tostring(building.name)), markerId = firstMarker(building, "load"),
x = x, z = z, stock = siloStock(building.placeable)})
end
end
@@ -168,15 +169,25 @@ end
function ADFieldSilos.collectVehicles(adEnv)
local vehicles, byId = {}, {}
+ -- hvorfor tømmevogne ikke kan lånes (til fanens statuslinje)
+ local why = {notEnabled = 0, busy = 0, controlled = 0, noPark = 0}
for _, rig in ipairs(ADFieldWork.getRigs(adEnv)) do
-- uden AD-parkeringspunkt bliver vognen holdende på lagerets markør og spærrer for de næste
local canPark = ADFieldWork.parkMarkerId == nil or ADFieldWork.parkMarkerId(adEnv, rig.vehicle) ~= nil
+ if rig.role == "unloader" then
+ if not rig.enabled then why.notEnabled = why.notEnabled + 1
+ elseif rig.controlled then why.controlled = why.controlled + 1
+ elseif rig.busy then why.busy = why.busy + 1
+ elseif not canPark then why.noPark = why.noPark + 1 end
+ end
if rig.role == "unloader" and rig.enabled and not rig.busy and not rig.controlled and canPark then
local capacity, carries, cargo = trailerInfo(adEnv, rig.vehicle)
table.insert(vehicles, {id = rig.id, x = rig.x, z = rig.z, capacity = capacity, carries = carries, cargo = cargo})
byId[rig.id] = rig.vehicle
end
end
+ why.eligible = #vehicles
+ ADFieldSilos.lastVehicleReasons = why
return vehicles, byId
end
diff --git a/FS25_ADSmartPickup/gui/SmartPickupFieldSiloTab.lua b/FS25_ADSmartPickup/gui/SmartPickupFieldSiloTab.lua
index 5b3a336..3e4bd6a 100644
--- a/FS25_ADSmartPickup/gui/SmartPickupFieldSiloTab.lua
+++ b/FS25_ADSmartPickup/gui/SmartPickupFieldSiloTab.lua
@@ -45,6 +45,10 @@ function SmartPickupFrame:fillFieldSiloRows(adEnv)
for _, entry in ipairs(plan ~= nil and plan.status or {}) do if entry.state == "ok" then waiting = waiting + 1 end end
self:addTextRow(string.format(i18n:getText("spu_fs_status"), ADFieldSilos.loanCount(), cfg.maxVehicles, waiting))
if #cfg.storeIds == 0 then self:addTextRow(i18n:getText("spu_fs_noStores")) end
+ local why = ADFieldSilos.lastVehicleReasons
+ if waiting > 0 and ADFieldSilos.loanCount() < cfg.maxVehicles and why ~= nil and why.eligible == 0 then
+ self:addTextRow(string.format(i18n:getText("spu_fs_noVehicle"), why.noPark, why.busy, why.controlled, why.notEnabled))
+ end
self:addTextRow(i18n:getText("spu_fs_silosTitle"))
if plan == nil or #plan.status == 0 then
diff --git a/FS25_ADSmartPickup/l10n/l10n_da.xml b/FS25_ADSmartPickup/l10n/l10n_da.xml
index 16aee1c..a0c3dee 100644
--- a/FS25_ADSmartPickup/l10n/l10n_da.xml
+++ b/FS25_ADSmartPickup/l10n/l10n_da.xml
@@ -476,6 +476,7 @@
+
diff --git a/FS25_ADSmartPickup/l10n/l10n_en.xml b/FS25_ADSmartPickup/l10n/l10n_en.xml
index 7e2a64f..bef7fcb 100644
--- a/FS25_ADSmartPickup/l10n/l10n_en.xml
+++ b/FS25_ADSmartPickup/l10n/l10n_en.xml
@@ -476,6 +476,7 @@
+
diff --git a/FS25_ADSmartPickup/modDesc.xml b/FS25_ADSmartPickup/modDesc.xml
index 43bf47e..09b3879 100644
--- a/FS25_ADSmartPickup/modDesc.xml
+++ b/FS25_ADSmartPickup/modDesc.xml
@@ -1,7 +1,7 @@
masterdraco
- 1.38.6.0
+ 1.38.7.0
AD Smart Pickup