diff --git a/src/ui/Screens.lua b/src/ui/Screens.lua index e52b8d12..59b483e1 100644 --- a/src/ui/Screens.lua +++ b/src/ui/Screens.lua @@ -124,6 +124,14 @@ local function build(game, id, ...) inst = factory.new(game, ...) end inst.screenId = inst.screenId or id + -- Standardized opt-in marker for mod-created options/settings screens. + -- A mod may declare `isModOptions = true` on its screen factory table or + -- on the returned instance. Either way the flag is propagated so that other + -- UI mods can detect mod options screens reliably without brittle screenId + -- string-matching (issue #1697). + if factory.isModOptions and inst.isModOptions == nil then + inst.isModOptions = true + end return inst end