From 2d2602d8b9da9e048234d33622a67492dfda5ee4 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Thu, 19 Sep 2024 23:53:02 +0800 Subject: [PATCH] new UXAssist and CheatEnabler release --- CheatEnabler/CHANGELOG.md | 8 +++ CheatEnabler/CheatEnabler.csproj | 2 +- CheatEnabler/Patches/FactoryPatch.cs | 3 - CheatEnabler/package/manifest.json | 4 +- UXAssist/CHANGELOG.md | 34 +++++++++ UXAssist/ModsCompat/BulletTimeWrapper.cs | 3 + UXAssist/Patches/FactoryPatch.cs | 23 ++++--- UXAssist/Patches/GamePatch.cs | 38 +++++++++++ UXAssist/Patches/LogisticsPatch.cs | 87 +++++++++++------------- UXAssist/README.md | 18 +++++ UXAssist/UXAssist.cs | 8 +-- UXAssist/UXAssist.csproj | 2 +- UXAssist/package/manifest.json | 2 +- 13 files changed, 166 insertions(+), 66 deletions(-) diff --git a/CheatEnabler/CHANGELOG.md b/CheatEnabler/CHANGELOG.md index 27fa0fb..2757b2f 100644 --- a/CheatEnabler/CHANGELOG.md +++ b/CheatEnabler/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changlog +* 2.3.26 + + Refactor codes to adapt to UXAssist 1.2.0 + - You should update UXAssist to 1.2.0 or later before using this version. + + `Complete Dyson Sphere Shells instantly`: Fix possible wrong production records. * 2.3.25 + New feature: `Enable warp without space warpers` + New feature: `Wind Turbines do global power coverage` @@ -131,6 +135,10 @@ ## 更新日志 +* 2.3.26 + + 重构代码以适应UXAssist 1.2.0 + - 在使用此版本之前,您应先更新UXAssist到1.2.0或更高版本。 + + `立即完成戴森壳建造`:修复了可能导致错误的生产记录的问题 * 2.3.25 + 新功能:`无需空间翘曲器即可曲速飞行` + 新功能:`风力涡轮机供电覆盖全球` diff --git a/CheatEnabler/CheatEnabler.csproj b/CheatEnabler/CheatEnabler.csproj index 94bd939..801dbeb 100644 --- a/CheatEnabler/CheatEnabler.csproj +++ b/CheatEnabler/CheatEnabler.csproj @@ -5,7 +5,7 @@ net472 org.soardev.cheatenabler DSP MOD - CheatEnabler - 2.3.25 + 2.3.26 true latest CheatEnabler diff --git a/CheatEnabler/Patches/FactoryPatch.cs b/CheatEnabler/Patches/FactoryPatch.cs index 3fc29e3..05dd0e1 100644 --- a/CheatEnabler/Patches/FactoryPatch.cs +++ b/CheatEnabler/Patches/FactoryPatch.cs @@ -237,15 +237,12 @@ public class FactoryPatch: PatchImpl { if (NoConditionEnabled.Value) { - CheatEnabler.Logger.LogDebug("A"); w.criticalWarningTexts = "Build without condition is enabled!".Translate() + "\r\n"; } else if (NoCollisionEnabled.Value) { - CheatEnabler.Logger.LogDebug("B"); w.criticalWarningTexts = "No collision is enabled!".Translate() + "\r\n"; } - CheatEnabler.Logger.LogDebug("C"); } ) ); diff --git a/CheatEnabler/package/manifest.json b/CheatEnabler/package/manifest.json index 39dbbba..598aa0d 100644 --- a/CheatEnabler/package/manifest.json +++ b/CheatEnabler/package/manifest.json @@ -1,10 +1,10 @@ { "name": "CheatEnabler", - "version_number": "2.3.25", + "version_number": "2.3.26", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler", "description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测", "dependencies": [ "xiaoye97-BepInEx-5.4.17", - "soarqin-UXAssist-1.1.5" + "soarqin-UXAssist-1.2.0" ] } diff --git a/UXAssist/CHANGELOG.md b/UXAssist/CHANGELOG.md index c3b9c0f..0943496 100644 --- a/UXAssist/CHANGELOG.md +++ b/UXAssist/CHANGELOG.md @@ -1,5 +1,22 @@ ## Changlog +* 1.2.1 + + `Off-grid building and stepped rotation`: + - Fix off-grid building's default shortcut key for belts + - Fix coordinate display issue +* 1.2.0 + + New feature: `Logical Frame Rate` + - This will change game running speed, down to 0.1x slower and up to 10x faster. + - A pair of shortcut keys (`-` and `+`) to change the logical frame rate by -0.5x and +0.5x. + - Note: + - High logical frame rate is not guaranteed to be stable, especially when factories are under heavy load. + - This will not affect some game animations. + - When set game speed in mod `Auxilaryfunction`, this feature will be disabled. + - When mod `BulletTime` is installed, this feature will be hidden, but patch `BulletTime`'s speed control, to make its maximum speed 10x. + + `Off-grid building and stepped rotation`: Due to conflict with shortcut key in new game update, the shortcut key for belts is changed to `Ctrl` by default, and can be set in system options now. + + `Real-time logistic stations info panel`: Fix a crash issue. + + `Dyson Sphere "Auto Fast Build"`: Fix possible wrong production records. + + Codes refactored, for better maintainability. * 1.1.6 + New feature: `Scale up mouse cursor` - Note: This will enable software cursor mode, which may cause mouse movement lag on heavy load. @@ -161,6 +178,23 @@ ## 更新日志 +* 1.2.1 + + `脱离网格建造和小角度旋转`: + - 修复了传送带脱离网格建造的默认快捷键 + - 修复了坐标显示问题 +* 1.2.0 + + 新功能:`逻辑帧倍率` + - 这将改变游戏运行速度,最慢0.1倍,最快10倍 + - 设置了一对快捷键(`-`和`+`),可以-/+0.5倍改变逻辑帧倍率 + - 注意: + - 高逻辑帧倍率不能保证稳定性,特别是在工厂负载较重时 + - 这不会影响一些游戏动画 + - 当在`Auxilaryfunction`mod中设置游戏速度时,此功能将被禁用 + - 当安装了`BulletTime`mod时,此功能将被隐藏,但会对`BulletTime`的速度控制打补丁,使其最大速度变为10倍 + + `脱离网格建造和小角度旋转`:由于与新游戏更新中的快捷键冲突,传送带脱离网格建造的快捷键默认更改为`Ctrl`,并且现在可以在系统选项中设置 + + `物流运输站实时信息面板`:修复了一个崩溃问题 + + `戴森球自动快速建造`:修复了可能出现的错误生产记录 + + 代码重构,以获得更好的可维护性 * 1.1.6 + 新功能:`放大鼠标指针` - 注意:这将启用软件指针模式,可能会在CPU负载较重时导致鼠标移动延迟 diff --git a/UXAssist/ModsCompat/BulletTimeWrapper.cs b/UXAssist/ModsCompat/BulletTimeWrapper.cs index 03cd618..e55bf37 100644 --- a/UXAssist/ModsCompat/BulletTimeWrapper.cs +++ b/UXAssist/ModsCompat/BulletTimeWrapper.cs @@ -15,7 +15,10 @@ public static class BulletTimeWrapper { HasBulletTime = BepInEx.Bootstrap.Chainloader.PluginInfos.TryGetValue(BulletTimeGuid, out var pluginInfo); if (!HasBulletTime) return; + I18N.Add("Increase game speed (max 10x)", "Increase game speed (max 10x)", "提升游戏速度(最高10倍)"); + I18N.Apply(); + var assembly = pluginInfo.Instance.GetType().Assembly; try { diff --git a/UXAssist/Patches/FactoryPatch.cs b/UXAssist/Patches/FactoryPatch.cs index 5e4695e..7ef1bb9 100644 --- a/UXAssist/Patches/FactoryPatch.cs +++ b/UXAssist/Patches/FactoryPatch.cs @@ -43,7 +43,7 @@ public class FactoryPatch: PatchImpl I18N.Add("KEYToggleDoNotRenderEntities", "Toggle Do Not Render Factory Entities", "切换不渲染工厂建筑实体"); _offgridfForPathsKey = KeyBindings.RegisterKeyBinding(new BuiltinKey { - key = new CombineKey((int)KeyCode.LeftControl, 0, ECombineKeyAction.OnceClick, false), + key = new CombineKey(0, CombineKey.CTRL_COMB, ECombineKeyAction.OnceClick, false), conflictGroup = KeyBindConflict.MOVEMENT | KeyBindConflict.UI | KeyBindConflict.FLYING | KeyBindConflict.SAILING | KeyBindConflict.BUILD_MODE_1 | KeyBindConflict.KEYBOARD_KEYBIND, name = "OffgridForPaths", canOverride = true @@ -526,12 +526,11 @@ public class FactoryPatch: PatchImpl public class OffGridBuilding: PatchImpl { - private const float SteppedRotationDegrees = 15f; + // private const float SteppedRotationDegrees = 15f; private static bool _initialized; - [HarmonyPostfix, HarmonyPatch(typeof(UIRoot), "_OnOpen")] - public static void UIRoot__OnOpen_Postfix() + private static void SetupRichTextSupport() { if (_initialized) return; UIGeneralTips.instance.buildCursorTextComp.supportRichText = true; @@ -575,6 +574,7 @@ public class FactoryPatch: PatchImpl var planet = __instance.planet; if (_lastPlanet != planet || _lastPos != preview.lpos) { + SetupRichTextSupport(); CalculateGridOffset(__instance.planet, preview.lpos, out var x, out var y, out var z); _lastPlanet = planet; _lastPos = preview.lpos; @@ -605,6 +605,7 @@ public class FactoryPatch: PatchImpl var planet = entityBriefInfo.factory.planet; if (_lastPlanet != planet || _lastPos != entity.pos) { + SetupRichTextSupport(); CalculateGridOffset(planet, entity.pos, out var x, out var y, out var z); _lastPlanet = planet; _lastPos = entity.pos; @@ -684,6 +685,13 @@ public class FactoryPatch: PatchImpl return matcher.InstructionEnumeration(); } + + private static bool CheckOffgridForPathsKeyPressed() + { + ref var bind = ref _offgridfForPathsKey.defaultBind; + ref var key = ref VFInput.override_keys[bind.id]; + return key.IsNull() ? bind.key.GetKey() : key.GetKey(); + } [HarmonyTranspiler] [HarmonyPatch(typeof(BuildTool_Path), nameof(BuildTool_Path.UpdateRaycast))] @@ -709,8 +717,7 @@ public class FactoryPatch: PatchImpl var jmp0 = generator.DefineLabel(); var jmp1 = generator.DefineLabel(); matcher.InsertAndAdvance( - new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(FactoryPatch), nameof(_offgridfForPathsKey))), - new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(PressKeyBind), nameof(PressKeyBind.keyValue))), + new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(OffGridBuilding), nameof(CheckOffgridForPathsKeyPressed))), new CodeInstruction(OpCodes.Brfalse, jmp0), new CodeInstruction(OpCodes.Ldarg_0), new CodeInstruction(OpCodes.Ldarg_0), @@ -1662,7 +1669,7 @@ public class FactoryPatch: PatchImpl GameLogic.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix; } - public static void VFPreload_InvokeOnLoadWorkEnded_Postfix() + private static void VFPreload_InvokeOnLoadWorkEnded_Postfix() { if (_initialized) return; _initialized = true; @@ -1680,7 +1687,7 @@ public class FactoryPatch: PatchImpl RemovePlanetSignalBelts(factory.index); } - public static void GameMain_Begin_Postfix() + private static void GameMain_Begin_Postfix() { _clusterSeedKey = GameMain.data.GetClusterSeedKey(); InitSignalBelts(); diff --git a/UXAssist/Patches/GamePatch.cs b/UXAssist/Patches/GamePatch.cs index bfb5bab..8391085 100644 --- a/UXAssist/Patches/GamePatch.cs +++ b/UXAssist/Patches/GamePatch.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Reflection.Emit; using BepInEx.Configuration; +using CommonAPI.Systems; using HarmonyLib; using UnityEngine; using UXAssist.Common; @@ -26,6 +27,8 @@ public class GamePatch: PatchImpl public static ConfigEntry DefaultProfileName; public static ConfigEntry GameUpsFactor; + private static PressKeyBind _speedDownKey; + private static PressKeyBind _speedUpKey; private static bool _enableGameUpsFactor = true; public static bool EnableGameUpsFactor { @@ -52,6 +55,26 @@ public class GamePatch: PatchImpl public static void Init() { + _speedDownKey = KeyBindings.RegisterKeyBinding(new BuiltinKey + { + key = new CombineKey((int)KeyCode.KeypadMinus, 0, ECombineKeyAction.OnceClick, false), + conflictGroup = KeyBindConflict.MOVEMENT | KeyBindConflict.FLYING | KeyBindConflict.SAILING | KeyBindConflict.BUILD_MODE_1 | KeyBindConflict.KEYBOARD_KEYBIND, + name = "UPSSpeedDown", + canOverride = true + } + ); + I18N.Add("KEYUPSSpeedDown", "Decrease logical frame rate", "降低逻辑帧率"); + _speedUpKey = KeyBindings.RegisterKeyBinding(new BuiltinKey + { + key = new CombineKey((int)KeyCode.KeypadPlus, 0, ECombineKeyAction.OnceClick, false), + conflictGroup = KeyBindConflict.MOVEMENT | KeyBindConflict.UI | KeyBindConflict.FLYING | KeyBindConflict.SAILING | KeyBindConflict.BUILD_MODE_1 | KeyBindConflict.KEYBOARD_KEYBIND, + name = "UPSSpeedUp", + canOverride = true + } + ); + I18N.Add("KEYUPSSpeedUp", "Increase logical frame rate", "提升逻辑帧率"); + I18N.Add("Logical frame rate: {0}x", "Logical frame rate: {0}x", "逻辑帧速率: {0}x"); + // Get profile name from command line arguments, and set window title accordingly var args = Environment.GetCommandLineArgs(); for (var i = 0; i < args.Length - 1; i++) @@ -120,6 +143,21 @@ public class GamePatch: PatchImpl ConvertSavesFromPeace.Enable(false); } + public static void OnUpdate() + { + if (!_enableGameUpsFactor) return; + if (_speedDownKey.keyValue) + { + GameUpsFactor.Value = Maths.Clamp(Math.Round((GameUpsFactor.Value - 0.5) * 2.0) / 2.0, 0.1, 10.0); + UIRoot.instance.uiGame.generalTips.InvokeRealtimeTipAhead(string.Format("Logical frame rate: {0}x".Translate(), GameUpsFactor.Value)); + } + if (_speedUpKey.keyValue) + { + GameUpsFactor.Value = Maths.Clamp(Math.Round((GameUpsFactor.Value + 0.5) * 2.0) / 2.0, 0.1, 10.0); + UIRoot.instance.uiGame.generalTips.InvokeRealtimeTipAhead(string.Format("Logical frame rate: {0}x".Translate(), GameUpsFactor.Value)); + } + } + private static void RefreshSavePath() { if (ProfileName == null) return; diff --git a/UXAssist/Patches/LogisticsPatch.cs b/UXAssist/Patches/LogisticsPatch.cs index 752cf99..ecefe52 100644 --- a/UXAssist/Patches/LogisticsPatch.cs +++ b/UXAssist/Patches/LogisticsPatch.cs @@ -837,7 +837,7 @@ public static class LogisticsPatch stationTip.rectTransform.anchoredPosition = rectPoint; stationTip.transform.localScale = Vector3.one * localScaleMultiple; - stationTip.UpdateStationInfo(stationComponent, factory); + stationTip.UpdateStationInfo(stationComponent); } } @@ -867,7 +867,6 @@ public static class LogisticsPatch private Text[] _carrierIdleCountText; private GameObject _infoText; - private StationComponent _currentStation; private EStationTipLayout _layout = EStationTipLayout.None; private int _storageNum; private float _pixelPerItem; @@ -964,7 +963,6 @@ public static class LogisticsPatch public void ResetStationTip() { - _currentStation = null; _layout = EStationTipLayout.None; for (var i = StorageSlotCount - 1; i >= 0; i--) { @@ -1178,55 +1176,52 @@ public static class LogisticsPatch private static readonly float[] TipWindowExtraHeights = [0f, 5f, 5f, 40f, 40f]; private static readonly float[] CarrierPositionX = [5f, 35f, 85f]; - public void UpdateStationInfo(StationComponent stationComponent, PlanetFactory factory) + public void UpdateStationInfo(StationComponent stationComponent) { - if (_currentStation != stationComponent) + var layout = stationComponent.isCollector ? EStationTipLayout.Collector : + stationComponent.isVeinCollector ? EStationTipLayout.VeinCollector : + stationComponent.isStellar ? EStationTipLayout.InterstellarLogistics : EStationTipLayout.PlanetaryLogistics; + + if (_layout != layout) { - _currentStation = stationComponent; - var layout = stationComponent.isCollector ? EStationTipLayout.Collector : - stationComponent.isVeinCollector ? EStationTipLayout.VeinCollector : - stationComponent.isStellar ? EStationTipLayout.InterstellarLogistics : EStationTipLayout.PlanetaryLogistics; - - if (_layout != layout) + _layout = layout; + for (var i = StorageSlotCount - 1; i >= 0; i--) { - _layout = layout; - for (var i = StorageSlotCount - 1; i >= 0; i--) + _iconLocals[i].gameObject.SetActive(false); + _iconRemotes[i].gameObject.SetActive(false); + _icons[i].gameObject.SetActive(false); + switch (layout) { - _iconLocals[i].gameObject.SetActive(false); - _iconRemotes[i].gameObject.SetActive(false); - _icons[i].gameObject.SetActive(false); - switch (layout) - { - case EStationTipLayout.PlanetaryLogistics: - var rectTrans = (RectTransform)_iconLocals[i].transform; - rectTrans.sizeDelta = new Vector2(20f, 20f); - rectTrans.anchoredPosition3D = new Vector3(100f, -5f - 35f * i - 5f, 0); - break; - case EStationTipLayout.InterstellarLogistics: - rectTrans = (RectTransform)_iconLocals[i].transform; - rectTrans.sizeDelta = new Vector2(16f, 16f); - rectTrans.anchoredPosition3D = new Vector3(102f, -5f - 35f * i, 0); - break; - } + case EStationTipLayout.PlanetaryLogistics: + var rectTrans = (RectTransform)_iconLocals[i].transform; + rectTrans.sizeDelta = new Vector2(20f, 20f); + rectTrans.anchoredPosition3D = new Vector3(100f, -5f - 35f * i - 5f, 0); + break; + case EStationTipLayout.InterstellarLogistics: + rectTrans = (RectTransform)_iconLocals[i].transform; + rectTrans.sizeDelta = new Vector2(16f, 16f); + rectTrans.anchoredPosition3D = new Vector3(102f, -5f - 35f * i, 0); + break; } - - _storageNum = Math.Min(StorageNums[(int)layout], stationComponent.storage.Length); - rectTransform.sizeDelta = new Vector2(TipWindowWidths[(int)layout], TipWindowExtraHeights[(int)layout] + 35f * _storageNum); - for (var i = StorageSlotCount - 1; i >= 0; i--) - { - _countTexts[i].gameObject.SetActive(i < _storageNum); - } - - for (var i = CarrierSlotCount - 1; i >= 0; i--) - { - var active = CarrierEnabled[(int)layout][i]; - _carrierIcons[i].gameObject.SetActive(active); - if (!active) continue; - var rectTrans = (RectTransform)_carrierIcons[i].transform; - rectTrans.anchoredPosition3D = new Vector3(CarrierPositionX[i], -5f - 35f * _storageNum, 0); - } - _pixelPerItem = _layout == EStationTipLayout.InterstellarLogistics ? _remoteStoragePixelPerItem : _localStoragePixelPerItem; } + + _storageNum = Math.Min(StorageNums[(int)layout], stationComponent.storage.Length); + rectTransform.sizeDelta = new Vector2(TipWindowWidths[(int)layout], TipWindowExtraHeights[(int)layout] + 35f * _storageNum); + for (var i = StorageSlotCount - 1; i >= 0; i--) + { + _countTexts[i].gameObject.SetActive(i < _storageNum); + } + + for (var i = CarrierSlotCount - 1; i >= 0; i--) + { + var active = CarrierEnabled[(int)layout][i]; + _carrierIcons[i].gameObject.SetActive(active); + if (!active) continue; + var rectTrans = (RectTransform)_carrierIcons[i].transform; + rectTrans.anchoredPosition3D = new Vector3(CarrierPositionX[i], -5f - 35f * _storageNum, 0); + } + + _pixelPerItem = _layout == EStationTipLayout.InterstellarLogistics ? _remoteStoragePixelPerItem : _localStoragePixelPerItem; } var storageArray = stationComponent.storage; diff --git a/UXAssist/README.md b/UXAssist/README.md index 104f65d..05ad0ce 100644 --- a/UXAssist/README.md +++ b/UXAssist/README.md @@ -26,6 +26,14 @@ - Mod manager profile based save folder - Save files are stored in `Save\` folder. - Will use original save location if matching default profile name. + - Logical Frame Rate + - This will change game running speed, down to 0.1x slower and up to 10x faster. + - A pair of shortcut keys (`-` and `+`) to change the logical frame rate by -0.5x and +0.5x. + - Note: + - High logical frame rate is not guaranteed to be stable, especially when factories are under heavy load. + - This will not affect some game animations. + - When set game speed in mod `Auxilaryfunction`, this feature will be disabled. + - When mod `BulletTime` is installed, this feature will be hidden, but patch `BulletTime`'s speed control, to make its maximum speed 10x. - Increase maximum count of Metadata Instantiations to 20000 (from 2000) - Increase capacity of player order queue to 128 (from 16) + Planet/Factory @@ -34,6 +42,7 @@ - Remove build count and range limit - Larger area for upgrade and dismantle(30x30 at max) - Larger area for terraform(30x30 at max) + - Off-grid building and stepped rotation - Treat stack items as single in monitor components - Enhanced control for logistic storage limits - Logistic storage limits are not scaled on upgrading `Logistics Carrier Capacity`, if they are not set to maximum capacity. @@ -130,6 +139,14 @@ - 基于mod管理器配置档案名的存档文件夹 - 存档文件会存储在`Save\`文件夹中 - 如果匹配默认配置档案名则使用原始存档位置 + - 逻辑帧倍率 + - 这将改变游戏运行速度,最慢0.1倍,最快10倍 + - 设置了一对快捷键(`-`和`+`),可以-/+0.5倍改变逻辑帧倍率 + - 注意: + - 高逻辑帧倍率不能保证稳定性,特别是在工厂负载较重时 + - 这不会影响一些游戏动画 + - 当在`Auxilaryfunction`mod中设置游戏速度时,此功能将被禁用 + - 当安装了`BulletTime`mod时,此功能将被隐藏,但会对`BulletTime`的速度控制打补丁,使其最大速度变为10倍 - 将元数据提取的最大数量增加到20000(原来为2000) - 将玩家指令队列的容量增加到128(原来为16) + 行星/工厂 @@ -137,6 +154,7 @@ - 移除部分不影响游戏逻辑的建造条件 - 范围升级和拆除的最大区域扩大(最大30x30) - 范围铺设地基的最大区域扩大(最大30x30) + - 脱离网格建造以及小角度旋转 - 在流速计中将堆叠物品视为单个物品 - 物流塔存储数量限制控制改进 - 当升级`运输机舱扩容`时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。 diff --git a/UXAssist/UXAssist.cs b/UXAssist/UXAssist.cs index 47e831d..13449d6 100644 --- a/UXAssist/UXAssist.cs +++ b/UXAssist/UXAssist.cs @@ -166,10 +166,6 @@ public class UXAssist : BaseUnityPlugin, IModCanSave _patches = Common.Util.GetTypesInNamespace(Assembly.GetExecutingAssembly(), "UXAssist.Patches"); _patches?.Do(type => type.GetMethod("Init")?.Invoke(null, null)); - var patch = UIPatch.GetHarmony(); - ModsCompat.AuxilaryfunctionWrapper.Init(patch); - ModsCompat.BulletTimeWrapper.Init(patch); - I18N.Apply(); I18N.OnInitialized += RecreateConfigWindow; } @@ -177,6 +173,9 @@ public class UXAssist : BaseUnityPlugin, IModCanSave private void Start() { _patches?.Do(type => type.GetMethod("Start")?.Invoke(null, null)); + var patch = UIPatch.GetHarmony(); + ModsCompat.AuxilaryfunctionWrapper.Init(patch); + ModsCompat.BulletTimeWrapper.Init(patch); } private void OnDestroy() @@ -200,6 +199,7 @@ public class UXAssist : BaseUnityPlugin, IModCanSave { ToggleConfigWindow(); } + GamePatch.OnUpdate(); FactoryPatch.OnUpdate(); PlayerPatch.OnUpdate(); LogisticsPatch.OnUpdate(); diff --git a/UXAssist/UXAssist.csproj b/UXAssist/UXAssist.csproj index 5a1a622..64bf877 100644 --- a/UXAssist/UXAssist.csproj +++ b/UXAssist/UXAssist.csproj @@ -4,7 +4,7 @@ net472 org.soardev.uxassist DSP MOD - UXAssist - 1.1.6 + 1.2.1 true latest UXAssist diff --git a/UXAssist/package/manifest.json b/UXAssist/package/manifest.json index 6e6b6f5..44c62e4 100644 --- a/UXAssist/package/manifest.json +++ b/UXAssist/package/manifest.json @@ -1,6 +1,6 @@ { "name": "UXAssist", - "version_number": "1.1.6", + "version_number": "1.2.1", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist", "description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁", "dependencies": [