RUMBLE does not support other mod managers. If you want to use a manager, you must use the RUMBLE Mod Manager, a manager specifically designed for this game.
Decompiled source of AutomaticInviter v1.1.1
Mods/AutomaticInviter.dll
Decompiled 3 days agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using AutomaticInviter; using Il2CppInterop.Runtime; using Il2CppRUMBLE.Interactions.InteractionBase; using Il2CppRUMBLE.Managers; using Il2CppRUMBLE.Players; using Il2CppRUMBLE.Social; using Il2CppRUMBLE.Social.Phone; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using Il2CppTMPro; using MelonLoader; using Microsoft.CodeAnalysis; using RumbleModUI; using RumbleModdingAPI; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: MelonInfo(typeof(Core), "AutomaticInviter", "1.1.1", "Orangenal", null)] [assembly: MelonGame("Buckethead Entertainment", "RUMBLE")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("AutomaticInviter")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("AutomaticInviter")] [assembly: AssemblyTitle("AutomaticInviter")] [assembly: NeutralResourcesLanguage("en-US")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace AutomaticInviter { public class Core : MelonMod { private string[] usernameList; private string usernamesPath = "UserData/AutomaticInviter/usernames.txt"; private string[] IDList; private string IDsPath = "UserData/AutomaticInviter/IDs.txt"; public static OptionsPage options; private static Instance loggerInstance; private bool autoInvite; private AssetBundle assetBundle; private Mod mod = new Mod(); public override void OnInitializeMelon() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown Calls.onMapInitialized += OnMapInitialised; InitFiles(); loggerInstance = ((MelonBase)this).LoggerInstance; assetBundle = Calls.LoadAssetBundleFromStream((MelonMod)(object)this, "AutomaticInviter.Resources.autoinvite"); mod.ModName = ((MelonBase)this).Info.Name; mod.ModVersion = ((MelonBase)this).Info.Version; mod.SetFolder(mod.ModName); mod.AddDescription("Description", "", "Invite a list of people to your park automatically!", new Tags { IsSummary = true }); mod.AddToList("Persistent inviting on open", false, 0, "If disabled, the \"Auto invite on open\" setting will always be off when you enter the gym (Does not currently save when you close your game)", new Tags()); mod.GetFromFile(); UI.instance.UI_Initialized += OnUIInit; loggerInstance.Msg("Initialised."); } public void OnUIInit() { UI.instance.AddMod(mod); } public override void OnUpdate() { if (Input.GetKeyDown((KeyCode)105)) { loggerInstance.Msg("Refreshing lists..."); UpdateLists(); } } private void InitFiles() { if (!Directory.Exists("UserData")) { Directory.CreateDirectory("UserData"); } if (!Directory.Exists("UserData/AutomaticInviter")) { Directory.CreateDirectory("UserData/AutomaticInviter"); } if (!File.Exists(usernamesPath)) { File.WriteAllText(usernamesPath, string.Empty); } if (!File.Exists(IDsPath)) { File.WriteAllText(IDsPath, string.Empty); } UpdateLists(); } private void UpdateLists() { usernameList = Array.Empty<string>(); IDList = Array.Empty<string>(); usernameList = (File.Exists(usernamesPath) ? File.ReadAllLines(usernamesPath) : Array.Empty<string>()); IDList = (File.Exists(IDsPath) ? File.ReadAllLines(IDsPath) : Array.Empty<string>()); } public static void InvitePerson(Platform platform, string masterID, string titleID, string username, OptionsPage optionsPage) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown if ((Object)(object)optionsPage == (Object)null) { loggerInstance.Error("Options page is null!"); return; } UserData val = new UserData(platform, masterID, titleID, username, -1); optionsPage.Initialize(val); optionsPage.inviteToParkButton.onPressed.Invoke(); } private void OnStep(int step) { autoInvite = step == 1; } private void OnMapInitialised() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) options = null; if (Scene.GetSceneName() == "Gym") { if (!(bool)mod.Settings[1].SavedValue) { autoInvite = false; } GameObject gameObject = DoorPilicy.GetGameObject(); GameObject obj = Object.Instantiate<GameObject>(gameObject); obj.transform.SetParent(gameObject.transform.parent); Vector3 position = gameObject.transform.position; Quaternion rotation = gameObject.transform.rotation; obj.transform.position = position - new Vector3(0f, 0.729f, 0f); obj.transform.rotation = rotation; ((TMP_Text)((Component)obj.transform.GetChild(1)).GetComponentInChildren<TextMeshPro>()).text = "Auto invite on open?"; InteractionSlider component = ((Component)obj.transform.GetChild(2).GetChild(8)).GetComponent<InteractionSlider>(); if ((bool)mod.Settings[1].SavedValue) { ((InteractionNumericalBase)component).SetStep(autoInvite ? 1 : 0, false, false); } Action<int>.op_Implicit((Action<int>)delegate(int step) { autoInvite = step == 1; }); UnityAction<int> val = DelegateSupport.ConvertDelegate<UnityAction<int>>((Delegate)new Action<int>(OnStep)); ((UnityEvent<int>)(object)((InteractionNumericalBase)component).onStepReached).AddListener(val); Image component2 = ((Component)obj.transform.GetChild(3).GetChild(0)).GetComponent<Image>(); Texture2D val2 = assetBundle.LoadAsset<Texture2D>("cross"); Texture2D val3 = assetBundle.LoadAsset<Texture2D>("checkmark"); component2.sprite = Sprite.Create(val2, new Rect(0f, 0f, (float)((Texture)val2).width, (float)((Texture)val2).height), new Vector2(0.5f, 0.5f)); ((Component)obj.transform.GetChild(3).GetChild(1)).GetComponent<Image>().sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)((Texture)val3).width, (float)((Texture)val3).height), new Vector2(0.5f, 0.5f)); } if (Scene.GetSceneName() != "Park" || !Players.IsHost()) { return; } UpdateLists(); GameObject gameObject2 = SettingsScreen.GetGameObject(); if ((Object)(object)gameObject2 == (Object)null) { loggerInstance.Error("Cannot find settings page object!"); return; } options = gameObject2.GetComponent<OptionsPage>(); if ((Object)(object)options == (Object)null) { loggerInstance.Error("Cannot find options page!"); return; } if (autoInvite) { if (usernameList.Length >= 1) { InviteListByUsername(usernameList, options); } if (IDList.Length >= 1) { InviteListByMasterID(IDList, options); } } GameObject val4 = Object.Instantiate<GameObject>(FloatingButton.GetGameObject()); val4.transform.position = new Vector3(-28.6742f, -1.6354f, -10.215f); val4.transform.rotation = Quaternion.Euler(0f, 70f, 0f); ((TMP_Text)((Component)val4.transform.GetChild(1)).GetComponent<TextMeshPro>()).text = "AutoInvite"; Object.Destroy((Object)(object)((Component)val4.transform.GetChild(2)).gameObject); GameObject obj2 = Create.NewButton(); ((Object)obj2).name = "InviteListButton"; ((Component)obj2.transform.GetChild(0)).gameObject.GetComponent<InteractionButton>().onPressed.AddListener(UnityAction.op_Implicit((Action)delegate { loggerInstance.Msg("Inviting people..."); if (usernameList.Length >= 1) { InviteListByUsername(usernameList, options); } if (IDList.Length >= 1) { InviteListByMasterID(IDList, options); } loggerInstance.Msg("People invited!"); })); obj2.transform.SetParent(val4.transform); obj2.transform.localPosition = new Vector3(0.0326f, 0.0054f, 0.0458f); obj2.transform.rotation = Quaternion.Euler(0f, 157f, 90f); } public static void InviteListByUsername(string[] usernames, OptionsPage optionsPage = null) { //IL_0147: Unknown result type (might be due to invalid IL or missing references) if (usernames.Length < 1) { loggerInstance.Error("Username list is empty!"); return; } if ((Object)(object)optionsPage == (Object)null) { GameObject gameObject = SettingsScreen.GetGameObject(); if ((Object)(object)gameObject == (Object)null) { loggerInstance.Error("Cannot find settings page object!"); return; } options = gameObject.GetComponent<OptionsPage>(); if ((Object)(object)options == (Object)null) { loggerInstance.Error("Cannot find options page!"); return; } } List<GetFriendsResult> confirmedFriends = FriendHandler.ConfirmedFriends; foreach (string username in usernames) { IEnumerable<GetFriendsResult> enumerable = ((IEnumerable<GetFriendsResult>)confirmedFriends.ToArray()).Where((GetFriendsResult friend) => ((UserSearchResult)friend).PublicName == username || Regex.Replace(((UserSearchResult)friend).PublicName, "<#[0-9A-Fa-f]{3,6}>", "") == username); if (enumerable.Count() > 1) { loggerInstance.Warning("Multiple friends found with username \"" + username + ",\" please use their ID instead!"); continue; } if (enumerable.Count() == 0) { loggerInstance.Warning("No friends with username \"" + username + "\""); continue; } foreach (GetFriendsResult friend2 in enumerable) { if (((IEnumerable<Player>)Players.GetAllPlayers().ToArray()).Where((Player player) => player.Data.GeneralData.PlayFabMasterId == ((UserSearchResult)friend2).PlayFabMasterId).Count() == 0) { InvitePerson(((UserSearchResult)friend2).PlatformId, ((UserSearchResult)friend2).PlayFabMasterId, ((UserSearchResult)friend2).PlayFabTitleId, ((UserSearchResult)friend2).PublicName, optionsPage); } } } } public static void InviteListByMasterID(string[] IDs, OptionsPage optionsPage = null) { //IL_010a: Unknown result type (might be due to invalid IL or missing references) if (IDs.Length < 1) { loggerInstance.Error("ID list is empty!"); return; } if ((Object)(object)optionsPage == (Object)null) { GameObject gameObject = SettingsScreen.GetGameObject(); if ((Object)(object)gameObject == (Object)null) { loggerInstance.Error("Cannot find settings page object!"); return; } options = gameObject.GetComponent<OptionsPage>(); if ((Object)(object)options == (Object)null) { loggerInstance.Error("Cannot find options page!"); return; } } List<GetFriendsResult> confirmedFriends = FriendHandler.ConfirmedFriends; foreach (string masterID in IDs) { IEnumerable<GetFriendsResult> source = ((IEnumerable<GetFriendsResult>)confirmedFriends.ToArray()).Where((GetFriendsResult friend) => ((UserSearchResult)friend).PlayFabMasterId == masterID); if (source.Count() == 0) { loggerInstance.Warning("No friends with ID \"" + masterID + "\""); continue; } GetFriendsResult friend2 = source.First(); if (((IEnumerable<Player>)Players.GetAllPlayers().ToArray()).Where((Player player) => player.Data.GeneralData.PlayFabMasterId == ((UserSearchResult)friend2).PlayFabMasterId).Count() == 0) { InvitePerson(((UserSearchResult)friend2).PlatformId, ((UserSearchResult)friend2).PlayFabMasterId, ((UserSearchResult)friend2).PlayFabTitleId, ((UserSearchResult)friend2).PublicName, optionsPage); } } } } }