Merge pull request #1722 from syybott/fix-mod-options-marker

Add opt-in marker for mod options screens
This commit is contained in:
bryanthaboi
2026-08-24 08:30:25 -04:00
committed by GitHub
+8
View File
@@ -124,6 +124,14 @@ local function build(game, id, ...)
inst = factory.new(game, ...) inst = factory.new(game, ...)
end end
inst.screenId = inst.screenId or id 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 return inst
end end