feat: indstillinger i sektioner; stald med indbygget silo er aldrig marksilo eller tømmested

This commit is contained in:
2026-10-20 01:11:28 +02:00
parent 1b82b50e0e
commit 8c89e159d5
10 changed files with 149 additions and 44 deletions
+3
View File
@@ -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