1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-02-04 19:42:17 +08:00

donet format

This commit is contained in:
2025-09-21 15:38:03 +08:00
parent 5f37b8b6d6
commit a25f74443d
32 changed files with 170 additions and 155 deletions

View File

@@ -9,7 +9,7 @@ using GameLogic = UXAssist.Common.GameLogic;
namespace UXAssist.Patches;
public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
{
public static ConfigEntry<bool> StopEjectOnNodeCompleteEnabled;
public static ConfigEntry<bool> OnlyConstructNodesEnabled;
@@ -261,7 +261,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
return matcher.InstructionEnumeration();
}
private class StopEjectOnNodeComplete: PatchImpl<StopEjectOnNodeComplete>
private class StopEjectOnNodeComplete : PatchImpl<StopEjectOnNodeComplete>
{
private static HashSet<int>[] _nodeForAbsorb;
private static bool _initialized;
@@ -492,7 +492,7 @@ public class DysonSpherePatch: PatchImpl<DysonSpherePatch>
}
[PatchSetCallbackFlag(PatchCallbackFlag.CallOnDisableAfterUnpatch)]
private class OnlyConstructNodes: PatchImpl<OnlyConstructNodes>
private class OnlyConstructNodes : PatchImpl<OnlyConstructNodes>
{
protected override void OnEnable()
{

View File

@@ -80,7 +80,8 @@ public class GamePatch : PatchImpl<GamePatch>
I18N.Add("Logical frame rate: {0}x", "[UXA] Logical frame rate: {0}x", "[UXA] 逻辑帧速率: {0}x");
EnableWindowResizeEnabled.SettingChanged += (_, _) => EnableWindowResize.Enable(EnableWindowResizeEnabled.Value);
LoadLastWindowRectEnabled.SettingChanged += (_, _) => {
LoadLastWindowRectEnabled.SettingChanged += (_, _) =>
{
if (LoadLastWindowRectEnabled.Value)
{
FixLastWindowRect();

View File

@@ -298,7 +298,8 @@ public static class LogisticsPatch
new CodeMatch(OpCodes.Ldc_I4_1),
new CodeMatch(OpCodes.Call, AccessTools.PropertyGetter(typeof(GameMain), nameof(GameMain.mainPlayer)))
);
if (matcher.IsValid) {
if (matcher.IsValid)
{
matcher.RemoveInstructions(7).InsertAndAdvance(
new CodeInstruction(OpCodes.Ldc_I4_0)
);

View File

@@ -24,7 +24,7 @@ public static class PlanetPatch
PlayerActionsInGlobeView.Enable(false);
}
public class PlayerActionsInGlobeView: PatchImpl<PlayerActionsInGlobeView>
public class PlayerActionsInGlobeView : PatchImpl<PlayerActionsInGlobeView>
{
[HarmonyTranspiler]
[HarmonyPatch(typeof(VFInput), nameof(VFInput.UpdateGameStates))]
@@ -48,7 +48,7 @@ public static class PlanetPatch
});
return matcher.InstructionEnumeration();
}
[HarmonyTranspiler]
[HarmonyPatch(typeof(PlayerController), nameof(PlayerController.GetInput))]
private static IEnumerable<CodeInstruction> PlayerController_GetInput_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)

View File

@@ -287,7 +287,7 @@ public static class TechPatch
}
}
private class BatchBuyoutTech: PatchImpl<BatchBuyoutTech>
private class BatchBuyoutTech : PatchImpl<BatchBuyoutTech>
{
[HarmonyTranspiler]
[HarmonyPatch(typeof(UITechNode), nameof(UITechNode.UpdateInfoDynamic))]

View File

@@ -4,7 +4,7 @@ using Common;
using HarmonyLib;
[PatchGuid(PluginInfo.PLUGIN_GUID)]
public class UIPatch: PatchImpl<UIPatch>
public class UIPatch : PatchImpl<UIPatch>
{
public static void Start()
{