feat: indstillinger i sektioner; stald med indbygget silo er aldrig marksilo eller tømmested
This commit is contained in:
@@ -814,6 +814,9 @@ end
|
||||
-- staldens eget lager (forsyningen henter dér), ikke en marksilo — også når den står op ad en mark.
|
||||
function ADFields.isStableSilo(building, buildings)
|
||||
if building == nil or building.kind ~= "silo" or building.placeable == nil or building.placeable.rootNode == nil then return false end
|
||||
-- stald med indbygget silo (Midwest Moraines' "Cowbarn with manure Pit"): siloen ER staldens (in-game 20/10: stald
|
||||
-- 120 og 129 stod som "F99/F22 marksilo")
|
||||
if building.placeable.spec_husbandryAnimals ~= nil then return true end
|
||||
local okS, sx, _, sz = pcall(getWorldTranslation, building.placeable.rootNode)
|
||||
if not okS or sx == nil then return false end
|
||||
local range = ADSettings ~= nil and ADSettings.get("stableSiloRange", building.id) or ADFields.STABLE_SILO_M
|
||||
|
||||
Reference in New Issue
Block a user