mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-10 08:03:28 +08:00
we make them compile first
This commit is contained in:
BIN
AssemblyFromGame/Assembly-CSharp.dll
Normal file
BIN
AssemblyFromGame/Assembly-CSharp.dll
Normal file
Binary file not shown.
BIN
AssemblyFromGame/UnityEngine.UI.dll
Normal file
BIN
AssemblyFromGame/UnityEngine.UI.dll
Normal file
Binary file not shown.
@@ -16,15 +16,14 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BepInEx.Core" Version="5.*" />
|
<PackageReference Include="BepInEx.Core" Version="5.*" />
|
||||||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
|
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
|
||||||
<PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.32.*-r.*" />
|
<PackageReference Include="UnityEngine.Modules" Version="2022.3.53" IncludeAssets="compile" />
|
||||||
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
|
<!-- <PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.32.*-r.*" /> -->
|
||||||
</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>
|
||||||
|
|
||||||
<!--
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Assembly-CSharp">
|
<Reference Include="Assembly-CSharp">
|
||||||
<HintPath>..\AssemblyFromGame\Assembly-CSharp.dll</HintPath>
|
<HintPath>..\AssemblyFromGame\Assembly-CSharp.dll</HintPath>
|
||||||
@@ -33,7 +32,6 @@
|
|||||||
<HintPath>..\AssemblyFromGame\UnityEngine.UI.dll</HintPath>
|
<HintPath>..\AssemblyFromGame\UnityEngine.UI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
-->
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\UXAssist\UXAssist.csproj" />
|
<ProjectReference Include="..\UXAssist\UXAssist.csproj" />
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using System.Reflection.Emit;
|
|||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace CheatEnabler.Patches;
|
namespace CheatEnabler.Patches;
|
||||||
|
|
||||||
@@ -134,12 +133,12 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
|||||||
{
|
{
|
||||||
UpdateSailLifeTime();
|
UpdateSailLifeTime();
|
||||||
UpdateSailsCacheForThisGame();
|
UpdateSailsCacheForThisGame();
|
||||||
GameLogic.OnGameBegin += GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin += GameMain_Begin_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
GameLogic.OnGameBegin -= GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin -= GameMain_Begin_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void UpdateSailLifeTime()
|
private static void UpdateSailLifeTime()
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ using HarmonyLib;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace CheatEnabler.Patches;
|
namespace CheatEnabler.Patches;
|
||||||
|
|
||||||
@@ -94,14 +93,14 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
ControlPanelRemoteLogistics.Enable(ControlPanelRemoteLogisticsEnabled.Value);
|
ControlPanelRemoteLogistics.Enable(ControlPanelRemoteLogisticsEnabled.Value);
|
||||||
Enable(true);
|
Enable(true);
|
||||||
CargoTrafficPatch.Enable(true);
|
CargoTrafficPatch.Enable(true);
|
||||||
GameLogic.OnGameBegin += GameMain_Begin_Postfix_For_ImmBuild;
|
GameLogicProc.OnGameBegin += GameMain_Begin_Postfix_For_ImmBuild;
|
||||||
GameLogic.OnDataLoaded += OnDataLoaded;
|
GameLogicProc.OnDataLoaded += OnDataLoaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Uninit()
|
public static void Uninit()
|
||||||
{
|
{
|
||||||
GameLogic.OnDataLoaded -= OnDataLoaded;
|
GameLogicProc.OnDataLoaded -= OnDataLoaded;
|
||||||
GameLogic.OnGameBegin -= GameMain_Begin_Postfix_For_ImmBuild;
|
GameLogicProc.OnGameBegin -= GameMain_Begin_Postfix_For_ImmBuild;
|
||||||
CargoTrafficPatch.Enable(false);
|
CargoTrafficPatch.Enable(false);
|
||||||
Enable(false);
|
Enable(false);
|
||||||
ImmediateBuild.Enable(false);
|
ImmediateBuild.Enable(false);
|
||||||
@@ -629,12 +628,12 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
{
|
{
|
||||||
InitSignalBelts();
|
InitSignalBelts();
|
||||||
GameLogic.OnGameBegin += GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin += GameMain_Begin_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
GameLogic.OnGameBegin -= GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin -= GameMain_Begin_Postfix;
|
||||||
_initialized = false;
|
_initialized = false;
|
||||||
_signalBelts = null;
|
_signalBelts = null;
|
||||||
_signalBeltsCapacity = 0;
|
_signalBeltsCapacity = 0;
|
||||||
@@ -995,7 +994,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
var data = GameMain.data;
|
var data = GameMain.data;
|
||||||
var factories = data?.factories;
|
var factories = data?.factories;
|
||||||
if (factories == null) return;
|
if (factories == null) return;
|
||||||
PerformanceMonitor.BeginSample(ECpuWorkEntry.Belt);
|
DeepProfiler.BeginSample(DPEntry.Belt);
|
||||||
for (var index = data.factoryCount - 1; index >= 0; index--)
|
for (var index = data.factoryCount - 1; index >= 0; index--)
|
||||||
{
|
{
|
||||||
var factory = factories[index];
|
var factory = factories[index];
|
||||||
@@ -1123,16 +1122,16 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PerformanceMonitor.EndSample(ECpuWorkEntry.Belt);
|
DeepProfiler.EndSample(DPEntry.Belt);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
[HarmonyPatch(typeof(GameData), "GameTick")]
|
[HarmonyPatch(typeof(GameLogic), nameof(GameLogic.LogicFrame))]
|
||||||
public static IEnumerable<CodeInstruction> GameData_GameTick_Transpiler(IEnumerable<CodeInstruction> instructions)
|
public static IEnumerable<CodeInstruction> GameLogic_LogicFrame_Transpiler(IEnumerable<CodeInstruction> instructions)
|
||||||
{
|
{
|
||||||
var matcher = new CodeMatcher(instructions);
|
var matcher = new CodeMatcher(instructions);
|
||||||
matcher.MatchForward(false,
|
matcher.MatchForward(false,
|
||||||
new CodeMatch(OpCodes.Call, AccessTools.Method(typeof(PerformanceMonitor), nameof(PerformanceMonitor.EndSample)))
|
new CodeMatch(OpCodes.Call, AccessTools.Method(typeof(DeepProfiler), nameof(DeepProfiler.EndSample)))
|
||||||
).Advance(1).Insert(
|
).Advance(1).Insert(
|
||||||
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(BeltSignalGenerator), nameof(ProcessBeltSignals)))
|
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(BeltSignalGenerator), nameof(ProcessBeltSignals)))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ public static class GamePatch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
history.VarifyTechQueue();
|
history.VerifyTechQueue();
|
||||||
if (history.currentTech != history.techQueue[0])
|
if (history.currentTech != history.techQueue[0])
|
||||||
{
|
{
|
||||||
history.currentTech = history.techQueue[0];
|
history.currentTech = history.techQueue[0];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using HarmonyLib;
|
|||||||
|
|
||||||
namespace UXAssist.Common;
|
namespace UXAssist.Common;
|
||||||
|
|
||||||
public class GameLogic : PatchImpl<GameLogic>
|
public class GameLogicProc : PatchImpl<GameLogicProc>
|
||||||
{
|
{
|
||||||
public static Action OnDataLoaded;
|
public static Action OnDataLoaded;
|
||||||
public static Action OnGameBegin;
|
public static Action OnGameBegin;
|
||||||
@@ -124,7 +124,7 @@ public static class PlanetFunctions
|
|||||||
var combatStatId = enemyData.combatStatId;
|
var combatStatId = enemyData.combatStatId;
|
||||||
planet.factory.skillSystem.OnRemovingSkillTarget(combatStatId, planet.factory.skillSystem.combatStats.buffer[combatStatId].originAstroId, ETargetType.CombatStat);
|
planet.factory.skillSystem.OnRemovingSkillTarget(combatStatId, planet.factory.skillSystem.combatStats.buffer[combatStatId].originAstroId, ETargetType.CombatStat);
|
||||||
planet.factory.skillSystem.combatStats.Remove(combatStatId);
|
planet.factory.skillSystem.combatStats.Remove(combatStatId);
|
||||||
planet.factory.KillEnemyFinally(player, i, ref CombatStat.empty);
|
planet.factory.KillEnemyFinally(i, ref CombatStat.empty);
|
||||||
}
|
}
|
||||||
planet.factory.enemySystem.Free();
|
planet.factory.enemySystem.Free();
|
||||||
UIRoot.instance.uiGame.dfAssaultTip.ClearAllSpots();
|
UIRoot.instance.uiGame.dfAssaultTip.ClearAllSpots();
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ public static class TechFunctions
|
|||||||
{
|
{
|
||||||
UnlockTechImmediately(techProto, toLevel, withPrerequisites);
|
UnlockTechImmediately(techProto, toLevel, withPrerequisites);
|
||||||
}
|
}
|
||||||
history.VarifyTechQueue();
|
history.VerifyTechQueue();
|
||||||
if (history.currentTech != history.techQueue[0])
|
if (history.currentTech != history.techQueue[0])
|
||||||
{
|
{
|
||||||
history.currentTech = history.techQueue[0];
|
history.currentTech = history.techQueue[0];
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System.Linq;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UXAssist.UI;
|
using UXAssist.UI;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace UXAssist.Functions;
|
namespace UXAssist.Functions;
|
||||||
|
|
||||||
@@ -322,7 +321,7 @@ public static class UIFunctions
|
|||||||
}
|
}
|
||||||
|
|
||||||
I18N.OnInitialized += UpdateI18N;
|
I18N.OnInitialized += UpdateI18N;
|
||||||
GameLogic.OnDataLoaded += () =>
|
GameLogicProc.OnDataLoaded += () =>
|
||||||
{
|
{
|
||||||
VeinProto veinProto;
|
VeinProto veinProto;
|
||||||
ItemProto itemProto;
|
ItemProto itemProto;
|
||||||
@@ -348,7 +347,7 @@ public static class UIFunctions
|
|||||||
UpdateI18N();
|
UpdateI18N();
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLogic.OnGameBegin += () =>
|
GameLogicProc.OnGameBegin += () =>
|
||||||
{
|
{
|
||||||
if (DSPGame.IsMenuDemo) return;
|
if (DSPGame.IsMenuDemo) return;
|
||||||
|
|
||||||
@@ -429,7 +428,7 @@ public static class UIFunctions
|
|||||||
OnPlanetScanEnded();
|
OnPlanetScanEnded();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
GameLogic.OnGameEnd += () =>
|
GameLogicProc.OnGameEnd += () =>
|
||||||
{
|
{
|
||||||
_starOrderNames = null;
|
_starOrderNames = null;
|
||||||
ShowStarName = null;
|
ShowStarName = null;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using BepInEx.Configuration;
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace UXAssist.Patches;
|
namespace UXAssist.Patches;
|
||||||
|
|
||||||
@@ -269,14 +268,14 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
|||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
{
|
{
|
||||||
InitNodeForAbsorb();
|
InitNodeForAbsorb();
|
||||||
GameLogic.OnGameBegin += GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin += GameMain_Begin_Postfix;
|
||||||
GameLogic.OnGameEnd += GameMain_End_Postfix;
|
GameLogicProc.OnGameEnd += GameMain_End_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
GameLogic.OnGameEnd -= GameMain_End_Postfix;
|
GameLogicProc.OnGameEnd -= GameMain_End_Postfix;
|
||||||
GameLogic.OnGameBegin -= GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin -= GameMain_Begin_Postfix;
|
||||||
_initialized = false;
|
_initialized = false;
|
||||||
_nodeForAbsorb = null;
|
_nodeForAbsorb = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ using HarmonyLib;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace UXAssist.Patches;
|
namespace UXAssist.Patches;
|
||||||
|
|
||||||
@@ -276,12 +275,12 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
{
|
{
|
||||||
GameLogic.OnGameEnd += GameMain_End_Postfix;
|
GameLogicProc.OnGameEnd += GameMain_End_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
GameLogic.OnGameEnd -= GameMain_End_Postfix;
|
GameLogicProc.OnGameEnd -= GameMain_End_Postfix;
|
||||||
if (_sunlight)
|
if (_sunlight)
|
||||||
{
|
{
|
||||||
_sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
|
_sunlight.transform.localEulerAngles = new Vector3(0f, 180f);
|
||||||
@@ -1405,16 +1404,16 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
|
|
||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
{
|
{
|
||||||
GameLogic.OnGameBegin += GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin += GameMain_Begin_Postfix;
|
||||||
GameLogic.OnGameEnd += GameMain_End_Postfix;
|
GameLogicProc.OnGameEnd += GameMain_End_Postfix;
|
||||||
FixProto();
|
FixProto();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
UnfixProto();
|
UnfixProto();
|
||||||
GameLogic.OnGameEnd -= GameMain_End_Postfix;
|
GameLogicProc.OnGameEnd -= GameMain_End_Postfix;
|
||||||
GameLogic.OnGameBegin -= GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin -= GameMain_Begin_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AlternatelyChanged()
|
public static void AlternatelyChanged()
|
||||||
@@ -1770,14 +1769,14 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
{
|
{
|
||||||
AddBeltSignalProtos();
|
AddBeltSignalProtos();
|
||||||
GameLogic.OnDataLoaded += VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
GameLogicProc.OnDataLoaded += VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||||
GameLogic.OnGameBegin += GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin += GameMain_Begin_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisable()
|
protected override void OnDisable()
|
||||||
{
|
{
|
||||||
GameLogic.OnGameBegin -= GameMain_Begin_Postfix;
|
GameLogicProc.OnGameBegin -= GameMain_Begin_Postfix;
|
||||||
GameLogic.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
GameLogicProc.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void VFPreload_InvokeOnLoadWorkEnded_Postfix()
|
private static void VFPreload_InvokeOnLoadWorkEnded_Postfix()
|
||||||
@@ -1834,12 +1833,12 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
[HarmonyPatch(typeof(GameData), "GameTick")]
|
[HarmonyPatch(typeof(GameLogic), nameof(GameLogic.LogicFrame))]
|
||||||
public static IEnumerable<CodeInstruction> GameData_GameTick_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
public static IEnumerable<CodeInstruction> GameLogic_LogicFrame_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||||
{
|
{
|
||||||
var matcher = new CodeMatcher(instructions, generator);
|
var matcher = new CodeMatcher(instructions, generator);
|
||||||
matcher.MatchForward(false,
|
matcher.MatchForward(false,
|
||||||
new CodeMatch(OpCodes.Call, AccessTools.Method(typeof(PerformanceMonitor), nameof(PerformanceMonitor.EndSample)))
|
new CodeMatch(OpCodes.Call, AccessTools.Method(typeof(DeepProfiler), nameof(DeepProfiler.EndSample)))
|
||||||
).Advance(1).Insert(
|
).Advance(1).Insert(
|
||||||
Transpilers.EmitDelegate(() =>
|
Transpilers.EmitDelegate(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -302,10 +302,10 @@ public class GamePatch : PatchImpl<GamePatch>
|
|||||||
).Advance(1).Labels.Add(label1);
|
).Advance(1).Labels.Add(label1);
|
||||||
matcher.Start().Insert(
|
matcher.Start().Insert(
|
||||||
Transpilers.EmitDelegate(() =>
|
Transpilers.EmitDelegate(() =>
|
||||||
_gameOption.fullscreen == DSPGame.globalOption.fullscreen &&
|
_gameOption.displayMode != EOptionDisplayMode.Windowed &&
|
||||||
_gameOption.resolution.width == DSPGame.globalOption.resolution.width &&
|
_gameOption.resolution.width == DSPGame.globalOption.resolution.width &&
|
||||||
_gameOption.resolution.height == DSPGame.globalOption.resolution.height &&
|
_gameOption.resolution.height == DSPGame.globalOption.resolution.height &&
|
||||||
_gameOption.resolution.refreshRate == DSPGame.globalOption.resolution.refreshRate
|
_gameOption.resolution.refreshRateRatio.Equals(DSPGame.globalOption.resolution.refreshRateRatio)
|
||||||
),
|
),
|
||||||
new CodeInstruction(OpCodes.Brtrue, label1)
|
new CodeInstruction(OpCodes.Brtrue, label1)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ using UnityEngine.EventSystems;
|
|||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
|
||||||
namespace UXAssist.Patches;
|
namespace UXAssist.Patches;
|
||||||
@@ -74,14 +73,14 @@ public static class LogisticsPatch
|
|||||||
RealtimeLogisticsInfoPanel.Enable(RealtimeLogisticsInfoPanelEnabled.Value);
|
RealtimeLogisticsInfoPanel.Enable(RealtimeLogisticsInfoPanelEnabled.Value);
|
||||||
RealtimeLogisticsInfoPanel.EnableBars(RealtimeLogisticsInfoPanelBarsEnabled.Value);
|
RealtimeLogisticsInfoPanel.EnableBars(RealtimeLogisticsInfoPanelBarsEnabled.Value);
|
||||||
|
|
||||||
GameLogic.OnGameBegin += RealtimeLogisticsInfoPanel.OnGameBegin;
|
GameLogicProc.OnGameBegin += RealtimeLogisticsInfoPanel.OnGameBegin;
|
||||||
GameLogic.OnDataLoaded += RealtimeLogisticsInfoPanel.OnDataLoaded;
|
GameLogicProc.OnDataLoaded += RealtimeLogisticsInfoPanel.OnDataLoaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Uninit()
|
public static void Uninit()
|
||||||
{
|
{
|
||||||
GameLogic.OnDataLoaded -= RealtimeLogisticsInfoPanel.OnDataLoaded;
|
GameLogicProc.OnDataLoaded -= RealtimeLogisticsInfoPanel.OnDataLoaded;
|
||||||
GameLogic.OnGameBegin -= RealtimeLogisticsInfoPanel.OnGameBegin;
|
GameLogicProc.OnGameBegin -= RealtimeLogisticsInfoPanel.OnGameBegin;
|
||||||
|
|
||||||
AutoConfigLogistics.Enable(false);
|
AutoConfigLogistics.Enable(false);
|
||||||
AutoConfigLogisticsSetDefaultRemoteLogicToStorage.Enable(false);
|
AutoConfigLogisticsSetDefaultRemoteLogicToStorage.Enable(false);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using BepInEx.Configuration;
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace UXAssist.Patches;
|
namespace UXAssist.Patches;
|
||||||
|
|
||||||
@@ -46,11 +45,11 @@ public static class TechPatch
|
|||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
TryPatchProto(true);
|
TryPatchProto(true);
|
||||||
GameLogic.OnDataLoaded += VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
GameLogicProc.OnDataLoaded += VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameLogic.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
GameLogicProc.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||||
TryPatchProto(false);
|
TryPatchProto(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,11 +188,11 @@ public static class TechPatch
|
|||||||
{
|
{
|
||||||
if (DSPGame.GameDesc != null)
|
if (DSPGame.GameDesc != null)
|
||||||
TryPatchProto(DSPGame.GameDesc.isPeaceMode);
|
TryPatchProto(DSPGame.GameDesc.isPeaceMode);
|
||||||
GameLogic.OnGameBegin += OnGameBegin;
|
GameLogicProc.OnGameBegin += OnGameBegin;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameLogic.OnGameBegin -= OnGameBegin;
|
GameLogicProc.OnGameBegin -= OnGameBegin;
|
||||||
TryPatchProto(false);
|
TryPatchProto(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ using UXAssist.Functions;
|
|||||||
using UXAssist.Patches;
|
using UXAssist.Patches;
|
||||||
using UXAssist.UI;
|
using UXAssist.UI;
|
||||||
using Util = UXAssist.Common.Util;
|
using Util = UXAssist.Common.Util;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace UXAssist;
|
namespace UXAssist;
|
||||||
|
|
||||||
@@ -217,7 +216,7 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
|||||||
I18N.Add("UXAssist Config", "UXAssist Config", "UX助手设置");
|
I18N.Add("UXAssist Config", "UXAssist Config", "UX助手设置");
|
||||||
|
|
||||||
// UI Patches
|
// UI Patches
|
||||||
GameLogic.Enable(true);
|
GameLogicProc.Enable(true);
|
||||||
|
|
||||||
UIConfigWindow.Init();
|
UIConfigWindow.Init();
|
||||||
|
|
||||||
@@ -246,7 +245,7 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
|||||||
_patches?.Do(type => type.GetMethod("Uninit")?.Invoke(null, null));
|
_patches?.Do(type => type.GetMethod("Uninit")?.Invoke(null, null));
|
||||||
|
|
||||||
MyWindowManager.Enable(false);
|
MyWindowManager.Enable(false);
|
||||||
GameLogic.Enable(false);
|
GameLogicProc.Enable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|||||||
@@ -15,13 +15,12 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BepInEx.Core" Version="5.*" />
|
<PackageReference Include="BepInEx.Core" Version="5.*" />
|
||||||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
|
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
|
||||||
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
|
<PackageReference Include="UnityEngine.Modules" Version="2022.3.53" IncludeAssets="compile" />
|
||||||
<PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.32.*-r.*" />
|
<!-- <PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.32.*-r.*" /> -->
|
||||||
<PackageReference Include="DysonSphereProgram.Modding.CommonAPI" Version="1.6.5" />
|
<PackageReference Include="DysonSphereProgram.Modding.CommonAPI" Version="1.6.5" />
|
||||||
<PackageReference Include="DysonSphereProgram.Modding.DSPModSave" Version="1.*" />
|
<PackageReference Include="DysonSphereProgram.Modding.DSPModSave" Version="1.*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!--
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Assembly-CSharp">
|
<Reference Include="Assembly-CSharp">
|
||||||
<HintPath>..\AssemblyFromGame\Assembly-CSharp.dll</HintPath>
|
<HintPath>..\AssemblyFromGame\Assembly-CSharp.dll</HintPath>
|
||||||
@@ -30,7 +29,6 @@
|
|||||||
<HintPath>..\AssemblyFromGame\UnityEngine.UI.dll</HintPath>
|
<HintPath>..\AssemblyFromGame\UnityEngine.UI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
-->
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="assets/signal/energy-fragment.png" />
|
<EmbeddedResource Include="assets/signal/energy-fragment.png" />
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UXAssist.Common;
|
using UXAssist.Common;
|
||||||
using GameLogic = UXAssist.Common.GameLogic;
|
|
||||||
|
|
||||||
namespace UniverseGenTweaks;
|
namespace UniverseGenTweaks;
|
||||||
public static class BirthPlanetPatch
|
public static class BirthPlanetPatch
|
||||||
@@ -75,12 +74,12 @@ public static class BirthPlanetPatch
|
|||||||
HighLuminosityBirthStar.SettingChanged += (_, _) => PatchBirthThemeData();
|
HighLuminosityBirthStar.SettingChanged += (_, _) => PatchBirthThemeData();
|
||||||
PatchBirthThemeData();
|
PatchBirthThemeData();
|
||||||
_patch ??= Harmony.CreateAndPatchAll(typeof(BirthPlanetPatch));
|
_patch ??= Harmony.CreateAndPatchAll(typeof(BirthPlanetPatch));
|
||||||
GameLogic.OnDataLoaded += VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
GameLogicProc.OnDataLoaded += VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Uninit()
|
public static void Uninit()
|
||||||
{
|
{
|
||||||
GameLogic.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
GameLogicProc.OnDataLoaded -= VFPreload_InvokeOnLoadWorkEnded_Postfix;
|
||||||
_patch?.UnpatchSelf();
|
_patch?.UnpatchSelf();
|
||||||
_patch = null;
|
_patch = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BepInEx.Core" Version="5.*" />
|
<PackageReference Include="BepInEx.Core" Version="5.*" />
|
||||||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
|
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
|
||||||
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
|
<PackageReference Include="UnityEngine.Modules" Version="2022.3.53" IncludeAssets="compile" />
|
||||||
<PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.32.*-r.*" />
|
<!-- <PackageReference Include="DysonSphereProgram.GameLibs" Version="0.10.32.*-r.*" /> -->
|
||||||
<PackageReference Include="DysonSphereProgram.Modding.DSPModSave" Version="1.*" />
|
<PackageReference Include="DysonSphereProgram.Modding.DSPModSave" Version="1.*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -24,6 +24,15 @@
|
|||||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Assembly-CSharp">
|
||||||
|
<HintPath>..\AssemblyFromGame\Assembly-CSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.UI">
|
||||||
|
<HintPath>..\AssemblyFromGame\UnityEngine.UI.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\UXAssist\UXAssist.csproj" />
|
<ProjectReference Include="..\UXAssist\UXAssist.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user