Add mod options screen marker

This commit is contained in:
syybott
2026-08-22 16:39:11 -05:00
parent d54f9a02e0
commit 6d55da0ed2
+8
View File
@@ -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