File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,22 +10,29 @@ namespace Axwabo.CommandSystem.Patches;
1010internal static class ConsolePatch
1111{
1212
13- public static IEnumerable < CodeInstruction > Transpiler ( IEnumerable < CodeInstruction > instructions )
13+ public static IEnumerable < CodeInstruction > Transpiler ( IEnumerable < CodeInstruction > instructions , ILGenerator generator )
1414 {
1515 var list = new List < CodeInstruction > ( instructions ) ;
16+ var array = generator . Local < string [ ] > ( ) ;
1617 var setSender = list . FindCall ( "get_Sender" ) + 1 ;
1718
1819 list . InsertRange ( setSender , [
1920 Duplicate ,
2021 Stfld ( typeof ( PlayerSelectionManager ) , nameof ( CurrentSender ) )
2122 ] ) ;
2223
24+ var split = list . FindCall ( nameof ( string . Split ) ) ;
25+ list . InsertRange ( split + 2 , [
26+ Duplicate ,
27+ array . Set ( )
28+ ] ) ;
29+
2330 var failedIndex = list . FindIndex ( i => i . operand is CommandExecutionFailedError ) ;
2431 var failEnd = list . FindCode ( OpCodes . Stloc_S , start : failedIndex ) ;
2532 list . RemoveRange ( failedIndex , failEnd - failedIndex ) ;
2633 list . InsertRange ( failedIndex , [
2734 Ldarg ( 2 ) ,
28- Ldloc ( 1 ) ,
35+ array . Load ( ) ,
2936 Ldloc ( 13 ) ,
3037 Call < DeveloperMode > ( nameof ( DeveloperMode . OnExceptionThrown ) ) ,
3138 Ldloc ( 13 ) ,
Original file line number Diff line number Diff line change 3030// You can specify all the values or you can default the Build and Revision Numbers
3131// by using the '*' as shown below:
3232// [assembly: AssemblyVersion("1.0.*")]
33- [ assembly: AssemblyVersion ( "1.0.3 .0" ) ]
34- [ assembly: AssemblyFileVersion ( "1.0.3 .0" ) ]
33+ [ assembly: AssemblyVersion ( "1.0.4 .0" ) ]
34+ [ assembly: AssemblyFileVersion ( "1.0.4 .0" ) ]
You can’t perform that action at this time.
0 commit comments