1
0
mirror of https://github.com/soarqin/DSP_Mods_TO.git synced 2025-12-12 01:23:31 +08:00

update XianTu to support latest patch

This commit is contained in:
2025-10-05 22:46:06 +08:00
parent bf383de76d
commit d8ab2163de
3 changed files with 51 additions and 35 deletions

View File

@@ -14,10 +14,18 @@
<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="*-r.*" /> <!--<PackageReference Include="DysonSphereProgram.GameLibs" Version="*-r.*" />-->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.*" /> <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.*" />
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" /> <PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" />
</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 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" />

View File

@@ -155,27 +155,29 @@ namespace XianTu.Scripts.DataController
} }
private void Build(BuildTool_BlueprintPaste bp) private void Build(BuildTool_BlueprintPaste bp)
{
if (bp.CheckBuildConditionsPrestage())
{ {
PlayerController.cmd.stage = 1; PlayerController.cmd.stage = 1;
bp.GenerateBlueprintGratBoxes(); bp.GenerateBlueprintGratBoxes();
bp.DeterminePreviewsPrestage(true); bp.DeterminePreviewsPrestage(true, false);
bp.ActiveColliders(_actionBuild.model); bp.ActiveColliders(_actionBuild.model);
bp.buildCondition = bp.CheckBuildConditions(); var buildCondition = bp.CheckBuildConditions();
bp.DeterminePreviews(); bp.DeterminePreviews();
bp.result = (buildCondition ? (bp.result & ~EBlueprintPasteResult.HasError) : (bp.result | EBlueprintPasteResult.HasError));
bp.DeactiveColliders(_actionBuild.model); bp.DeactiveColliders(_actionBuild.model);
var buildCondition = bp.buildCondition; bp.CalculateReformData();
if (buildCondition) if (buildCondition && bp.quickPaste && (bp.result & EBlueprintPasteResult.HasReform) == EBlueprintPasteResult.None)
{ {
bp.CreatePrebuilds(); bp.CreatePrebuilds();
bp.ResetStates(); bp.ResetStates();
} }
else }
{
bp.isDragging = false; bp.isDragging = false;
bp.startGroundPosSnapped = bp.castGroundPosSnapped; bp.startGroundPosSnapped = bp.castGroundPosSnapped;
bp.ErrorGridClustering();
_BuildTool_BluePrint_OnTick(); _BuildTool_BluePrint_OnTick();
} }
}
private void OnUserChangeData() private void OnUserChangeData()
{ {
@@ -372,20 +374,18 @@ namespace XianTu.Scripts.DataController
{ {
buildToolBlueprintPaste.ClearErrorMessage(); buildToolBlueprintPaste.ClearErrorMessage();
buildToolBlueprintPaste.UpdateRaycast(); buildToolBlueprintPaste.UpdateRaycast();
var flag2 = PlayerController.cmd.stage == 0; buildToolBlueprintPaste.CheckBuildConditionsPrestage();
if (flag2) switch (PlayerController.cmd.stage)
{ {
case 0:
buildToolBlueprintPaste.OperatingPrestage(); buildToolBlueprintPaste.OperatingPrestage();
} break;
else case 1:
{
var flag3 = PlayerController.cmd.stage == 1;
if (flag3)
{
buildToolBlueprintPaste.Operating(); buildToolBlueprintPaste.Operating();
} break;
} }
buildToolBlueprintPaste.UpdatePreviewModels(_actionBuild.model); buildToolBlueprintPaste.UpdatePreviewModels(_actionBuild.model);
buildToolBlueprintPaste.ErrorGridClustering();
} }
} }

View File

@@ -15,9 +15,17 @@
<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="*-r.*" /> <PackageReference Include="UnityEngine.Modules" Version="2022.3.53" IncludeAssets="compile" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.*" /> <!--<PackageReference Include="DysonSphereProgram.GameLibs" Version="*-r.*" />-->
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" /> <!--<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.*" />-->
</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 Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> <ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">