暂存
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace ArachnaeSwarm
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region State-Switching
|
||||
public override void Notify_Unequipped(Pawn pawn)
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user