This commit is contained in:
2025-09-16 14:00:50 +08:00
parent a7c96c6aed
commit 26f66d2ca4
9 changed files with 89 additions and 11 deletions

View File

@@ -223,6 +223,9 @@
<Compile Include="WULA_MutiFuelSpawner\Patch_CompRefuelableWithKey.cs" />
<Compile Include="WULA_MutiFuelSpawner\CompRefuelableNutrition_WithKey.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="Utils\CompTempControl_Fixed.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 自定义清理任务删除obj文件夹中的临时文件 -->
<Target Name="CleanDebugFiles" AfterTargets="Build">

View File

@@ -0,0 +1,33 @@
using RimWorld;
using Verse;
namespace ArachnaeSwarm
{
// First, we need a new properties class that points to our new component class
public class CompProperties_TempControl_Fixed : CompProperties_TempControl
{
public CompProperties_TempControl_Fixed()
{
compClass = typeof(CompTempControl_Fixed);
}
}
// This is our new component class that inherits from the original
public class CompTempControl_Fixed : CompTempControl
{
// We override the problematic method
public override string CompInspectStringExtra()
{
// Call the original method to get its string
string baseString = base.CompInspectStringExtra();
// If the string is not null, trim any whitespace from the end and return it
if (!string.IsNullOrEmpty(baseString))
{
return baseString.TrimEnd();
}
return baseString;
}
}
}