fix: Måned-fanen viser 'ikke såtid nu' i stedet for ok (v1.62.113)
This commit is contained in:
@@ -67,7 +67,7 @@ function ADMonthView.nextStage(field, info)
|
||||
return nextField.stage
|
||||
end
|
||||
|
||||
-- Vindue for en aktiv mark: "harvestCloses" | "lastSowMonth" | "ok".
|
||||
-- Vindue for en aktiv mark: "harvestCloses" | "lastSowMonth" | "notSowTime" | "ok".
|
||||
-- ctx = {period, plantableIn(name, period), withers(info, nextPeriod)}
|
||||
function ADMonthView.window(field, info, ctx)
|
||||
local stage = field.stage
|
||||
@@ -76,9 +76,10 @@ function ADMonthView.window(field, info, ctx)
|
||||
return "harvestCloses"
|
||||
end
|
||||
local sowsLater = field.plan ~= nil and field.plan.sow and ADMonthView.BEFORE_SOWING[stage]
|
||||
if sowsLater and ADMonthView.sowWindow(ctx.plantableIn, ADFieldModel.sowFruit(field), ctx.period) == "closes" then
|
||||
return "lastSowMonth"
|
||||
end
|
||||
local sow = sowsLater and ADMonthView.sowWindow(ctx.plantableIn, ADFieldModel.sowFruit(field), ctx.period) or nil
|
||||
if sow == "closes" then return "lastSowMonth" end
|
||||
-- på såtrinnet uden såtid nu: ikke "ok" (8/10: spilleren spurgte om hvede/græs kan sås næste måned)
|
||||
if sow == "closed" and stage == "sowing" then return "notSowTime" end
|
||||
return "ok"
|
||||
end
|
||||
|
||||
@@ -117,7 +118,7 @@ function ADMonthView.build(infos, fieldsById, ctx)
|
||||
if field.stage == "sowing" or (info.kind == "bare" and ADMonthView.BEFORE_SOWING[field.stage]) then
|
||||
row.sowFruit = field.plan.sow and ADFieldModel.sowFruit(field) or nil
|
||||
end
|
||||
if row.window ~= "ok" then critical = critical + 1 end
|
||||
if row.window == "harvestCloses" or row.window == "lastSowMonth" then critical = critical + 1 end
|
||||
table.insert(rows, row)
|
||||
elseif field ~= nil and info.kind == "bare" and (field.stage == "idle" or field.stage == "done") then
|
||||
local target = field.plan.targetFruit
|
||||
|
||||
Reference in New Issue
Block a user