File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public static class Patcher
16
16
{
17
17
// Without the contents of this region, the patcher will not be loaded by BepInEx - do not remove!
18
18
#region BepInEx Patcher Contract
19
- public static IEnumerable < string > TargetDLLs { get ; } = Enumerable . Empty < string > ( ) ;
19
+ public static IEnumerable < string > TargetDLLs { get ; } = [ ] ;
20
20
public static void Patch ( AssemblyDefinition _ ) { }
21
21
#endregion
22
22
@@ -96,7 +96,7 @@ private static bool HasUnityAudioReferences()
96
96
}
97
97
catch
98
98
{ // if we couldn't read the assembly it's probably not a .NET assembly anyway, so just ignore it
99
- return Enumerable . Empty < ModuleDefinition > ( ) ;
99
+ return [ ] ;
100
100
}
101
101
} )
102
102
. SelectMany ( module => module . GetTypeReferences ( ) )
@@ -156,10 +156,10 @@ private static void PatchGame()
156
156
string tempPath = $ "{ globalGameManagersPath } .tmp";
157
157
using ( var writer = new AssetsFileWriter ( tempPath ) )
158
158
{
159
- ggmInstance . file . Write ( writer , 0 , new List < AssetsReplacer >
160
- {
159
+ ggmInstance . file . Write ( writer , 0 ,
160
+ [
161
161
new AssetsReplacerFromMemory ( ggmInstance . file , audioManager , baseField )
162
- } ) ;
162
+ ] ) ;
163
163
}
164
164
ggmInstance . file . Close ( ) ; // close the file so we can overwrite it
165
165
manager . UnloadAll ( ) ; // unload the class package etc. as we're done with them
Original file line number Diff line number Diff line change @@ -155,14 +155,14 @@ void logFailure(string missingMemberName, string missingMemberType) =>
155
155
yield break ;
156
156
}
157
157
158
- var getContent = downloadHandlerAudioClip . OptionalMethod ( "GetContent" , new [ ] { unityWebRequestType } ) ;
158
+ var getContent = downloadHandlerAudioClip . OptionalMethod ( "GetContent" , [ unityWebRequestType ] ) ;
159
159
if ( ! getContent . MethodExists ( ) )
160
160
{
161
161
logFailure ( $ "{ downloadHandlerAudioClip } :GetContent", "static method" ) ;
162
162
yield break ;
163
163
}
164
164
165
- var getAudioClip = unityWebRequestMultimedia . OptionalMethod ( "GetAudioClip" , new [ ] { typeof ( string ) , audioTypeType } ) ;
165
+ var getAudioClip = unityWebRequestMultimedia . OptionalMethod ( "GetAudioClip" , [ typeof ( string ) , audioTypeType ] ) ;
166
166
if ( ! getAudioClip . MethodExists ( ) )
167
167
{
168
168
logFailure ( $ "{ unityWebRequestMultimedia } :GetAudioClip", "static method" ) ;
You can’t perform that action at this time.
0 commit comments