mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 04:13:32 +08:00
CheatEnabler v2.3.30
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
|
<details>
|
||||||
|
<summary>Read me in English</summary>
|
||||||
|
|
||||||
## Changlog
|
## Changlog
|
||||||
|
|
||||||
|
* 2.3.30
|
||||||
|
+ Fix a warning issue while `No condition build` or `No collision` is enabled.
|
||||||
|
+ Optimized `Finish build immediately` for better performance.
|
||||||
* 2.3.29
|
* 2.3.29
|
||||||
+ Fix compatibility with game update 0.10.32.25779
|
+ Fix compatibility with game update 0.10.32.25779
|
||||||
* 2.3.28
|
* 2.3.28
|
||||||
@@ -15,14 +21,10 @@
|
|||||||
+ 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`
|
||||||
+ Fix an issue that `Complete Dyson Sphere Shells instantly` does not generate production records for solar sails.
|
+ Fix an issue that `Complete Dyson Sphere Shells instantly` does not generate production records for solar sails.
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Older versions</summary>
|
|
||||||
|
|
||||||
* 2.3.24
|
* 2.3.24
|
||||||
+ `Complete Dyson Sphere Shells instantly`: Fix a bug that may cause negative power in some cases
|
+ `Complete Dyson Sphere Shells instantly`: Fix a bug that may cause negative power in some cases
|
||||||
* 2.3.23
|
* 2.3.23
|
||||||
+ New feature: `Complete Dyson Sphere Shells instantly`
|
+ New feature: `Complete Dyson Sphere Shells instantly`
|
||||||
+ Fix a crash when config panel is opened before game is fully loaded
|
+ Fix a crash when config panel is opened before game is fully loaded
|
||||||
* 2.3.22
|
* 2.3.22
|
||||||
+ Fix `Pump Anywhere`
|
+ Fix `Pump Anywhere`
|
||||||
@@ -146,8 +148,14 @@
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>中文读我</summary>
|
||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
|
* 2.3.30
|
||||||
|
+ 修复了启用`无条件建造`或`无碰撞`时的警告问题
|
||||||
|
+ 优化了`立即完成建造`的性能表现
|
||||||
* 2.3.29
|
* 2.3.29
|
||||||
+ 修复了与游戏更新0.10.32.25779的兼容性
|
+ 修复了与游戏更新0.10.32.25779的兼容性
|
||||||
* 2.3.28
|
* 2.3.28
|
||||||
@@ -163,10 +171,6 @@
|
|||||||
+ 新功能:`无需空间翘曲器即可曲速飞行`
|
+ 新功能:`无需空间翘曲器即可曲速飞行`
|
||||||
+ 新功能:`风力涡轮机供电覆盖全球`
|
+ 新功能:`风力涡轮机供电覆盖全球`
|
||||||
+ 修复了`立即完成戴森壳建造`未生成太阳帆生产记录的问题
|
+ 修复了`立即完成戴森壳建造`未生成太阳帆生产记录的问题
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>更早的版本</summary>
|
|
||||||
|
|
||||||
* 2.3.24
|
* 2.3.24
|
||||||
+ `立即完成戴森壳建造`:修复了在某些情况下可能导致发电为负的问题
|
+ `立即完成戴森壳建造`:修复了在某些情况下可能导致发电为负的问题
|
||||||
* 2.3.23
|
* 2.3.23
|
||||||
|
|||||||
@@ -106,6 +106,6 @@ public class CheatEnabler : BaseUnityPlugin
|
|||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (VFInput.inputing) return;
|
if (VFInput.inputing) return;
|
||||||
FactoryPatch.OnUpdate();
|
FactoryPatch.OnInputUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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.29</Version>
|
<Version>2.3.30</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<PackageId>CheatEnabler</PackageId>
|
<PackageId>CheatEnabler</PackageId>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<PackageReference Include="DysonSphereProgram.GameLibs" Version="*-r.*" />
|
<PackageReference Include="DysonSphereProgram.GameLibs" Version="*-r.*" />
|
||||||
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
|
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
|
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
|
||||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
OverclockSilo.Enable(OverclockSiloEnabled.Value);
|
OverclockSilo.Enable(OverclockSiloEnabled.Value);
|
||||||
Enable(true);
|
Enable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Uninit()
|
public static void Uninit()
|
||||||
{
|
{
|
||||||
Enable(false);
|
Enable(false);
|
||||||
@@ -48,7 +48,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
OverclockEjector.Enable(false);
|
OverclockEjector.Enable(false);
|
||||||
OverclockSilo.Enable(false);
|
OverclockSilo.Enable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
[HarmonyPatch(typeof(DysonNode), nameof(DysonNode.OrderConstructCp))]
|
[HarmonyPatch(typeof(DysonNode), nameof(DysonNode.OrderConstructCp))]
|
||||||
private static IEnumerable<CodeInstruction> DysonNode_OrderConstructCp_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
private static IEnumerable<CodeInstruction> DysonNode_OrderConstructCp_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
@@ -88,7 +88,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
private static long _sailLifeTime;
|
private static long _sailLifeTime;
|
||||||
private static DysonSailCache[][] _sailsCache;
|
private static DysonSailCache[][] _sailsCache;
|
||||||
private static int[] _sailsCacheLen, _sailsCacheCapacity;
|
private static int[] _sailsCacheLen, _sailsCacheCapacity;
|
||||||
|
|
||||||
private struct DysonSailCache
|
private struct DysonSailCache
|
||||||
{
|
{
|
||||||
public DysonSail Sail;
|
public DysonSail Sail;
|
||||||
@@ -136,7 +136,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
Array.Clear(_sailsCacheLen, 0, starCount);
|
Array.Clear(_sailsCacheLen, 0, starCount);
|
||||||
Array.Clear(_sailsCacheCapacity, 0, starCount);
|
Array.Clear(_sailsCacheCapacity, 0, starCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetSailsCacheCapacity(int index, int capacity)
|
private static void SetSailsCacheCapacity(int index, int capacity)
|
||||||
{
|
{
|
||||||
var newCache = new DysonSailCache[capacity];
|
var newCache = new DysonSailCache[capacity];
|
||||||
@@ -164,7 +164,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
UpdateSailLifeTime();
|
UpdateSailLifeTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
[HarmonyPatch(typeof(EjectorComponent), nameof(EjectorComponent.InternalUpdate))]
|
[HarmonyPatch(typeof(EjectorComponent), nameof(EjectorComponent.InternalUpdate))]
|
||||||
private static IEnumerable<CodeInstruction> EjectorComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
private static IEnumerable<CodeInstruction> EjectorComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
@@ -280,7 +280,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SkipAbsorbPatch: PatchImpl<SkipAbsorbPatch>
|
private class SkipAbsorbPatch: PatchImpl<SkipAbsorbPatch>
|
||||||
{
|
{
|
||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
@@ -319,12 +319,12 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
new CodeInstruction(OpCodes.Ldc_I4_1),
|
new CodeInstruction(OpCodes.Ldc_I4_1),
|
||||||
new CodeInstruction(OpCodes.Add),
|
new CodeInstruction(OpCodes.Add),
|
||||||
new CodeInstruction(OpCodes.Stind_I4),
|
new CodeInstruction(OpCodes.Stind_I4),
|
||||||
|
|
||||||
// this.RemoveSolarSail(index);
|
// this.RemoveSolarSail(index);
|
||||||
new CodeInstruction(OpCodes.Ldarg_0).WithLabels(label1),
|
new CodeInstruction(OpCodes.Ldarg_0).WithLabels(label1),
|
||||||
new CodeInstruction(OpCodes.Ldloc_1),
|
new CodeInstruction(OpCodes.Ldloc_1),
|
||||||
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(DysonSwarm), nameof(DysonSwarm.RemoveSolarSail))),
|
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(DysonSwarm), nameof(DysonSwarm.RemoveSolarSail))),
|
||||||
|
|
||||||
// return false;
|
// return false;
|
||||||
new CodeInstruction(OpCodes.Ldc_I4_1),
|
new CodeInstruction(OpCodes.Ldc_I4_1),
|
||||||
new CodeInstruction(OpCodes.Ret)
|
new CodeInstruction(OpCodes.Ret)
|
||||||
@@ -332,7 +332,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class QuickAbsorbPatch: PatchImpl<QuickAbsorbPatch>
|
private class QuickAbsorbPatch: PatchImpl<QuickAbsorbPatch>
|
||||||
{
|
{
|
||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
@@ -363,7 +363,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
/* Insert a RETURN before old absorption functions */
|
/* Insert a RETURN before old absorption functions */
|
||||||
return matcher.InstructionEnumeration();
|
return matcher.InstructionEnumeration();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DoAbsorb(DysonSphereLayer layer, long gameTick)
|
private static void DoAbsorb(DysonSphereLayer layer, long gameTick)
|
||||||
{
|
{
|
||||||
var nodeCount = layer.nodeCursor - 1;
|
var nodeCount = layer.nodeCursor - 1;
|
||||||
@@ -383,7 +383,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class EjectAnywayPatch: PatchImpl<EjectAnywayPatch>
|
private class EjectAnywayPatch: PatchImpl<EjectAnywayPatch>
|
||||||
{
|
{
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
_beltIds ??= [..LDB.items.dataArray.Where(i => i.prefabDesc.isBelt).Select(i => i.ID)];
|
_beltIds ??= [..LDB.items.dataArray.Where(i => i.prefabDesc.isBelt).Select(i => i.ID)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void OnUpdate()
|
public static void OnInputUpdate()
|
||||||
{
|
{
|
||||||
if (_noConditionKey.keyValue)
|
if (_noConditionKey.keyValue)
|
||||||
{
|
{
|
||||||
@@ -154,43 +154,32 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
public static void ArrivePlanet(PlanetFactory factory)
|
public static void ArrivePlanet(PlanetFactory factory)
|
||||||
{
|
{
|
||||||
|
if (factory.prebuildCount <= 0) return;
|
||||||
var imm = ImmediateEnabled.Value;
|
var imm = ImmediateEnabled.Value;
|
||||||
var architect = ArchitectModeEnabled.Value;
|
var architect = ArchitectModeEnabled.Value;
|
||||||
if ((!imm && !architect) || GameMain.gameScenario == null) return;
|
if ((!imm && !architect) || GameMain.gameScenario == null) return;
|
||||||
var prebuilds = factory.prebuildPool;
|
var prebuilds = factory.prebuildPool;
|
||||||
var anyBelt = false;
|
|
||||||
if (imm)
|
if (imm)
|
||||||
{
|
{
|
||||||
|
var anyBelt = false;
|
||||||
|
var anyBuilt = false;
|
||||||
factory.BeginFlattenTerrain();
|
factory.BeginFlattenTerrain();
|
||||||
factory.cargoTraffic._batch_buffer_no_refresh = true;
|
factory.cargoTraffic._batch_buffer_no_refresh = true;
|
||||||
}
|
PlanetFactory.batchBuild = true;
|
||||||
for (var i = factory.prebuildCursor - 1; i > 0; i--)
|
for (var i = factory.prebuildCursor - 1; i > 0; i--)
|
||||||
{
|
|
||||||
if (prebuilds[i].id != i) continue;
|
|
||||||
if (prebuilds[i].itemRequired > 0)
|
|
||||||
{
|
{
|
||||||
if (!architect) continue;
|
ref var pb = ref prebuilds[i];
|
||||||
prebuilds[i].itemRequired = 0;
|
if (pb.id != i || pb.isDestroyed) continue;
|
||||||
if (imm)
|
if (pb.itemRequired > 0)
|
||||||
{
|
{
|
||||||
anyBelt = anyBelt || _beltIds.Contains(prebuilds[i].protoId);
|
if (!architect) continue;
|
||||||
factory.BuildFinally(GameMain.mainPlayer, i, false);
|
pb.itemRequired = 0;
|
||||||
}
|
}
|
||||||
else
|
anyBelt = anyBelt || _beltIds.Contains(pb.protoId);
|
||||||
factory.AlterPrebuildModelState(i);
|
factory.BuildFinally(GameMain.mainPlayer, i, false);
|
||||||
|
anyBuilt = true;
|
||||||
}
|
}
|
||||||
else
|
PlanetFactory.batchBuild = false;
|
||||||
{
|
|
||||||
if (imm)
|
|
||||||
{
|
|
||||||
anyBelt = anyBelt || _beltIds.Contains(prebuilds[i].protoId);
|
|
||||||
factory.BuildFinally(GameMain.mainPlayer, i, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (imm)
|
|
||||||
{
|
|
||||||
if (anyBelt)
|
if (anyBelt)
|
||||||
{
|
{
|
||||||
factory.cargoTraffic.RefreshBeltBatchesBuffers();
|
factory.cargoTraffic.RefreshBeltBatchesBuffers();
|
||||||
@@ -198,6 +187,21 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
}
|
}
|
||||||
factory.cargoTraffic._batch_buffer_no_refresh = false;
|
factory.cargoTraffic._batch_buffer_no_refresh = false;
|
||||||
factory.EndFlattenTerrain();
|
factory.EndFlattenTerrain();
|
||||||
|
if (anyBuilt)
|
||||||
|
{
|
||||||
|
factory.planet.physics?.raycastLogic?.NotifyBatchObjectRemove();
|
||||||
|
factory.planet.audio?.SetPlanetAudioDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (architect)
|
||||||
|
{
|
||||||
|
for (var i = factory.prebuildCursor - 1; i > 0; i--)
|
||||||
|
{
|
||||||
|
ref var pb = ref prebuilds[i];
|
||||||
|
if (pb.id != i || pb.isDestroyed || pb.itemRequired == 0) continue;
|
||||||
|
pb.itemRequired = 0;
|
||||||
|
factory.AlterPrebuildModelState(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,6 +218,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
private static void GameMain_Begin_Postfix_For_ImmBuild()
|
private static void GameMain_Begin_Postfix_For_ImmBuild()
|
||||||
{
|
{
|
||||||
|
if (DSPGame.IsMenuDemo) return;
|
||||||
var factory = GameMain.mainPlayer?.factory;
|
var factory = GameMain.mainPlayer?.factory;
|
||||||
if (factory != null)
|
if (factory != null)
|
||||||
{
|
{
|
||||||
@@ -752,6 +757,7 @@ public class FactoryPatch: PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
private static void GameMain_Begin_Postfix()
|
private static void GameMain_Begin_Postfix()
|
||||||
{
|
{
|
||||||
|
if (DSPGame.IsMenuDemo) return;
|
||||||
if (BeltSignalGeneratorEnabled.Value) InitSignalBelts();
|
if (BeltSignalGeneratorEnabled.Value) InitSignalBelts();
|
||||||
InitItemSources();
|
InitItemSources();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# CheatEnabler
|
# CheatEnabler
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Read me in English</summary>
|
||||||
|
|
||||||
#### Add various cheat functions while disabling abnormal determinants
|
#### Add various cheat functions while disabling abnormal determinants
|
||||||
#### 添加一些作弊功能,同时屏蔽异常检测
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -63,6 +65,12 @@
|
|||||||
* [BepInEx](https://bepinex.dev/): Base modding framework
|
* [BepInEx](https://bepinex.dev/): Base modding framework
|
||||||
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): Some cheat functions
|
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): Some cheat functions
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>中文读我</summary>
|
||||||
|
|
||||||
|
#### 添加一些作弊功能,同时屏蔽异常检测
|
||||||
|
|
||||||
## 使用说明
|
## 使用说明
|
||||||
|
|
||||||
@@ -123,3 +131,5 @@
|
|||||||
* [戴森球计划](https://store.steampowered.com/app/1366540): 伟大的游戏
|
* [戴森球计划](https://store.steampowered.com/app/1366540): 伟大的游戏
|
||||||
* [BepInEx](https://bepinex.dev/): 基础模组框架
|
* [BepInEx](https://bepinex.dev/): 基础模组框架
|
||||||
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): 一些作弊功能
|
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): 一些作弊功能
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "CheatEnabler",
|
"name": "CheatEnabler",
|
||||||
"version_number": "2.3.29",
|
"version_number": "2.3.30",
|
||||||
"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": [
|
||||||
|
|||||||
@@ -205,45 +205,45 @@ public static class UIFunctions
|
|||||||
var uiRoot = UIRoot.instance;
|
var uiRoot = UIRoot.instance;
|
||||||
if (!uiRoot) return;
|
if (!uiRoot) return;
|
||||||
var rtrans = uiRoot.uiGame.starmap.transform as RectTransform;
|
var rtrans = uiRoot.uiGame.starmap.transform as RectTransform;
|
||||||
var cornerComboBox = UI.MyCornerComboBox.CreateComboBox(135, 5, rtrans, true).WithItems("Show original name".Translate(), "Show distance".Translate(), "Show planet count".Translate(), "Show all information".Translate());
|
var cornerComboBox = UI.MyCornerComboBox.CreateComboBox(135, 0, rtrans, true).WithItems("Show original name".Translate(), "Show distance".Translate(), "Show planet count".Translate(), "Show all information".Translate());
|
||||||
cornerComboBox.SetIndex(Functions.UIFunctions.CornerComboBoxIndex);
|
cornerComboBox.SetIndex(Functions.UIFunctions.CornerComboBoxIndex);
|
||||||
cornerComboBox.OnSelChanged += (index) =>
|
cornerComboBox.OnSelChanged += (index) =>
|
||||||
{
|
{
|
||||||
Functions.UIFunctions.CornerComboBoxIndex = index;
|
Functions.UIFunctions.CornerComboBoxIndex = index;
|
||||||
};
|
};
|
||||||
_starmapFilterToggler = UI.MyCheckButton.CreateCheckButton(5, 5, rtrans, false, ">>").WithSize(24, 24);
|
_starmapFilterToggler = UI.MyCheckButton.CreateCheckButton(0, 0, rtrans, false, ">>").WithSize(24, 24);
|
||||||
MyCheckButton[] buttons = [
|
MyCheckButton[] buttons = [
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Kimberlite
|
UI.MyCheckButton.CreateCheckButton(24, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Kimberlite
|
||||||
UI.MyCheckButton.CreateCheckButton(53, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Fractal Silicon
|
UI.MyCheckButton.CreateCheckButton(48, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Fractal Silicon
|
||||||
UI.MyCheckButton.CreateCheckButton(77, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Organic Crystal
|
UI.MyCheckButton.CreateCheckButton(72, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Organic Crystal
|
||||||
UI.MyCheckButton.CreateCheckButton(101, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Grating Crystal
|
UI.MyCheckButton.CreateCheckButton(96, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Grating Crystal
|
||||||
UI.MyCheckButton.CreateCheckButton(125, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Stalagmite Crystal
|
UI.MyCheckButton.CreateCheckButton(120, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Stalagmite Crystal
|
||||||
UI.MyCheckButton.CreateCheckButton(149, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Unipolar Magnet
|
UI.MyCheckButton.CreateCheckButton(144, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Unipolar Magnet
|
||||||
UI.MyCheckButton.CreateCheckButton(173, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Crude Oil
|
UI.MyCheckButton.CreateCheckButton(168, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Crude Oil
|
||||||
UI.MyCheckButton.CreateCheckButton(197, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Fire Ice
|
UI.MyCheckButton.CreateCheckButton(192, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Fire Ice
|
||||||
UI.MyCheckButton.CreateCheckButton(221, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Sulfuric Acid
|
UI.MyCheckButton.CreateCheckButton(216, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Sulfuric Acid
|
||||||
UI.MyCheckButton.CreateCheckButton(245, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Water
|
UI.MyCheckButton.CreateCheckButton(240, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Water
|
||||||
UI.MyCheckButton.CreateCheckButton(269, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Hydrogen
|
UI.MyCheckButton.CreateCheckButton(264, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Hydrogen
|
||||||
UI.MyCheckButton.CreateCheckButton(293, 5, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Deuterium
|
UI.MyCheckButton.CreateCheckButton(288, 0, rtrans, false).WithIcon().WithSize(24, 24).WithIconWidth(24), // Deuterium
|
||||||
|
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 29, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 24, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 53, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 48, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 77, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 72, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 101, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 96, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 125, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 120, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 149, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 144, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 173, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 168, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 197, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 192, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 221, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 216, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
|
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 263, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 258, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 287, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 282, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 311, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 306, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 335, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 330, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 359, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 354, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
UI.MyCheckButton.CreateCheckButton(29, 383, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
UI.MyCheckButton.CreateCheckButton(24, 378, rtrans, false).WithIcon().WithSize(150, 24).WithIconWidth(24),
|
||||||
];
|
];
|
||||||
var allOresText = MyWindow.AddText(25, 243, rtrans, "All 6 Basic Ores".Translate(), 12);
|
var allOresText = MyWindow.AddText(20, 238, rtrans, "All 6 Basic Ores".Translate(), 12);
|
||||||
allOresText.gameObject.SetActive(false);
|
allOresText.gameObject.SetActive(false);
|
||||||
_starmapFilterToggler.OnChecked += UpdateButtons;
|
_starmapFilterToggler.OnChecked += UpdateButtons;
|
||||||
foreach (var button in buttons)
|
foreach (var button in buttons)
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
|
|||||||
{
|
{
|
||||||
RecheckDysonSphereAutoNodes();
|
RecheckDysonSphereAutoNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
RecheckDysonSphereAutoNodes();
|
RecheckDysonSphereAutoNodes();
|
||||||
|
|||||||
@@ -261,6 +261,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
|
GameLogic.OnGameEnd -= GameMain_End_Postfix;
|
||||||
if (_sunlight)
|
if (_sunlight)
|
||||||
{
|
{
|
||||||
_sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
|
_sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ public static class LogisticsPatch
|
|||||||
new CodeMatch(OpCodes.Ldlen),
|
new CodeMatch(OpCodes.Ldlen),
|
||||||
new CodeMatch(OpCodes.Conv_I4)
|
new CodeMatch(OpCodes.Conv_I4)
|
||||||
);
|
);
|
||||||
UXAssist.Logger.LogDebug($"Patch ILS ship count: {matcher.Pos}");
|
|
||||||
matcher.Repeat(m => m.Advance(4).InsertAndAdvance(
|
matcher.Repeat(m => m.Advance(4).InsertAndAdvance(
|
||||||
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(LogisticsPatch), nameof(AutoConfigILSShipCount))),
|
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(LogisticsPatch), nameof(AutoConfigILSShipCount))),
|
||||||
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(ConfigEntry<int>), nameof(ConfigEntry<int>.Value))),
|
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(ConfigEntry<int>), nameof(ConfigEntry<int>.Value))),
|
||||||
|
|||||||
Reference in New Issue
Block a user