From ac2cc258ee9bc100880749128e7120548fa1817e Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Sun, 4 May 2025 16:11:06 +0800 Subject: [PATCH] UXAssist: tweak autonav a bit --- UXAssist/Patches/PlayerPatch.cs | 8 ++++---- UXAssist/TODO.md | 1 - UXAssist/UI/MyCornerComboBox.cs | 3 ++- UXAssist/UXAssist.csproj | 2 +- UXAssist/package/manifest.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/UXAssist/Patches/PlayerPatch.cs b/UXAssist/Patches/PlayerPatch.cs index 3a38e3c..e9b2e06 100644 --- a/UXAssist/Patches/PlayerPatch.cs +++ b/UXAssist/Patches/PlayerPatch.cs @@ -393,7 +393,7 @@ public class PlayerPatch : PatchImpl { EAstroType.Planet => 800.0 + astro.uRadius, EAstroType.Star => 4000.0 + astro.uRadius, - EAstroType.EnemyHive => 400.0, + EAstroType.EnemyHive => 800.0, _ => 2000.0 + astro.uRadius }) { @@ -434,9 +434,9 @@ public class PlayerPatch : PatchImpl if (hiveSys.realized && hiveSys.hiveAstroId > 1000000) { ref var hiveAstro = ref GameMain.spaceSector.astros[hiveSys.hiveAstroId - 1000000]; - /* Divide by 4, so that the real range is 2 times of the calculated range, - which means the minimal range allowed is 4000 */ - var range = (playerPos - hiveAstro.uPos).sqrMagnitude / 4.0; + /* Divide by 36, so that the real range is 6 times of the calculated range, + which means the minimal range allowed is 12000 */ + var range = (playerPos - hiveAstro.uPos).sqrMagnitude / 36.0; if (range < nearestRange) { nearestRange = range; diff --git a/UXAssist/TODO.md b/UXAssist/TODO.md index 514ddd5..4e8039f 100644 --- a/UXAssist/TODO.md +++ b/UXAssist/TODO.md @@ -1,2 +1 @@ #### TODO -* Auto-navigation: avoid darkfogs diff --git a/UXAssist/UI/MyCornerComboBox.cs b/UXAssist/UI/MyCornerComboBox.cs index a03152a..cf5fd0d 100644 --- a/UXAssist/UI/MyCornerComboBox.cs +++ b/UXAssist/UI/MyCornerComboBox.cs @@ -59,7 +59,8 @@ public class MyCornerComboBox : MonoBehaviour protected void OnDestroy() { - _config.SettingChanged -= _configChanged; + if (_config != null && _configChanged != null) + _config.SettingChanged -= _configChanged; } public void SetFontSize(int size) diff --git a/UXAssist/UXAssist.csproj b/UXAssist/UXAssist.csproj index 6339dd7..177c328 100644 --- a/UXAssist/UXAssist.csproj +++ b/UXAssist/UXAssist.csproj @@ -4,7 +4,7 @@ net472 org.soardev.uxassist DSP MOD - UXAssist - 1.3.2 + 1.3.3 true latest UXAssist diff --git a/UXAssist/package/manifest.json b/UXAssist/package/manifest.json index 5a238a8..8acb6f9 100644 --- a/UXAssist/package/manifest.json +++ b/UXAssist/package/manifest.json @@ -1,6 +1,6 @@ { "name": "UXAssist", - "version_number": "1.3.2", + "version_number": "1.3.3", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist", "description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁", "dependencies": [