fix: kæden skifter aldrig til eng (kan ikke sås); eng tæller som udbud; ugyldige kædemål ryddes (v1.62.31)
This commit is contained in:
@@ -319,6 +319,12 @@ local function plan(data, state)
|
||||
local shortages, actions = {}, {}
|
||||
if not data.fieldsIncomplete then
|
||||
shortages = ADCropPlan.shortages(chain.fieldDemand, data.stock, data.fields, data.yields, chain.fieldProducts)
|
||||
-- aldrig mangel (og dermed skift) mod en afgrøde der ikke må være mål (eng kan ikke sås)
|
||||
local kept = {}
|
||||
for _, shortage in ipairs(shortages) do
|
||||
if not (data.unswitchable or {})[shortage.fruit] then table.insert(kept, shortage) end
|
||||
end
|
||||
shortages = kept
|
||||
state.dismissed = ADChain.pruneDismissed(state.dismissed, shortages)
|
||||
actions = ADCropPlan.choose(shortages, data.fields, used, data.yields, data.priceOf or data.prices, ADChain.dismissedFruits(state.dismissed), data.harvesting)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user