feat: paller hentes kun fulde (UAL-filter sættes ved turstart, planlæggeren tæller kun fulde paller); fix: æg-markører følger bygningslistens tildeling, ikke nærmeste hønsehus — 1.62.304
This commit is contained in:
@@ -251,7 +251,12 @@ function ADSources.assignedBuilding(adEnv, wayPointId, farmId)
|
||||
local kind = ASSIGNED_KINDS[building.kind]
|
||||
if kind == nil then return nil end
|
||||
local placeable = building.placeable
|
||||
if kind == "husbandry" and getHusbandryPalletSpawners(placeable) ~= nil then return nil end
|
||||
-- hønsehus m.fl. (pallespawnere): bygningslistens tildeling gælder, men uden station — varerne er pallerne ved
|
||||
-- spawneren (in-game 17/10: 'Coop 1 Egg Pickup' står 7 m fra Hønsehus 2 og 9 m fra Hønsehus 3; listen gav den
|
||||
-- Hønsehus 3, "nærmeste hønsehus" gav Hønsehus 2 -> vognen stod ved det forkerte hus og fandt ingen paller)
|
||||
if kind == "husbandry" and getHusbandryPalletSpawners(placeable) ~= nil then
|
||||
return {kind = kind, placeable = placeable, station = nil, wayPointId = wayPointId}
|
||||
end
|
||||
local production = getProductionPoint(placeable)
|
||||
local station = kind == "factory" and production ~= nil and production.loadingStation or nil
|
||||
station = station or nearestOwnedStation(placeable, wayPoint)
|
||||
@@ -427,7 +432,7 @@ end
|
||||
local function newProduct(fillType, available, level, capacity, isPallet)
|
||||
local name = g_fillTypeManager ~= nil and g_fillTypeManager:getFillTypeNameByIndex(fillType) or tostring(fillType)
|
||||
local title = g_fillTypeManager ~= nil and g_fillTypeManager.getFillTypeTitleByIndex ~= nil and g_fillTypeManager:getFillTypeTitleByIndex(fillType) or nil
|
||||
return {fillType = fillType, name = name, title = title or name, available = available, level = level, capacity = capacity, isPallet = isPallet, canPallet = isPallet or ADSources.isPalletFillType(fillType), palletLiters = 0, palletCount = 0, fullPalletLiters = 0, fullPalletCount = 0}
|
||||
return {fillType = fillType, name = name, title = title or name, available = available, level = level, capacity = capacity, isPallet = isPallet, canPallet = isPallet or ADSources.isPalletFillType(fillType), palletLiters = 0, palletCount = 0, fullPalletLiters = nil, fullPalletCount = nil} -- fulde paller: nil = ikke talt (alle tæller)
|
||||
end
|
||||
|
||||
local function getFactoryProducts(source, farmId)
|
||||
|
||||
Reference in New Issue
Block a user