1111using MonkeyLoader . Resonite . UI ;
1212using MonkeyLoader . Resonite . UI . Inspectors ;
1313using ProtoFlux . Core ;
14- using System ;
15- using System . Collections . Generic ;
16- using System . IO ;
17- using System . Linq ;
18- using System . Text ;
19- using System . Threading . Tasks ;
2014
2115namespace WikiIntegration
2216{
@@ -69,7 +63,7 @@ protected override void Handle(BuildInspectorHeaderEvent eventData)
6963 AddHyperlink ( button . Slot , eventData . Worker ) ;
7064
7165 ConfigSection . Components . DriveFromVariable ( button . Slot . ActiveSelf_Field ) ;
72- ConfigSection . ComponentOffset . DriveFromVariable ( button . Slot . _orderOffset ) ;
66+ ConfigSection . ComponentOffset . DriveFromVariable ( button . Slot . OrderOffset_Field ) ;
7367
7468 ui . PopStyle ( ) ;
7569 }
@@ -130,6 +124,23 @@ private static void AddHyperlink(Slot slot, Worker worker)
130124 hyperlink . Reason . AssignLocaleString ( reason ) ;
131125 }
132126
127+ private static void CreateConfigKeyNames ( FallbackLocaleGenerationEvent eventData , string descriptionFormat , CategoryNode < Type > category , string path )
128+ {
129+ if ( category . Elements . Any ( ) )
130+ {
131+ var trimmedPath = path . Replace ( ProtoFluxCategoryConfig . ProtoFluxPath , "" ) ;
132+
133+ var id = $ "{ _categoryConfig . FullId } .{ ProtoFluxCategoryConfig . GetToggleId ( path ) } ";
134+ var description = string . Format ( descriptionFormat , trimmedPath ) ;
135+
136+ eventData . AddMessage ( $ "{ id } .Name", trimmedPath ) ;
137+ eventData . AddMessage ( $ "{ id } .Description", description ) ;
138+ }
139+
140+ foreach ( var subcategory in category . Subcategories )
141+ CreateConfigKeyNames ( eventData , descriptionFormat , subcategory , $ "{ path } /{ subcategory . Name } ") ;
142+ }
143+
133144 private static void Postfix ( ProtoFluxNodeVisual __instance , ProtoFluxNode node )
134145 {
135146 if ( ! Engine . IsAprilFools && node . SupressHeaderAndFooter && node . NodeName . Contains ( "Relay" , StringComparison . OrdinalIgnoreCase ) )
@@ -155,22 +166,5 @@ private static void Postfix(ProtoFluxNodeVisual __instance, ProtoFluxNode node)
155166 if ( _categoryConfig [ node . GetType ( ) ] is ConfigKeySessionShare < bool > categoryShare )
156167 categoryShare . DriveFromVariable ( button . Slot . ActiveSelf_Field ) ;
157168 }
158-
159- private void CreateConfigKeyNames ( FallbackLocaleGenerationEvent eventData , string descriptionFormat , CategoryNode < Type > category , string path )
160- {
161- if ( category . Elements . Any ( ) )
162- {
163- var trimmedPath = path . Replace ( ProtoFluxCategoryConfig . ProtoFluxPath , "" ) ;
164-
165- var id = $ "{ _categoryConfig . FullId } .{ ProtoFluxCategoryConfig . GetToggleId ( path ) } ";
166- var description = string . Format ( descriptionFormat , trimmedPath ) ;
167-
168- eventData . AddMessage ( $ "{ id } .Name", trimmedPath ) ;
169- eventData . AddMessage ( $ "{ id } .Description", description ) ;
170- }
171-
172- foreach ( var subcategory in category . Subcategories )
173- CreateConfigKeyNames ( eventData , descriptionFormat , subcategory , $ "{ path } /{ subcategory . Name } ") ;
174- }
175169 }
176170}
0 commit comments