暂存
This commit is contained in:
@@ -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">
|
||||
|
||||
33
Source/ArachnaeSwarm/Utils/CompTempControl_Fixed.cs
Normal file
33
Source/ArachnaeSwarm/Utils/CompTempControl_Fixed.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user