public IEnumerator PhysicSyncLoad() { ObjectIDManager.objects.Clear(); yield return(new WaitForSeconds(3)); MelonModLogger.Log("Getting and adding all Rigidbodies"); var rbs = FindObjectsOfType <Rigidbody>(); foreach (var rb in rbs) { if (rb.gameObject.transform.root.gameObject.name.Contains("HMD") || rb.isKinematic == true) { continue; } rb.isKinematic = true; var sso = rb.gameObject.AddComponent <ServerSyncedObject>(); var idHolder = rb.gameObject.AddComponent <IDHolder>(); idHolder.ID = ObjectIDManager.GenerateID(sso); ObjectIDManager.AddObject(idHolder.ID, sso); MelonModLogger.Log($"added {rb.gameObject.name} with generated id {idHolder.ID.ToString()}"); } }
public void CreateOnPlayerCtxt(string parent, Vector2 offset, System.Action butAction) { //Get Menu Transform quickMenu = QuickMenu.prop_QuickMenu_0.transform; // Clone of a standard button Transform butTransform = UnityEngine.Object.Instantiate(quickMenu.Find("CameraMenu/BackButton").gameObject).transform; // Set internal name of button butTransform.name = Name; // Set button's parent to quick menu butTransform.SetParent(quickMenu.Find(parent), false); // Set button's text butTransform.GetComponentInChildren <Text>().text = Text; butTransform.GetComponent <UiTooltip>().text = ToolTip; butTransform.GetComponent <UiTooltip>().alternateText = ToolTip; // Set position of new button based on existing menu buttons float buttonWidth = quickMenu.Find("UserInteractMenu/ForceLogoutButton").localPosition.x - quickMenu.Find("UserInteractMenu/BanButton").localPosition.x; float buttonHeight = quickMenu.Find("UserInteractMenu/ForceLogoutButton").localPosition.x - quickMenu.Find("UserInteractMenu/BanButton").localPosition.x; butTransform.localPosition = new Vector3(butTransform.localPosition.x + buttonWidth * offset.x, butTransform.localPosition.y + buttonHeight * offset.y, butTransform.localPosition.z); MelonModLogger.Log("button: " + butTransform.localPosition); // Make it so the button does what we want butTransform.GetComponent <Button>().onClick = new Button.ButtonClickedEvent(); butTransform.GetComponent <Button>().onClick.AddListener(butAction); // enable it just in case butTransform.gameObject.SetActive(true); }
private void DebugLog(string text) { if (isDebugMode) { MelonModLogger.Log(text); } }
public override void OnUpdate() { if (Input.GetKeyDown(KeyCode.T)) { MelonModLogger.Log("You just pressed T"); } }
public override void OnLevelWasInitialized(int level) { MelonModLogger.Log("[JoinNotifier] Scene load"); myLastLevelLoad = Environment.TickCount; myObservedLocalPlayerJoin = false; }
public static void send_msg_to_social() { var ff = GameObject.Find("Screens").transform.Find("UserInfo"); var userInfo = ff.transform.GetComponentInChildren <VRC.UI.PageUserInfo>(); MelonModLogger.Log("user selected " + userInfo.displayName + " id " + userInfo.user.id); if (Time.time > hashmod.last_msg_apicall) { hashmod.last_msg_apicall = Time.time + 30; hashmod.in_input_shit = true; menu.input_text("Enter the text to send", "A message to send to the target", new Action <string>((a) => { hashmod.in_input_shit = false; VRCWebSocketsManager.field_Private_Static_VRCWebSocketsManager_0.field_Private_Api_0.PostOffice.Send(Invite.Create(userInfo.user.id, "", new Location("", new Transmtn.DTO.Instance("", userInfo.user.id, "", "", "", false)), a)); })); } else { hashmod.in_input_shit = false; var sec_left = hashmod.last_msg_apicall - Time.time; hashmod.error_type_poput("Function is still on cooldown!", "Please wait " + Math.Floor(sec_left) + " seconds before trying again!"); } }
// Prints the properties of a given type public static void PrintProps <T>(T t) { MelonModLogger.Log("====== Type " + t.ToString() + "======"); System.Reflection.PropertyInfo[] props = typeof(T).GetProperties(); foreach (var pi in props) { //if (pi.PropertyType.IsPrimitive) try { var val = pi.GetValue(t); if (val != null) { MelonModLogger.Log(pi.Name + ": " + val.ToString()); } else { MelonModLogger.Log(pi.Name + ": null"); } } catch { MelonModLogger.LogError("Error tring to get property " + pi.Name); } } }
private void TeleportAllItemBalls() { try { if (ItemBallCollectables == null || ItemBallCollectables.Count == 0) { return; } if (ItemBallCollectables != null) { for (int i = 0; i < ItemBallCollectables._size; i++) { var obj = ItemBallCollectables.get_Item(i); var body = obj.GetComponent <Rigidbody>(); body.velocity = novelocity; DebugLog(": Teleporting " + obj.name + " To Your location..."); MelonModLogger.Log(": Teleporting " + ItemBallCollectables.Count + " ItemBalls To Your location..."); Vector3 position = player.transform.position + player.transform.forward; DebugLog("Selected position is : " + position.ToString()); obj.transform.position = position; } } } catch (Exception) { } }
public override void OnApplicationStart() { MelonModLogger.Log(ConsoleColor.Cyan, "=============================================="); MelonModLogger.Log(ConsoleColor.Green, "TP2Mouse by CJ [Loaded!]"); MelonModLogger.Log(ConsoleColor.Green, "Press T to teleport to your crosshair!"); MelonModLogger.Log(ConsoleColor.Cyan, "=============================================="); }
public override void OnApplicationStart() { ModPrefs.RegisterCategory(ModCategory, "Mirror Resolution"); ModPrefs.RegisterPrefInt(ModCategory, MaxResPref, 4096, "Max eye texture size"); ModPrefs.RegisterPrefInt(ModCategory, MirrorMsaaPref, 0, "Mirror MSAA (0=default)"); ModPrefs.RegisterPrefBool(ModCategory, AllMirrorsAutoPref, false, "Force auto resolution"); unsafe { var methodInfo = Il2CppType.Of <VRC_MirrorReflection>().GetMethod(nameof(VRC_MirrorReflection.GetReflectionData), BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); var originalMethodPointer = *(IntPtr *)IL2CPP.il2cpp_method_get_from_reflection(methodInfo.Pointer); CompatHook((IntPtr)(&originalMethodPointer), typeof(MirrorResolutionUnlimiterMod).GetMethod(nameof(GetReflectionData), System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) !.MethodHandle.GetFunctionPointer()); } OnModSettingsApplied(); if (AppDomain.CurrentDomain.GetAssemblies().Any(it => it.GetName().Name.StartsWith("UIExpansionKit"))) { MelonModLogger.Log("Adding UIExpansionKit buttons"); typeof(UiExtensionsAddon) .GetMethod(nameof(UiExtensionsAddon.Init), System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static) ! .Invoke(null, new object[0]); } }
private void TeleportAllCrates() { try { if (CratesCollectables == null || CratesCollectables.Count == 0) { MelonModLogger.Log("No Crates Detected!"); return; } if (CratesCollectables != null) { for (int i = 0; i < CratesCollectables._size; i++) { var obj = CratesCollectables.get_Item(i); DebugLog(": Teleporting " + obj.name + " To Your location..."); MelonModLogger.Log(": Teleporting " + CratesCollectables.Count + " Crates To Your location..."); Vector3 position = player.transform.position + player.transform.forward; DebugLog("Selected position is : " + position.ToString()); obj.transform.position = position; } } } catch (Exception) { } }
public unsafe override void OnApplicationStart() { Config.LoadConfig(); IL2CPP_Class API2 = NET_SDK.SDK.GetClass("VRC.Core", "API"); IL2CPP_Class Amp = NET_SDK.SDK.GetClass("AmplitudeSDKWrapper", "AmplitudeWrapper"); IL2CPP_Class WS = NET_SDK.SDK.GetClass("Transmtn", "WebsocketPipeline"); //Thanks Zoey#9420 for pointing out Websockets var oldhwid = VRC.Core.API.DeviceID; H.Patch(API2.GetProperty("DeviceID").GetGetMethod(), AccessTools.Method(typeof(Main), "DeviceID")); H.Patch(Amp.GetMethod("InitializeDeviceId"), AccessTools.Method(typeof(Main), "DeviceID1")); H.Patch(Amp.GetMethods(x => x.Name == "LogEvent" && x.GetParameterCount() == 4 && NET_SDK.IL2CPP.il2cpp_type_get_name(x.GetParameters()[2].Ptr).Equals("System.Int64")).First(), AccessTools.Method(typeof(Main), "LogEvent")); var original = *(IntPtr *)WS.GetMethod("ProcessPipe").Ptr; HookMethod((IntPtr)(&original), Marshal.GetFunctionPointerForDelegate(new Action <IntPtr, IntPtr>(ProcessPipeFix))); ProcessCall = Marshal.GetDelegateForFunctionPointer <ProcessFix>(original); if (Config.CFG.ConsolePrint) { MelonModLogger.Log("Old HWID:"); MelonModLogger.Log(oldhwid); MelonModLogger.Log("New HWID:"); MelonModLogger.Log(VRC.Core.API.DeviceID); } }
public override void VRChat_OnUiManagerInit() { this.AddMenuButton("fcQuickMenu", QuickMenu.prop_QuickMenu_0.transform.Find("UserInteractMenu"), "<color=white>Force Clone Avatar</color>", "Forces the cloning of a public avatar", 0, 1, new System.Action(() => { var SelectedPlayer = GetPlayer(QuickMenu.prop_QuickMenu_0.field_Private_APIUser_0.id); string AvatarID = SelectedPlayer.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0.id; if (SelectedPlayer.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0.releaseStatus != "private") { MelonModLogger.Log("Force Cloning avatar with ID: " + AvatarID); VRC.Core.API.SendRequest($"avatars/{AvatarID}", HTTPMethods.Get, new ApiModelContainer <ApiAvatar>(), null, true, true, 3600f, 2, null); new PageAvatar { avatar = new SimpleAvatarPedestal { field_Internal_ApiAvatar_0 = new ApiAvatar { id = AvatarID } } }.ChangeToSelectedAvatar(); VRCUiManager.prop_VRCUiManager_0.Method_Public_Void_Boolean_2(false); } else { MelonModLogger.Log("Avatar ID " + AvatarID + "is private :("); showDialog("<color=red>Error!</color>", "<color=white>Avatar ID " + AvatarID + " is private!</color>"); } })); }
public override void OnApplicationStart() { // Setup MonoBehaviors ClassInjector.RegisterTypeInIl2Cpp <ServerSyncedObject>(); ClassInjector.RegisterTypeInIl2Cpp <IDHolder>(); // Register Prefs ModPrefs.RegisterCategory("MPMod", "Multiplayer Settings"); ModPrefs.RegisterPrefString("MPMod", "HostSteamID", "0"); ModPrefs.RegisterPrefBool("MPMod", "ForceLargePlayspace", true); // Start Server Stuff SteamClient.Init(448280); // MelonModLogger.LogWarning("ALPHA TESTING BUILD"); MelonModLogger.Log($"Multiplayer initialising with protocol version {PROTOCOL_VERSION}."); SteamNetworking.AllowP2PPacketRelay(true); client = new Client(); server = new Server(); PlayerRep.LoadPlayer(); // Setup Discord Presence RichPresence.Initialise(736050983335100436); client.SetupRP(); MelonModLogger.Log("MPMod Loaded"); }
public override void OnApplicationStart() { ModPrefs.RegisterCategory("NoPerformanceStats", "No Performance Stats"); ModPrefs.RegisterPrefBool("NoPerformanceStats", "DisablePerformanceStats", true, "Disable Performance Stats"); LoadModPrefs(); harmonyInstance = HarmonyInstance.Create("NoPerformanceStatsPatcher"); try { MethodInfo[] methods = typeof(AvatarPerformance).GetMethods(BindingFlags.Public | BindingFlags.Static); for (int i = 0; i < methods.Length; i++) { if (methods[i].Name == "Method_Public_Static_IEnumerator_String_GameObject_AvatarPerformanceStats_0" || methods[i].Name == "Method_Public_Static_IEnumerator_GameObject_AvatarPerformanceStats_EnumPublicSealedvaNoExGoMePoVe7vUnique_MulticastDelegateNPublicSealedVoUnique_0" || methods[i].Name == "Method_Public_Static_Void_String_GameObject_AvatarPerformanceStats_0") { harmonyInstance.Patch(methods[i], new HarmonyMethod(typeof(NoPerformanceStats).GetMethod("CalculatePerformance", BindingFlags.Static | BindingFlags.NonPublic)), null, null); } } } catch (Exception e) { MelonModLogger.Log(ConsoleColor.Red, "Failed to patch Performance Scanners: " + e); } }
public override void OnStart() { try { var HarmonyInstance = Manager.CreateInstance("Quality Assurance"); var API = SDK.GetClass("VRC.Core", "API"); var Amp = SDK.GetClass("AmplitudeSDKWrapper", "AmplitudeWrapper"); var Photon = SDK.GetClass("Photon.Pun", "PhotonView"); var AvatarManager = SDK.GetClass("", "VRCAvatarManager"); var moderationManager = SDK.GetClass("", "ModerationManager"); HarmonyInstance.Patch(API.GetMethod("DeviceID"), AccessTools.Method(typeof(Protections), "HWIDSpoofer")); HarmonyInstance.Patch(Amp.GetMethod("InitializeDeviceId"), AccessTools.Method(typeof(Protections), "HWIDSpoofer")); HarmonyInstance.Patch(Photon.GetMethod("Method_Public_Type1595182416_Type2348106871_2"), AccessTools.Method(typeof(Protections), "SerializeView")); //Last function to take class, struct parameters only. } catch (Exception e) { MelonModLogger.LogError("An exception has occurred. Dm Yaekith#1337 on discord. This mod may be outdated."); MelonModLogger.LogError(e.ToString()); } finally { MelonModLogger.Log("Protections have been applied."); MelonModLogger.Log("Your New HWID: " + VRC.Core.API.DeviceID); MelonModLogger.Log("IsOffline: " + VRC.Core.API.IsOffline()); } }
public override void OnApplicationStart() { ModPrefs.RegisterCategory("PortableMirror", "PortableMirror"); ModPrefs.RegisterPrefFloat("PortableMirror", "MirrorScaleX", 5f, "Mirror Scale X"); ModPrefs.RegisterPrefFloat("PortableMirror", "MirrorScaleY", 3f, "Mirror Scale Y"); ModPrefs.RegisterPrefBool("PortableMirror", "OptimizedMirror", false, "Optimized Mirror"); ModPrefs.RegisterPrefBool("PortableMirror", "CanPickupMirror", false, "Can Pickup Mirror"); ModPrefs.RegisterPrefString("PortableMirror", "MirrorKeybind", "Alpha1", "Toggle Mirror Keybind"); _mirrorScaleX = ModPrefs.GetFloat("PortableMirror", "MirrorScaleX"); _mirrorScaleY = ModPrefs.GetFloat("PortableMirror", "MirrorScaleY"); _optimizedMirror = ModPrefs.GetBool("PortableMirror", "OptimizedMirror"); _canPickupMirror = ModPrefs.GetBool("PortableMirror", "CanPickupMirror"); _mirrorKeybind = Utils.GetMirrorKeybind(); MelonModLogger.Log("Settings can be configured in UserData\\MelonPreferences.cfg"); MelonModLogger.Log($"[{_mirrorKeybind}] -> Toggle portable mirror"); MelonMod uiExpansionKit = MelonLoader.Main.Mods.Find(m => m.InfoAttribute.Name == "UI Expansion Kit"); if (uiExpansionKit != null) { uiExpansionKit.InfoAttribute.SystemType.Assembly.GetTypes().First(t => t.FullName == "UIExpansionKit.API.ExpansionKitApi").GetMethod("RegisterWaitConditionBeforeDecorating", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static).Invoke(null, new object[] { CreateQuickMenuButton() }); } }
public static void save_social_to_favplus() { var menu = GameObject.Find("Screens").transform.Find("UserInfo"); var userInfo = menu.transform.GetComponentInChildren <VRC.UI.PageUserInfo>(); var found_player = utils.get_player(userInfo.user.id); if (found_player == null) { MelonModLogger.Log("player could not be found"); return; } MelonModLogger.Log("Attempting to save avatar to Fav+ (" + found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0 + ")"); var avatar = found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0; if (avatar.releaseStatus == "public") { if (!avatar_config.avatar_list.Any(v => v.avatar_ident == avatar.id)) { avatar_utils.add_to_list(avatar); avatar_utils.update_list(avatar_config.avatar_list.Select(x => x.avatar_ident), hashmod.fav_list.listing_avatars); } else { avatar_utils.add_to_list(avatar); avatar_utils.update_list(avatar_config.avatar_list.Select(x => x.avatar_ident), hashmod.fav_list.listing_avatars); } MelonModLogger.Log("Done"); } else { MelonModLogger.Log("Avatar saving failed, avatar is not public! (" + found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0.releaseStatus + ")"); } }
public static void do_clone_to_social() { var menu = GameObject.Find("Screens").transform.Find("UserInfo"); var userInfo = menu.transform.GetComponentInChildren <VRC.UI.PageUserInfo>(); var found_player = utils.get_player(userInfo.user.id); if (found_player == null) { MelonModLogger.Log("player could not be found"); return; } if (found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0.releaseStatus != "public") { MelonModLogger.Log("Avatar cloning failed, avatar is not public! (" + found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0.releaseStatus + ")"); return; } MelonModLogger.Log("Attempting clone for user " + userInfo.user.displayName.ToString()); var avatar_menu = GameObject.Find("Screens").transform.Find("Avatar").GetComponent <VRC.UI.PageAvatar>(); avatar_menu.avatar.field_Internal_ApiAvatar_0 = found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0; avatar_menu.ChangeToSelectedAvatar(); MelonModLogger.Log("Done!"); }
public static void save_direct_to_favplus() { var found_player = utils.get_quick_menu().get_selected_player(); if (found_player == null) { return; } var avatar = found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0; if (avatar.releaseStatus == "public") { if (!avatar_config.avatar_list.Any(v => v.avatar_ident == avatar.id)) { avatar_utils.add_to_list(avatar); avatar_utils.update_list(avatar_config.avatar_list.Select(x => x.avatar_ident), hashmod.fav_list.listing_avatars); } else { avatar_utils.add_to_list(avatar); avatar_utils.update_list(avatar_config.avatar_list.Select(x => x.avatar_ident), hashmod.fav_list.listing_avatars); } MelonModLogger.Log("Done"); } else { MelonModLogger.Log("Avatar saving failed, avatar is not public! (" + found_player.prop_VRCAvatarManager_0.field_Private_ApiAvatar_0.releaseStatus + ")"); } }
// Prints the heirarchy of a given object, with changeable depth private void PrintChildHierarchy(GameObject parent, int currentDepth = 0) { string offset = ""; for (int j = 0; j < currentDepth; j++) { offset += "\t"; } MelonModLogger.Log(offset + " Has components:"); foreach (Component c in parent.GetComponents <Component>()) { MelonModLogger.Log(offset + c.ToString()); } for (int i = 0; i < parent.transform.childCount; i++) { GameObject child = parent.transform.GetChild(i).gameObject; MelonModLogger.Log(offset + "-" + child.name); PrintChildHierarchy(child, currentDepth + 1); } }
public IEnumerator CloseGameAfterConfig() { MelonModLogger.Log("Closing your game."); yield return(new UnityEngine.WaitForSeconds(2f)); Process.GetCurrentProcess().Kill(); }
private void CreateGameObjects() { if (myJoinImage != null) { return; } var hudRoot = GameObject.Find("UserInterface/UnscaledUI/HudContent/Hud"); if (hudRoot == null) { MelonModLogger.Log("[JoinNotifier] Not creating gameobjects - no hud root"); return; } MelonModLogger.Log("[JoinNotifier] Creating gameobjects"); // var pathToThing = "UserInterface/UnscaledUI/HudContent/Hud/NotificationDotParent/NotificationDot"; myJoinImage = CreateNotifierImage("join", 0f, JoinNotifierSettings.GetJoinIconColor()); myJoinSource = CreateAudioSource(myJoinClip, myJoinImage.gameObject); myJoinText = CreateTextNear(myJoinImage, 110f, TextAnchor.LowerRight); myLeaveImage = CreateNotifierImage("leave", 100f, JoinNotifierSettings.GetLeaveIconColor()); myLeaveSource = CreateAudioSource(myLeaveClip, myLeaveImage.gameObject); myLeaveText = CreateTextNear(myLeaveImage, 110f, TextAnchor.LowerLeft); }
public void StartServer() { MelonModLogger.Log("Starting server..."); // localRigTransforms = BWUtil.GetLocalRigTransforms(); partyId = SteamClient.SteamId + "P" + DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString(); SteamNetworking.OnP2PSessionRequest = OnP2PSessionRequest; SteamNetworking.OnP2PConnectionFailed = OnP2PConnectionFailed; IsRunning = true; RichPresence.SetActivity( new Activity() { Details = "Hosting a server", Assets = { LargeImage = "jobsim" }, Secrets = new ActivitySecrets() { Join = SteamClient.SteamId.ToString() }, Party = new ActivityParty() { Id = partyId, Size = new PartySize() { CurrentSize = 1, MaxSize = JobSimulatorMultiplayer.MAX_PLAYERS } } }); MelonCoroutines.Start(PhysicSyncLoad()); }
public static Command CreateInstance(String className, Client client, bool log = true) { if (log) { MelonModLogger.Log("Creating command instance " + className + ". Client: " + client); } if (commands.TryGetValue(className, out Type commandClass)) { try { Command command = (Command)Activator.CreateInstance(commandClass); long outId; lock (counter) { outId = (long)(counter.NextDouble() * long.MaxValue); } command.SetLog(log); command.SetClient(client); command.SetOutId(className + " " + outId); if (!runningCommands.TryGetValue(className, out Dictionary <string, Command> commandContainer)) { commandContainer = new Dictionary <String, Command>(); runningCommands.Add(className, commandContainer); } commandContainer.Add("" + outId, command); return(command); } catch (Exception e) { MelonModLogger.LogError(e.ToString()); } } return(null); }
public static void setup_public_avatar_button() { var t = avatar_ui_button.setup("Show public avatars", 320f, 9.6f); var scale = t.game_object.transform.localScale; t.game_object.transform.localScale = new Vector3(scale.x - 0.1f, scale.y - 0.1f, scale.z - 0.1f); t.set_action(() => { if (Time.time > last_public_call) { last_public_call = Time.time + 65; MelonModLogger.Log("getting pubs for user: "******" / " + hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0.authorName); if (hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0 == null) { return; } if (hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0.authorId == "") { return; } pubavatar.update_public_user_list(hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0.authorId); } else { MelonModLogger.Log("please wait for getting public avatars again! (1 minute)"); } }); }
public static void setup_public_avatar_button() { var t = avatar_ui_button.setup("Show public avatars", 320f, 9.6f); var scale = t.game_object.transform.localScale; t.game_object.transform.localScale = new Vector3(scale.x - 0.1f, scale.y - 0.1f, scale.z - 0.1f); t.set_action(() => { if (Time.time > last_public_call) { last_public_call = Time.time + 65; MelonModLogger.Log("getting pubs for user: "******" / " + hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0.authorName); if (hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0 == null) { return; } if (hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0.authorId == "") { return; } pubavatar.update_public_user_list(hashmod.pub_list.listing_avatars.avatarPedestal.field_Internal_ApiAvatar_0.authorId); } else { var sec_left = last_public_call - Time.time; hashmod.error_type_poput("Function is still on cooldown!", "Please wait " + sec_left + " seconds before trying again!"); } }); }
public override void OnApplicationStart() { MelonModLogger.Log("initial load"); MelonModLogger.Log("<Controls>"); MelonModLogger.Log("PageUp -> Increase Jump"); MelonModLogger.Log("PageDown -> Decrease Jump"); }
internal SteamTransportConnection(ulong id, P2PMessage initialMessage) { ConnectedTo = id; SendMessage(initialMessage, MessageSendType.Reliable); MelonModLogger.Log($"Steam: Sent initial message to {id}"); }
private void PlayerHooks_OnPlayerGrabObject(GameObject obj) { // See if it's a gun GunType?gt = BWUtil.GetGunType(obj.transform.root.gameObject); if (gt != null) { HandGunChangeMessage hgcm = new HandGunChangeMessage() { isForOtherPlayer = true, type = gt.Value, destroy = false, playerId = 0 }; ServerSendToAll(hgcm, MessageSendType.Reliable); switch (gt) { case GunType.EDER22: MelonModLogger.Log("Holding Eder22"); break; } } }