Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modDesc.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<modDesc descVersion="106">
<author>TisonK &amp; LeGrizzly</author>
<version>1.3.0.49</version>
<version>1.3.0.50</version>
<title>
<en>Market Dynamics</en>
</title>
Expand Down
1 change: 1 addition & 0 deletions src/gui/RfEscModules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ function RfEscModules:registerModule(def)
-- discarded and the Esc Crop Stress buttons would do nothing.
onOpenConsultant = def.onOpenConsultant,
onOpenSchedule = def.onOpenSchedule,
onOpenHelp = def.onOpenHelp,
onPaintConsultant = def.onPaintConsultant,
-- Same trap again, BUILD 15:46: the CS guest registers onPivotRemote on
-- its module def (CsRfPdaGuest.lua) but it was missing here, so it was
Expand Down
39 changes: 33 additions & 6 deletions src/gui/RfPdaMenuPage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,8 @@ function RfPdaMenuPage:initialize()
end
end
}
-- SPACE (MENU_EXTRA_1): Crop Stress consultant is secondary only — never default home.
-- EXTRA_1 free on CS (Help is Soil-only). SmoothList would swallow MENU_ACTIVATE.
-- Dead candidate: Crop Stress consultant footer chip. Kept constructed so stale
-- bindings resolve; never assigned to menuButtonInfo (table-hide path VETO).
self.btnCsConsultant = {
inputAction = InputAction.MENU_EXTRA_1,
showWhenPaused = true,
Expand All @@ -666,6 +666,16 @@ function RfPdaMenuPage:initialize()
self:onClickCsConsultant()
end
}
-- CS footer Help (MENU_EXTRA_1). Soft-detects guest onOpenHelp → CsHelpDialog.
-- Do not reuse Soil btnHelp (wrong dialog content).
self.btnHelpCs = {
inputAction = InputAction.MENU_EXTRA_1,
showWhenPaused = true,
text = tr("cs_pda_btn_help", "Help"),
callback = function()
self:onClickHelpCs()
end
}

-- Back only. Help is Soil-only and _syncHostGuestChrome adds it when the Soil
-- module is the active one; seeding it here leaked Help onto every module's
Expand Down Expand Up @@ -1684,10 +1694,12 @@ function RfPdaMenuPage:_syncHostGuestChrome(activeId)
elseif isWc and self.btnOpenWorkerManager ~= nil then
self.menuButtonInfo = { self.btnBack, self.btnOpenWorkerManager }
elseif isCs then
-- BUILD 18:48: SPACE no longer swaps panes. The consultant button owned the
-- table-hiding path, so it comes off the CS footer entirely rather than being
-- left pointing at a no-op the player can still press.
self.menuButtonInfo = { self.btnBack }
-- BUILD Help restore 2026-08-12: Back + Help. Consultant chip stays off footer.
self.menuButtonInfo = { self.btnBack, self.btnHelpCs }
local trFn = self._rfTr
if type(trFn) == "function" and self.btnHelpCs ~= nil then
self.btnHelpCs.text = trFn("cs_pda_btn_help", "Help")
end
elseif isSoil then
-- BUILD 18:52: Rotation Planner and Field Detail come off the Soil footer.
-- Both dialogs stay registered and still open from the PDA/joiner; only the
Expand Down Expand Up @@ -2212,6 +2224,21 @@ function RfPdaMenuPage:onClickCsConsultant()
return
end

--- Esc CS Help → guest onOpenHelp → CsHelpDialog (inside SCS env). Never bare CsDialogLoader.
function RfPdaMenuPage:onClickHelpCs()
local host = self:_getHost()
local active = host and host:getActivePanel()
if active ~= nil and type(active.onOpenHelp) == "function" then
pcall(active.onOpenHelp, self.rfHostPlaceholder)
return
end
local csGuest = (type(mdResolve) == "function")
and mdResolve(CsRfPdaGuest, "CsRfPdaGuest") or CsRfPdaGuest
if csGuest ~= nil and type(csGuest.onOpenHelp) == "function" then
pcall(csGuest.onOpenHelp, self.rfHostPlaceholder)
end
end

function RfPdaMenuPage:_csPageSel()
return self.csSubnavSelector
end
Expand Down