示例#1
0
 private void RoR2Application_OnLoad(On.RoR2.RoR2Application.orig_OnLoad orig, RoR2.RoR2Application self)
 {
     BepInEx.Bootstrap.Chainloader.Plugins.ForEach(p => Debug.Log(MetadataHelper.GetMetadata(p).GUID));
     orig(self);
     Debug.Log(self.steamworksClient.BuildId.ToString());
 }
示例#2
0
 private void RoR2Application_Awake(On.RoR2.RoR2Application.orig_Awake orig, RoR2.RoR2Application self)
 {
     orig(self);
     UnityEngine.Debug.Log("STUFF IS HAPPENING");
 }
示例#3
0
        //private void SteamworksLobbyManager_JoinLobby(On.RoR2.SteamworksLobbyManager.orig_JoinLobby orig, CSteamID newLobbyId)
        //{
        //    orig(newLobbyId);
        //}

        private void RoR2Application_Update(On.RoR2.RoR2Application.orig_Update orig, RoR2.RoR2Application self)
        {
            if ((bool)typeof(BepInEx.Bootstrap.Chainloader).GetField("_loaded", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).GetValue(null))
            {
                file.Wrap("hosting", "!MOD GUID!", "0 means it isn't used, 1 means each clients needs to have it, -1 means each clients needs to not have it", "0");
                file.Wrap("joining", "!MOD GUID!", "0 means it isn't used, 1 means that the host needs to have it, -1 means that the host needs to not have it", "0");

                foreach (BaseUnityPlugin plugin in BepInEx.Bootstrap.Chainloader.Plugins)
                {
                    var pluginname = MetadataHelper.GetMetadata(plugin).GUID;
                    configPlugin(pluginname);
                }

                On.RoR2.RoR2Application.Update -= RoR2Application_Update;
            }
        }