11using FrooxEngine ;
2- using MonkeyLoader . Logging ;
3- using MonkeyLoader . Meta ;
42using System ;
53using System . Collections . Generic ;
64using System . Linq ;
108
119namespace ResoniteModLoader
1210{
13- // Why is this public
11+ /// <summary>
12+ /// Dummy execution hook class for compatibility.
13+ /// </summary>
14+ /// <remarks>
15+ /// Why is this public now? :C
16+ /// </remarks>
1417 public class ExecutionHook : IPlatformConnector
1518 {
16-
1719#pragma warning disable CS1591
18- public PlatformInterface Platform { get ; private set ; }
20+ public PlatformInterface Platform { get ; private set ; } = null ! ;
1921 public int Priority => - 10 ;
2022 public string PlatformName => "ResoniteModLoader" ;
21- public string Username => null ;
22- public string PlatformUserId => null ;
23+ public string Username => null ! ;
24+ public string PlatformUserId => null ! ;
2325 public bool IsPlatformNameUnique => false ;
24- public void SetCurrentStatus ( World world , bool isPrivate , int totalWorldCount ) { }
25- public void ClearCurrentStatus ( ) { }
26- public void Update ( ) { }
26+
27+ public void SetCurrentStatus ( World world , bool isPrivate , int totalWorldCount )
28+ { }
29+
30+ public void ClearCurrentStatus ( )
31+ { }
32+
33+ public void Update ( )
34+ { }
35+
2736 public void Dispose ( )
28- {
29- GC . SuppressFinalize ( this ) ;
30- }
31- public void NotifyOfLocalUser ( User user ) { }
32- public void NotifyOfFile ( string file , string name ) { }
33- public void NotifyOfScreenshot ( World world , string file , ScreenshotType type , DateTime time ) { }
37+ => GC . SuppressFinalize ( this ) ;
3438
35- public async Task < bool > Initialize ( PlatformInterface platformInterface )
39+ public void NotifyOfLocalUser ( User user )
40+ { }
41+
42+ public void NotifyOfFile ( string file , string name )
43+ { }
44+
45+ public void NotifyOfScreenshot ( World world , string file , ScreenshotType type , DateTime time )
46+ { }
47+
48+ public Task < bool > Initialize ( PlatformInterface platformInterface )
3649 {
3750 ModLoader . Logger . Debug ( ( ) => "Initialize() from platformInterface" ) ;
3851 Platform = platformInterface ;
39- return true ;
52+ return Task . FromResult ( true ) ;
4053 }
41- #pragma warning restore CS1591
4254
43- #pragma warning disable CA2255
44- [ ModuleInitializer ]
55+ // [ModuleInitializer]
4556 public static void Init ( )
46- {
47- //ModLoader.Logger.Debug(() => "Init() from ModuleInitializer"); // throws for some reason
48- }
49- #pragma warning restore CA2255
50-
57+ { }
5158 }
52- }
59+ }
0 commit comments