mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-25 15:01:11 +02:00
Merge pull request #1722 from syybott/fix-mod-options-marker
Add opt-in marker for mod options screens
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user