存营养膏

This commit is contained in:
2025-09-19 20:06:29 +08:00
parent 0b6ae6c398
commit 2a6343097d
4 changed files with 12 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
using RimWorld;
using Verse;
using Verse.Sound; // Ensure this is present
using System.Collections.Generic;
using System.Linq;
namespace ArachnaeSwarm
{
@@ -62,5 +64,14 @@ namespace ArachnaeSwarm
if (this.dispenserProps == null) return false;
return this.nutritionComp != null && this.nutritionComp.Fuel >= this.dispenserProps.nutritionCostPerDispense;
}
public override IEnumerable<Gizmo> GetGizmos()
{
// base.GetGizmos() provides the "Build Hopper" gizmo, which we don't want.
// We filter it out here.
return base.GetGizmos().Where(gizmo =>
!(gizmo is Designator_Build designator && designator.PlacingDef == ThingDefOf.Hopper)
);
}
}
}