File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ game specific things:
1919
2020# Changelog
2121
22+ ### v1.8
23+ - Fixed that nested and grouped options' children would not get their ` .mod ` attribute set.
24+
2225### v1.7
2326- The "Update Available" notification should now immediately go away upon updating, instead of
2427 waiting a day for the next check.
Original file line number Diff line number Diff line change 88from .dot_sdkmod import open_in_mod_dir
99
1010# Need to define a few things first to avoid circular imports
11- __version_info__ : tuple [int , int ] = (1 , 7 )
11+ __version_info__ : tuple [int , int ] = (1 , 8 )
1212__version__ : str = f"{ __version_info__ [0 ]} .{ __version_info__ [1 ]} "
1313__author__ : str = "bl-sdk"
1414
Original file line number Diff line number Diff line change @@ -200,11 +200,16 @@ def __post_init__(self) -> None: # noqa: C901 - difficult to split up
200200 case _:
201201 pass
202202
203- for option in self .options :
204- option .mod = self
205-
206203 self .enabling_locked = Game .get_current () not in self .supported_games
207204
205+ def associate_options (options : Sequence [BaseOption ]) -> None :
206+ for option in options :
207+ if isinstance (option , GroupedOption | NestedOption ):
208+ associate_options (option .children )
209+ option .mod = self
210+
211+ associate_options (self .options )
212+
208213 def enable (self ) -> None :
209214 """Called to enable the mod."""
210215 if self .enabling_locked :
You can’t perform that action at this time.
0 commit comments