mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 21:33:28 +08:00
new UXAssist and CheatEnabler release
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
## Changlog
|
## 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
|
* 2.3.25
|
||||||
+ New feature: `Enable warp without space warpers`
|
+ New feature: `Enable warp without space warpers`
|
||||||
+ New feature: `Wind Turbines do global power coverage`
|
+ 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
|
* 2.3.25
|
||||||
+ 新功能:`无需空间翘曲器即可曲速飞行`
|
+ 新功能:`无需空间翘曲器即可曲速飞行`
|
||||||
+ 新功能:`风力涡轮机供电覆盖全球`
|
+ 新功能:`风力涡轮机供电覆盖全球`
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid>
|
<BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid>
|
||||||
<Description>DSP MOD - CheatEnabler</Description>
|
<Description>DSP MOD - CheatEnabler</Description>
|
||||||
<Version>2.3.25</Version>
|
<Version>2.3.26</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<PackageId>CheatEnabler</PackageId>
|
<PackageId>CheatEnabler</PackageId>
|
||||||
|
|||||||
@@ -237,15 +237,12 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
{
|
{
|
||||||
if (NoConditionEnabled.Value)
|
if (NoConditionEnabled.Value)
|
||||||
{
|
{
|
||||||
CheatEnabler.Logger.LogDebug("A");
|
|
||||||
w.criticalWarningTexts = "Build without condition is enabled!".Translate() + "\r\n";
|
w.criticalWarningTexts = "Build without condition is enabled!".Translate() + "\r\n";
|
||||||
}
|
}
|
||||||
else if (NoCollisionEnabled.Value)
|
else if (NoCollisionEnabled.Value)
|
||||||
{
|
{
|
||||||
CheatEnabler.Logger.LogDebug("B");
|
|
||||||
w.criticalWarningTexts = "No collision is enabled!".Translate() + "\r\n";
|
w.criticalWarningTexts = "No collision is enabled!".Translate() + "\r\n";
|
||||||
}
|
}
|
||||||
CheatEnabler.Logger.LogDebug("C");
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "CheatEnabler",
|
"name": "CheatEnabler",
|
||||||
"version_number": "2.3.25",
|
"version_number": "2.3.26",
|
||||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
|
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
|
||||||
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
|
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"xiaoye97-BepInEx-5.4.17",
|
"xiaoye97-BepInEx-5.4.17",
|
||||||
"soarqin-UXAssist-1.1.5"
|
"soarqin-UXAssist-1.2.0"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
## Changlog
|
## 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
|
* 1.1.6
|
||||||
+ New feature: `Scale up mouse cursor`
|
+ New feature: `Scale up mouse cursor`
|
||||||
- Note: This will enable software cursor mode, which may cause mouse movement lag on heavy load.
|
- 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
|
* 1.1.6
|
||||||
+ 新功能:`放大鼠标指针`
|
+ 新功能:`放大鼠标指针`
|
||||||
- 注意:这将启用软件指针模式,可能会在CPU负载较重时导致鼠标移动延迟
|
- 注意:这将启用软件指针模式,可能会在CPU负载较重时导致鼠标移动延迟
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ public static class BulletTimeWrapper
|
|||||||
{
|
{
|
||||||
HasBulletTime = BepInEx.Bootstrap.Chainloader.PluginInfos.TryGetValue(BulletTimeGuid, out var pluginInfo);
|
HasBulletTime = BepInEx.Bootstrap.Chainloader.PluginInfos.TryGetValue(BulletTimeGuid, out var pluginInfo);
|
||||||
if (!HasBulletTime) return;
|
if (!HasBulletTime) return;
|
||||||
|
|
||||||
I18N.Add("Increase game speed (max 10x)", "Increase game speed (max 10x)", "提升游戏速度(最高10倍)");
|
I18N.Add("Increase game speed (max 10x)", "Increase game speed (max 10x)", "提升游戏速度(最高10倍)");
|
||||||
|
I18N.Apply();
|
||||||
|
|
||||||
var assembly = pluginInfo.Instance.GetType().Assembly;
|
var assembly = pluginInfo.Instance.GetType().Assembly;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
I18N.Add("KEYToggleDoNotRenderEntities", "Toggle Do Not Render Factory Entities", "切换不渲染工厂建筑实体");
|
I18N.Add("KEYToggleDoNotRenderEntities", "Toggle Do Not Render Factory Entities", "切换不渲染工厂建筑实体");
|
||||||
_offgridfForPathsKey = KeyBindings.RegisterKeyBinding(new BuiltinKey
|
_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,
|
conflictGroup = KeyBindConflict.MOVEMENT | KeyBindConflict.UI | KeyBindConflict.FLYING | KeyBindConflict.SAILING | KeyBindConflict.BUILD_MODE_1 | KeyBindConflict.KEYBOARD_KEYBIND,
|
||||||
name = "OffgridForPaths",
|
name = "OffgridForPaths",
|
||||||
canOverride = true
|
canOverride = true
|
||||||
@@ -526,12 +526,11 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
public class OffGridBuilding: PatchImpl<OffGridBuilding>
|
public class OffGridBuilding: PatchImpl<OffGridBuilding>
|
||||||
{
|
{
|
||||||
private const float SteppedRotationDegrees = 15f;
|
// private const float SteppedRotationDegrees = 15f;
|
||||||
|
|
||||||
private static bool _initialized;
|
private static bool _initialized;
|
||||||
|
|
||||||
[HarmonyPostfix, HarmonyPatch(typeof(UIRoot), "_OnOpen")]
|
private static void SetupRichTextSupport()
|
||||||
public static void UIRoot__OnOpen_Postfix()
|
|
||||||
{
|
{
|
||||||
if (_initialized) return;
|
if (_initialized) return;
|
||||||
UIGeneralTips.instance.buildCursorTextComp.supportRichText = true;
|
UIGeneralTips.instance.buildCursorTextComp.supportRichText = true;
|
||||||
@@ -575,6 +574,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
var planet = __instance.planet;
|
var planet = __instance.planet;
|
||||||
if (_lastPlanet != planet || _lastPos != preview.lpos)
|
if (_lastPlanet != planet || _lastPos != preview.lpos)
|
||||||
{
|
{
|
||||||
|
SetupRichTextSupport();
|
||||||
CalculateGridOffset(__instance.planet, preview.lpos, out var x, out var y, out var z);
|
CalculateGridOffset(__instance.planet, preview.lpos, out var x, out var y, out var z);
|
||||||
_lastPlanet = planet;
|
_lastPlanet = planet;
|
||||||
_lastPos = preview.lpos;
|
_lastPos = preview.lpos;
|
||||||
@@ -605,6 +605,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
var planet = entityBriefInfo.factory.planet;
|
var planet = entityBriefInfo.factory.planet;
|
||||||
if (_lastPlanet != planet || _lastPos != entity.pos)
|
if (_lastPlanet != planet || _lastPos != entity.pos)
|
||||||
{
|
{
|
||||||
|
SetupRichTextSupport();
|
||||||
CalculateGridOffset(planet, entity.pos, out var x, out var y, out var z);
|
CalculateGridOffset(planet, entity.pos, out var x, out var y, out var z);
|
||||||
_lastPlanet = planet;
|
_lastPlanet = planet;
|
||||||
_lastPos = entity.pos;
|
_lastPos = entity.pos;
|
||||||
@@ -684,6 +685,13 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
return matcher.InstructionEnumeration();
|
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]
|
[HarmonyTranspiler]
|
||||||
[HarmonyPatch(typeof(BuildTool_Path), nameof(BuildTool_Path.UpdateRaycast))]
|
[HarmonyPatch(typeof(BuildTool_Path), nameof(BuildTool_Path.UpdateRaycast))]
|
||||||
@@ -709,8 +717,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
var jmp0 = generator.DefineLabel();
|
var jmp0 = generator.DefineLabel();
|
||||||
var jmp1 = generator.DefineLabel();
|
var jmp1 = generator.DefineLabel();
|
||||||
matcher.InsertAndAdvance(
|
matcher.InsertAndAdvance(
|
||||||
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(FactoryPatch), nameof(_offgridfForPathsKey))),
|
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(OffGridBuilding), nameof(CheckOffgridForPathsKeyPressed))),
|
||||||
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(PressKeyBind), nameof(PressKeyBind.keyValue))),
|
|
||||||
new CodeInstruction(OpCodes.Brfalse, jmp0),
|
new CodeInstruction(OpCodes.Brfalse, jmp0),
|
||||||
new CodeInstruction(OpCodes.Ldarg_0),
|
new CodeInstruction(OpCodes.Ldarg_0),
|
||||||
new CodeInstruction(OpCodes.Ldarg_0),
|
new CodeInstruction(OpCodes.Ldarg_0),
|
||||||
@@ -1662,7 +1669,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
GameLogic.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
GameLogic.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void VFPreload_InvokeOnLoadWorkEnded_Postfix()
|
private static void VFPreload_InvokeOnLoadWorkEnded_Postfix()
|
||||||
{
|
{
|
||||||
if (_initialized) return;
|
if (_initialized) return;
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
@@ -1680,7 +1687,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
RemovePlanetSignalBelts(factory.index);
|
RemovePlanetSignalBelts(factory.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GameMain_Begin_Postfix()
|
private static void GameMain_Begin_Postfix()
|
||||||
{
|
{
|
||||||
_clusterSeedKey = GameMain.data.GetClusterSeedKey();
|
_clusterSeedKey = GameMain.data.GetClusterSeedKey();
|
||||||
InitSignalBelts();
|
InitSignalBelts();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
|
using CommonAPI.Systems;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
@@ -26,6 +27,8 @@ public class GamePatch: PatchImpl<GamePatch>
|
|||||||
public static ConfigEntry<string> DefaultProfileName;
|
public static ConfigEntry<string> DefaultProfileName;
|
||||||
public static ConfigEntry<double> GameUpsFactor;
|
public static ConfigEntry<double> GameUpsFactor;
|
||||||
|
|
||||||
|
private static PressKeyBind _speedDownKey;
|
||||||
|
private static PressKeyBind _speedUpKey;
|
||||||
private static bool _enableGameUpsFactor = true;
|
private static bool _enableGameUpsFactor = true;
|
||||||
public static bool EnableGameUpsFactor
|
public static bool EnableGameUpsFactor
|
||||||
{
|
{
|
||||||
@@ -52,6 +55,26 @@ public class GamePatch: PatchImpl<GamePatch>
|
|||||||
|
|
||||||
public static void Init()
|
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
|
// Get profile name from command line arguments, and set window title accordingly
|
||||||
var args = Environment.GetCommandLineArgs();
|
var args = Environment.GetCommandLineArgs();
|
||||||
for (var i = 0; i < args.Length - 1; i++)
|
for (var i = 0; i < args.Length - 1; i++)
|
||||||
@@ -120,6 +143,21 @@ public class GamePatch: PatchImpl<GamePatch>
|
|||||||
ConvertSavesFromPeace.Enable(false);
|
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()
|
private static void RefreshSavePath()
|
||||||
{
|
{
|
||||||
if (ProfileName == null) return;
|
if (ProfileName == null) return;
|
||||||
|
|||||||
@@ -837,7 +837,7 @@ public static class LogisticsPatch
|
|||||||
stationTip.rectTransform.anchoredPosition = rectPoint;
|
stationTip.rectTransform.anchoredPosition = rectPoint;
|
||||||
stationTip.transform.localScale = Vector3.one * localScaleMultiple;
|
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 Text[] _carrierIdleCountText;
|
||||||
|
|
||||||
private GameObject _infoText;
|
private GameObject _infoText;
|
||||||
private StationComponent _currentStation;
|
|
||||||
private EStationTipLayout _layout = EStationTipLayout.None;
|
private EStationTipLayout _layout = EStationTipLayout.None;
|
||||||
private int _storageNum;
|
private int _storageNum;
|
||||||
private float _pixelPerItem;
|
private float _pixelPerItem;
|
||||||
@@ -964,7 +963,6 @@ public static class LogisticsPatch
|
|||||||
|
|
||||||
public void ResetStationTip()
|
public void ResetStationTip()
|
||||||
{
|
{
|
||||||
_currentStation = null;
|
|
||||||
_layout = EStationTipLayout.None;
|
_layout = EStationTipLayout.None;
|
||||||
for (var i = StorageSlotCount - 1; i >= 0; i--)
|
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[] TipWindowExtraHeights = [0f, 5f, 5f, 40f, 40f];
|
||||||
private static readonly float[] CarrierPositionX = [5f, 35f, 85f];
|
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;
|
_layout = layout;
|
||||||
var layout = stationComponent.isCollector ? EStationTipLayout.Collector :
|
for (var i = StorageSlotCount - 1; i >= 0; i--)
|
||||||
stationComponent.isVeinCollector ? EStationTipLayout.VeinCollector :
|
|
||||||
stationComponent.isStellar ? EStationTipLayout.InterstellarLogistics : EStationTipLayout.PlanetaryLogistics;
|
|
||||||
|
|
||||||
if (_layout != layout)
|
|
||||||
{
|
{
|
||||||
_layout = layout;
|
_iconLocals[i].gameObject.SetActive(false);
|
||||||
for (var i = StorageSlotCount - 1; i >= 0; i--)
|
_iconRemotes[i].gameObject.SetActive(false);
|
||||||
|
_icons[i].gameObject.SetActive(false);
|
||||||
|
switch (layout)
|
||||||
{
|
{
|
||||||
_iconLocals[i].gameObject.SetActive(false);
|
case EStationTipLayout.PlanetaryLogistics:
|
||||||
_iconRemotes[i].gameObject.SetActive(false);
|
var rectTrans = (RectTransform)_iconLocals[i].transform;
|
||||||
_icons[i].gameObject.SetActive(false);
|
rectTrans.sizeDelta = new Vector2(20f, 20f);
|
||||||
switch (layout)
|
rectTrans.anchoredPosition3D = new Vector3(100f, -5f - 35f * i - 5f, 0);
|
||||||
{
|
break;
|
||||||
case EStationTipLayout.PlanetaryLogistics:
|
case EStationTipLayout.InterstellarLogistics:
|
||||||
var rectTrans = (RectTransform)_iconLocals[i].transform;
|
rectTrans = (RectTransform)_iconLocals[i].transform;
|
||||||
rectTrans.sizeDelta = new Vector2(20f, 20f);
|
rectTrans.sizeDelta = new Vector2(16f, 16f);
|
||||||
rectTrans.anchoredPosition3D = new Vector3(100f, -5f - 35f * i - 5f, 0);
|
rectTrans.anchoredPosition3D = new Vector3(102f, -5f - 35f * i, 0);
|
||||||
break;
|
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;
|
var storageArray = stationComponent.storage;
|
||||||
|
|||||||
@@ -26,6 +26,14 @@
|
|||||||
- Mod manager profile based save folder
|
- Mod manager profile based save folder
|
||||||
- Save files are stored in `Save\<ProfileName>` folder.
|
- Save files are stored in `Save\<ProfileName>` folder.
|
||||||
- Will use original save location if matching default profile name.
|
- 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 maximum count of Metadata Instantiations to 20000 (from 2000)
|
||||||
- Increase capacity of player order queue to 128 (from 16)
|
- Increase capacity of player order queue to 128 (from 16)
|
||||||
+ Planet/Factory
|
+ Planet/Factory
|
||||||
@@ -34,6 +42,7 @@
|
|||||||
- Remove build count and range limit
|
- Remove build count and range limit
|
||||||
- Larger area for upgrade and dismantle(30x30 at max)
|
- Larger area for upgrade and dismantle(30x30 at max)
|
||||||
- Larger area for terraform(30x30 at max)
|
- Larger area for terraform(30x30 at max)
|
||||||
|
- Off-grid building and stepped rotation
|
||||||
- Treat stack items as single in monitor components
|
- Treat stack items as single in monitor components
|
||||||
- Enhanced control for logistic storage limits
|
- 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.
|
- Logistic storage limits are not scaled on upgrading `Logistics Carrier Capacity`, if they are not set to maximum capacity.
|
||||||
@@ -130,6 +139,14 @@
|
|||||||
- 基于mod管理器配置档案名的存档文件夹
|
- 基于mod管理器配置档案名的存档文件夹
|
||||||
- 存档文件会存储在`Save\<ProfileName>`文件夹中
|
- 存档文件会存储在`Save\<ProfileName>`文件夹中
|
||||||
- 如果匹配默认配置档案名则使用原始存档位置
|
- 如果匹配默认配置档案名则使用原始存档位置
|
||||||
|
- 逻辑帧倍率
|
||||||
|
- 这将改变游戏运行速度,最慢0.1倍,最快10倍
|
||||||
|
- 设置了一对快捷键(`-`和`+`),可以-/+0.5倍改变逻辑帧倍率
|
||||||
|
- 注意:
|
||||||
|
- 高逻辑帧倍率不能保证稳定性,特别是在工厂负载较重时
|
||||||
|
- 这不会影响一些游戏动画
|
||||||
|
- 当在`Auxilaryfunction`mod中设置游戏速度时,此功能将被禁用
|
||||||
|
- 当安装了`BulletTime`mod时,此功能将被隐藏,但会对`BulletTime`的速度控制打补丁,使其最大速度变为10倍
|
||||||
- 将元数据提取的最大数量增加到20000(原来为2000)
|
- 将元数据提取的最大数量增加到20000(原来为2000)
|
||||||
- 将玩家指令队列的容量增加到128(原来为16)
|
- 将玩家指令队列的容量增加到128(原来为16)
|
||||||
+ 行星/工厂
|
+ 行星/工厂
|
||||||
@@ -137,6 +154,7 @@
|
|||||||
- 移除部分不影响游戏逻辑的建造条件
|
- 移除部分不影响游戏逻辑的建造条件
|
||||||
- 范围升级和拆除的最大区域扩大(最大30x30)
|
- 范围升级和拆除的最大区域扩大(最大30x30)
|
||||||
- 范围铺设地基的最大区域扩大(最大30x30)
|
- 范围铺设地基的最大区域扩大(最大30x30)
|
||||||
|
- 脱离网格建造以及小角度旋转
|
||||||
- 在流速计中将堆叠物品视为单个物品
|
- 在流速计中将堆叠物品视为单个物品
|
||||||
- 物流塔存储数量限制控制改进
|
- 物流塔存储数量限制控制改进
|
||||||
- 当升级`运输机舱扩容`时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。
|
- 当升级`运输机舱扩容`时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。
|
||||||
|
|||||||
@@ -166,10 +166,6 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
|||||||
_patches = Common.Util.GetTypesInNamespace(Assembly.GetExecutingAssembly(), "UXAssist.Patches");
|
_patches = Common.Util.GetTypesInNamespace(Assembly.GetExecutingAssembly(), "UXAssist.Patches");
|
||||||
_patches?.Do(type => type.GetMethod("Init")?.Invoke(null, null));
|
_patches?.Do(type => type.GetMethod("Init")?.Invoke(null, null));
|
||||||
|
|
||||||
var patch = UIPatch.GetHarmony();
|
|
||||||
ModsCompat.AuxilaryfunctionWrapper.Init(patch);
|
|
||||||
ModsCompat.BulletTimeWrapper.Init(patch);
|
|
||||||
|
|
||||||
I18N.Apply();
|
I18N.Apply();
|
||||||
I18N.OnInitialized += RecreateConfigWindow;
|
I18N.OnInitialized += RecreateConfigWindow;
|
||||||
}
|
}
|
||||||
@@ -177,6 +173,9 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
|||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
_patches?.Do(type => type.GetMethod("Start")?.Invoke(null, null));
|
_patches?.Do(type => type.GetMethod("Start")?.Invoke(null, null));
|
||||||
|
var patch = UIPatch.GetHarmony();
|
||||||
|
ModsCompat.AuxilaryfunctionWrapper.Init(patch);
|
||||||
|
ModsCompat.BulletTimeWrapper.Init(patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
@@ -200,6 +199,7 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
|||||||
{
|
{
|
||||||
ToggleConfigWindow();
|
ToggleConfigWindow();
|
||||||
}
|
}
|
||||||
|
GamePatch.OnUpdate();
|
||||||
FactoryPatch.OnUpdate();
|
FactoryPatch.OnUpdate();
|
||||||
PlayerPatch.OnUpdate();
|
PlayerPatch.OnUpdate();
|
||||||
LogisticsPatch.OnUpdate();
|
LogisticsPatch.OnUpdate();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
||||||
<Description>DSP MOD - UXAssist</Description>
|
<Description>DSP MOD - UXAssist</Description>
|
||||||
<Version>1.1.6</Version>
|
<Version>1.2.1</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<PackageId>UXAssist</PackageId>
|
<PackageId>UXAssist</PackageId>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "UXAssist",
|
"name": "UXAssist",
|
||||||
"version_number": "1.1.6",
|
"version_number": "1.2.1",
|
||||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
|
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
|
||||||
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
|
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|||||||
Reference in New Issue
Block a user