1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-08 22:13:30 +08:00

UXAssist 1.0.20

This commit is contained in:
2024-03-29 21:06:34 +08:00
parent 51314305d1
commit 0bb4a8f4af
5 changed files with 33 additions and 9 deletions

View File

@@ -1056,7 +1056,17 @@ public static class FactoryPatch
if (!click.multiLevelCovering || !VFInput._chainReaction) return;
var prefDesc = click.GetPrefabDesc(click.castObjectId);
if (!prefDesc.isLab) return;
while (true)
var levelMax = GameMain.history.labLevel;
var factory = click.factory;
var currLevel = 2;
var nid = click.castObjectId;
do
{
factory.ReadObjectConn(nid, 14, out _, out nid, out _);
if (nid <= 0) break;
currLevel++;
} while (true);
while (currLevel < levelMax)
{
click.UpdateRaycast();
click.DeterminePreviews();
@@ -1064,8 +1074,7 @@ public static class FactoryPatch
click.UpdateCollidersForGiantBp();
var model = click.actionBuild.model;
click.UpdatePreviewModels(model);
var flag = click.CheckBuildConditions();
if (!flag)
if (!click.CheckBuildConditions())
{
model.ClearAllPreviewsModels();
model.EarlyGameTickIgnoreActive();
@@ -1075,6 +1084,7 @@ public static class FactoryPatch
click.UpdatePreviewModelConditions(model);
click.UpdateGizmos(model);
click.CreatePrebuilds();
currLevel++;
}
}

View File

@@ -57,7 +57,15 @@ public static class PlanetFunctions
uiGame.ShutAllFunctionWindow();
uiGame.ShutAllFullScreens();
}
GameMain.data.mainPlayer?.controller.actionBuild.Close();
player.controller.actionBuild.Close();
var groundCombatModule = player.mecha.groundCombatModule;
for (var i = 0; i < groundCombatModule.moduleFleets.Length; i++)
{
var entry = groundCombatModule.moduleFleets[i];
if (entry.fleetId <= 0 || !entry.fleetEnabled) continue;
entry.fleetEnabled = false;
groundCombatModule.RemoveFleetDirectly(i);
}
//planet.data = new PlanetRawData(planet.precision);
//planet.data.CalcVerts();
for (var id = factory.entityCursor - 1; id > 0; id--)
@@ -88,9 +96,9 @@ public static class PlanetFunctions
{
for (var i = planet.factory.enemyCursor - 1; i > 0; i--)
{
ref var ptr13 = ref planet.factory.enemyPool[i];
if (ptr13.id != i) continue;
var combatStatId = ptr13.combatStatId;
ref var enemyData = ref planet.factory.enemyPool[i];
if (enemyData.id != i) continue;
var combatStatId = enemyData.combatStatId;
planet.factory.skillSystem.OnRemovingSkillTarget(combatStatId, planet.factory.skillSystem.combatStats.buffer[combatStatId].originAstroId, ETargetType.CombatStat);
planet.factory.skillSystem.combatStats.Remove(combatStatId);
planet.factory.KillEnemyFinally(player, i, ref CombatStat.empty);

View File

@@ -4,6 +4,9 @@
#### 一些提升用户体验的功能和补丁
## Changlog
* 1.0.20
+ Fix a infinite-loop issue when `Quick build and dismantle stacking labs` and `No condition build` are both enabled
+ Fix a crash caused by `Re-initialize planet` in combat mode
* 1.0.19
+ New functions:
- `Quick build and dismantle stacking labs`
@@ -148,6 +151,9 @@
* [CruiseAssist](https://dsp.thunderstore.io/package/tanu/CruiseAssist/) and its extension [AutoPilot](https://dsp.thunderstore.io/package/tanu/AutoPilot/): `Auto navigation on sailings` and `Auto-cruise` implementations
## 更新日志
* 1.0.20
+ 修复了`快速建造和拆除堆叠研究站``无条件建造`同时启用时可能导致的逻辑死循环问题
+ 修复了在战斗模式下`初始化本行星`导致的崩溃问题
* 1.0.19
+ 新功能:
- `快速建造和拆除堆叠研究站`

View File

@@ -4,7 +4,7 @@
<TargetFramework>net472</TargetFramework>
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
<Description>DSP MOD - UXAssist</Description>
<Version>1.0.19</Version>
<Version>1.0.20</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<PackageId>UXAssist</PackageId>

View File

@@ -1,6 +1,6 @@
{
"name": "UXAssist",
"version_number": "1.0.19",
"version_number": "1.0.20",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
"dependencies": [