This commit is contained in:
2025-10-15 15:40:34 +08:00
parent 500e13da70
commit 06c3ea0409
7 changed files with 50 additions and 13 deletions

View File

@@ -7,13 +7,27 @@ namespace ArachnaeSwarm
{
public class CompProperties_RefuelableNutrition : CompProperties_Refuelable
{
public bool silent = false;
public CompProperties_RefuelableNutrition()
{
compClass = typeof(CompRefuelableNutrition);
// 默认启用这些Gizmo除非在XML中明确设置为false
this.targetFuelLevelConfigurable = true;
this.showAllowAutoRefuelToggle = true;
}
public override IEnumerable<StatDrawEntry> SpecialDisplayStats(StatRequest req)
{
if (silent)
{
yield break; // If silent, return nothing.
}
foreach (var stat in base.SpecialDisplayStats(req))
{
yield return stat;
}
}
}
[StaticConstructorOnStartup]

View File

@@ -152,7 +152,7 @@ namespace ArachnaeSwarm
}
}
#endregion
#region State-Switching
public override void Notify_Unequipped(Pawn pawn)
{

View File

@@ -20,6 +20,17 @@ namespace ArachnaeSwarm
{
public CompProperties_PowerArmorStation Props => (CompProperties_PowerArmorStation)props;
public override void CompTick()
{
base.CompTick();
var fuelComp = parent.GetComp<CompRefuelableNutrition>();
if (fuelComp != null)
{
// Set consumption rate to 0 when in building form
fuelComp.currentConsumptionRate = 0f;
}
}
public override IEnumerable<FloatMenuOption> CompFloatMenuOptions(Pawn selPawn)
{
foreach (FloatMenuOption option in base.CompFloatMenuOptions(selPawn))