fix: find DLC-fabrikkers pallespawner uden for productionPoint (young trout ved Young Fish Breeding)
This commit is contained in:
@@ -129,7 +129,7 @@ local function collectNodes(placeable, loadStations, unloadStations)
|
||||
end
|
||||
end
|
||||
local productionPoint = getProductionPoint(placeable)
|
||||
local spawner = productionPoint ~= nil and productionPoint.palletSpawner or nil
|
||||
local spawner = ADUtil.productionPalletSpawner(productionPoint, placeable)
|
||||
local factoryGroup = ADBuildings.spawnerGroup(spawner)
|
||||
if factoryGroup ~= nil then table.insert(loadGroups, factoryGroup) end
|
||||
-- bistadernes pallespawner: én læssegruppe ved pallepladserne ("Honey Pickup")
|
||||
@@ -970,6 +970,15 @@ function ADBuildings.dumpTriggers(adEnv, farmId)
|
||||
Logging.info("ADSmartPickup: TRIGGER bygning '%s' art=%s pos=%s rotY=%.1f fil=%s", tostring(name), kind, fmt(x, z),
|
||||
math.deg(ry or 0), tostring(placeable.configFileName))
|
||||
local okNodes, loadGroups, unloadNodes = pcall(collectNodes, placeable, loadStations, unloadStations)
|
||||
if okNodes and kind == "factory" and #(loadGroups or {}) == 0 then
|
||||
-- fabrik uden læssested: hvor ligger dens pallespawner? (20/10: Young Fish Breeding — DLC-bygning)
|
||||
local specs = {}
|
||||
for key in pairs(placeable) do
|
||||
if type(key) == "string" and key:sub(1, 5) == "spec_" then table.insert(specs, key) end
|
||||
end
|
||||
table.sort(specs)
|
||||
Logging.info("ADSmartPickup: TRIGGER '%s' ingen læssested/pallespawner fundet; specs: %s", tostring(name), table.concat(specs, " "))
|
||||
end
|
||||
if okNodes then
|
||||
for index, nodes in ipairs(loadGroups or {}) do
|
||||
for _, node in ipairs(nodes) do
|
||||
|
||||
Reference in New Issue
Block a user