From f0ee1aaea98ac0f30727bf2fc90e4b4b4be51428 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Mon, 9 Feb 2026 21:12:32 +0800 Subject: [PATCH] code format --- CheatEnabler/Patches/DysonSpherePatch.cs | 3 ++- CheatEnabler/Patches/FactoryPatch.cs | 3 ++- UXAssist/Patches/FactoryPatch.cs | 2 +- UXAssist/Patches/LogisticsPatch.cs | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CheatEnabler/Patches/DysonSpherePatch.cs b/CheatEnabler/Patches/DysonSpherePatch.cs index 1bb3627..b7c8ab1 100644 --- a/CheatEnabler/Patches/DysonSpherePatch.cs +++ b/CheatEnabler/Patches/DysonSpherePatch.cs @@ -385,7 +385,8 @@ public class DysonSpherePatch : PatchImpl new CodeInstruction(OpCodes.Ldarg_0), new CodeInstruction(OpCodes.Ldarg_1), new CodeInstruction(OpCodes.Ldloc_1), - Transpilers.EmitDelegate((DysonSwarm swarm, DysonNode node, int index) => { + Transpilers.EmitDelegate((DysonSwarm swarm, DysonNode node, int index) => + { if (node.ConstructCp() != null) { swarm.dysonSphere.productRegister[ProductionStatistics.DYSON_CELL_ID]++; diff --git a/CheatEnabler/Patches/FactoryPatch.cs b/CheatEnabler/Patches/FactoryPatch.cs index e151c6b..544a034 100644 --- a/CheatEnabler/Patches/FactoryPatch.cs +++ b/CheatEnabler/Patches/FactoryPatch.cs @@ -447,7 +447,8 @@ public class FactoryPatch : PatchImpl if (factory.prebuildCount <= 0) return; var player = GameMain.mainPlayer; var total = factory.prebuildCursor - 1; - var stepCount = total switch { + var stepCount = total switch + { < 256 => 1, < 2048 => 3, < 16384 => 10, diff --git a/UXAssist/Patches/FactoryPatch.cs b/UXAssist/Patches/FactoryPatch.cs index 558149f..7754667 100644 --- a/UXAssist/Patches/FactoryPatch.cs +++ b/UXAssist/Patches/FactoryPatch.cs @@ -457,7 +457,7 @@ public class FactoryPatch : PatchImpl } [HarmonyTranspiler] - [HarmonyPatch(typeof(PlanetSimulator), nameof(PlanetSimulator.LateRefresh))] + [HarmonyPatch(typeof(PlanetSimulator), nameof(PlanetSimulator.LateRefresh))] private static IEnumerable PlanetSimulator_LateRefresh_Transpiler(IEnumerable instructions, ILGenerator generator) { // var vec = (NightlightEnabled ? GameMain.mainPlayer.transform.up : (Quaternion.Inverse(localPlanet.runtimeRotation) * (__instance.planetData.star.uPosition - __instance.planetData.uPosition).normalized)); diff --git a/UXAssist/Patches/LogisticsPatch.cs b/UXAssist/Patches/LogisticsPatch.cs index 51b7b91..115f09a 100644 --- a/UXAssist/Patches/LogisticsPatch.cs +++ b/UXAssist/Patches/LogisticsPatch.cs @@ -399,7 +399,9 @@ public static class LogisticsPatch station = stationStorage.station; index = stationStorage.index; planetFactory = stationStorage.stationWindow?.factory; - } else { + } + else + { var controlPanelStationStorage = target.gameObject.GetComponentInParent(); if (controlPanelStationStorage == null) continue; station = controlPanelStationStorage.station;