mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-03-22 08:43:24 +08:00
code format
This commit is contained in:
@@ -385,7 +385,8 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
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]++;
|
||||
|
||||
@@ -447,7 +447,8 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
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,
|
||||
|
||||
@@ -457,7 +457,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
}
|
||||
|
||||
[HarmonyTranspiler]
|
||||
[HarmonyPatch(typeof(PlanetSimulator), nameof(PlanetSimulator.LateRefresh))]
|
||||
[HarmonyPatch(typeof(PlanetSimulator), nameof(PlanetSimulator.LateRefresh))]
|
||||
private static IEnumerable<CodeInstruction> PlanetSimulator_LateRefresh_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
{
|
||||
// var vec = (NightlightEnabled ? GameMain.mainPlayer.transform.up : (Quaternion.Inverse(localPlanet.runtimeRotation) * (__instance.planetData.star.uPosition - __instance.planetData.uPosition).normalized));
|
||||
|
||||
@@ -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<UIControlPanelStationStorage>();
|
||||
if (controlPanelStationStorage == null) continue;
|
||||
station = controlPanelStationStorage.station;
|
||||
|
||||
Reference in New Issue
Block a user