From ae8f049c1bfc0fa66c70681e36bcd347ac0b903f Mon Sep 17 00:00:00 2001 From: Gurge44 Date: Thu, 26 Feb 2026 10:04:31 +0100 Subject: [PATCH] msg --- Modules/OnlinePresetsManager.cs | 11 ++++++----- Resources/Lang/en_US.jsonc | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Modules/OnlinePresetsManager.cs b/Modules/OnlinePresetsManager.cs index 42fd76738..8dc7a98c9 100644 --- a/Modules/OnlinePresetsManager.cs +++ b/Modules/OnlinePresetsManager.cs @@ -97,8 +97,11 @@ public static class OnlinePresetsManager row.MinusBtn.OnClick.AddListener((UnityAction)(() => { GameSettingMenu.Instance.Close(); + Prompt.Show(Translator.GetString("Promt.ApplyPreset"), () => { + Logger.SendInGame(Translator.GetString("DownloadingPreset")); + Main.Instance.StartCoroutine( DownloadPreset(preset.id, downloadedPreset => { @@ -112,11 +115,7 @@ public static class OnlinePresetsManager OptionItem.SyncAllOptions(); OptionSaver.Save(); - LateTask.New(() => - { - if (!GameStates.IsLobby) return; - GameObject.Find("Host Buttons").transform.FindChild("Edit").GetComponent().ReceiveClickDown(); - }, 0.1f); + Logger.SendInGame(Translator.GetString("PresetApplied"), Color.green); }) ); }, () => @@ -235,6 +234,8 @@ public static class OnlinePresetsManager { UnityWebRequest request = UnityWebRequest.Get($"https://gurge44.pythonanywhere.com/presets/{presetId}"); + request.timeout = 5; + yield return request.SendWebRequest(); if (request.result != UnityWebRequest.Result.Success) diff --git a/Resources/Lang/en_US.jsonc b/Resources/Lang/en_US.jsonc index 6129574dc..8fd930267 100644 --- a/Resources/Lang/en_US.jsonc +++ b/Resources/Lang/en_US.jsonc @@ -10440,6 +10440,8 @@ ============================== */ "PressF1ShowMainRoleDes": "F1: Show Full Role/Add-ons Info\\nOn the joystick use the right stick (R3/RSB)", "PromotedSKCanRecruit": "New Jackal can recruit new Sidekick", + "DownloadingPreset": "Downloading preset....", + "PresetApplied": "Preset applied successfully!", "Promt.ApplyPreset": "<#ffff00>⚠ WARNING ⚠\\nApplying this preset OVERRIDES your current preset! Back it up if you need it or switch to an unused preset slot. It will be permanently deleted!\\nDo you wish to proceed?", "Promt.EnableAllRoles": "Enable all roles and add-ons?\\n\\nYes - Enable all roles and add-ons\\nNo - Enter the quick setup dialog of roles and add-ons", "Promt.EnableRole": "({0}/{1}) {2}\\nEnable {3}?\\n\\n{4}",