@@ -15,7 +15,7 @@ public class ModSettings : ResoniteMod
1515 {
1616 public override string Name => "ResoniteModSettings" ;
1717 public override string Author => "badhaloninja" ;
18- public override string Version => "2.1.6 " ;
18+ public override string Version => "2.1.7 " ;
1919 public override string Link => "https://github.com/badhaloninja/ResoniteModSettings" ;
2020
2121 [ AutoRegisterConfigKey ]
@@ -80,7 +80,7 @@ public class ModSettings : ResoniteMod
8080 private static ModSettings Current ;
8181 private static ModConfiguration Config ;
8282 private static RadiantDashScreen CurrentScreen ;
83- private static readonly Dictionary < string , FoundMod > foundModsDictionary = new ( ) ;
83+ private static readonly Dictionary < string , FoundMod > foundModsDictionary = [ ] ;
8484
8585 private static Slot configKeysRootSlot ;
8686 private static Slot modButtonsRoot ;
@@ -126,8 +126,8 @@ static class Patches
126126 public static void OnLoading ( UserspaceScreensManager __instance ) => ModSettingsScreen . GenerateModSettingsScreen ( __instance ) ;
127127
128128 [ HarmonyReversePatch ]
129- [ HarmonyPatch ( typeof ( RadiantDashScreen ) , "BuildBackground" ) ] // This method is protected for some reason
130- public static void BuildScreenBackground ( RadiantDashScreen instance , UIBuilder ui ) => throw new NotImplementedException ( "It's a stub" ) ;
129+ [ HarmonyPatch ( typeof ( RadiantDashScreen ) , "BuildBackground" , argumentTypes : [ typeof ( UIBuilder ) , typeof ( bool ) ] ) ] // This method is protected for some reason
130+ public static void BuildScreenBackground ( RadiantDashScreen instance , UIBuilder ui , bool nest = true ) => throw new NotImplementedException ( "It's a stub" ) ;
131131 }
132132
133133 static class ModSettingsScreen
@@ -537,7 +537,7 @@ public static void GenerateConfigItems(string SelectedMod = null)
537537 public static Slot GenerateConfigFieldOfType ( Type type , UIBuilder ui , string ModName , ModConfiguration config , ModConfigurationKey key )
538538 { // Generics go brr
539539 var genMethod = generateConfigFieldMethod . MakeGenericMethod ( type ) ; // Convert to whatever type requested
540- object [ ] args = new object [ ] { ui , ModName , config , key } ; // Pass the arguments
540+ object [ ] args = [ ui , ModName , config , key ] ; // Pass the arguments
541541
542542 return ( Slot ) genMethod . Invoke ( null , args ) ; // Run the method
543543 }
@@ -878,7 +878,7 @@ private static void ResetConfigKey(ModConfiguration config, ModConfigurationKey
878878 config . Unset ( key ) ;
879879
880880 // Unset does not trigger the config changed event
881- fireConfigurationChangedEventMethod . Invoke ( config , new object [ ] { key , _internalConfigResetLabel } ) ;
881+ fireConfigurationChangedEventMethod . Invoke ( config , [ key , _internalConfigResetLabel ] ) ;
882882
883883 // Get default type
884884 if ( ! key . TryComputeDefault ( out object value ) )
0 commit comments