fix: find DLC-fabrikkers pallespawner uden for productionPoint (young trout ved Young Fish Breeding)
This commit is contained in:
@@ -126,7 +126,7 @@ end
|
||||
-- stald med paller) eller rodnoden.
|
||||
local function getPlaceableAnchor(placeable)
|
||||
local productionPoint = getProductionPoint(placeable)
|
||||
local spawner = productionPoint ~= nil and productionPoint.palletSpawner or nil
|
||||
local spawner = ADUtil.productionPalletSpawner(productionPoint, placeable)
|
||||
if spawner == nil then
|
||||
for _, ownSpawner in pairs(getOwnPalletSpawners(placeable) or {}) do spawner = ownSpawner break end
|
||||
end
|
||||
@@ -408,7 +408,7 @@ local function findRivalSpawners(fillType)
|
||||
for _, placeable in pairs(placeables) do
|
||||
local ownSpawners = getOwnPalletSpawners(placeable)
|
||||
local productionPoint = getProductionPoint(placeable)
|
||||
local spawner = ownSpawners ~= nil and ownSpawners[fillType] or (productionPoint ~= nil and productionPoint.palletSpawner or nil)
|
||||
local spawner = ownSpawners ~= nil and ownSpawners[fillType] or ADUtil.productionPalletSpawner(productionPoint, placeable)
|
||||
local segments = spawnerSegments(spawner, fillType)
|
||||
if #segments > 0 then table.insert(rivals, {placeable = placeable, segments = segments}) end
|
||||
end
|
||||
@@ -428,7 +428,7 @@ ADSources.lastPalletNote = {}
|
||||
-- det er dér varen fysisk er). spawner = staldens spawner for varen; nil = fabrikkens pallespawner.
|
||||
local function getPalletsNearSpawner(placeable, fillType, farmId, spawner)
|
||||
local productionPoint = getProductionPoint(placeable)
|
||||
local segments = spawnerSegments(spawner or (productionPoint ~= nil and productionPoint.palletSpawner or nil), fillType)
|
||||
local segments = spawnerSegments(spawner or ADUtil.productionPalletSpawner(productionPoint, placeable), fillType)
|
||||
if #segments == 0 then
|
||||
local rx, rz = getNodePosition(placeable.rootNode)
|
||||
if rx == nil then return 0, 0 end
|
||||
|
||||
Reference in New Issue
Block a user