This commit is contained in:
2025-09-08 20:09:22 +08:00
parent 30ee96a196
commit 8d6c992f1f
3 changed files with 9 additions and 1 deletions

Binary file not shown.

View File

@@ -21,9 +21,14 @@ namespace ArachnaeSwarm
private Pawn Pawn => (Pawn)parent;
public CompProperties_PawnFlight Props => (CompProperties_PawnFlight)props;
public bool Flying => flightState != FlightState.Grounded; // Public property for Harmony patch
public bool Flying => flightState != FlightState.Grounded;
public bool ShouldShowWings => flightState != FlightState.Grounded;
// Hardcoded curves, similar to vanilla Pawn_FlightTracker
private static readonly SimpleCurve TakeoffCurve = new SimpleCurve { new CurvePoint(0f, 0f), new CurvePoint(0.5f, 0.6f), new CurvePoint(1f, 1f) };
private static readonly SimpleCurve LandingCurve = new SimpleCurve { new CurvePoint(0f, 1f), new CurvePoint(0.5f, 0.4f), new CurvePoint(1f, 0f) };
public override void CompTick()
{
base.CompTick();

View File

@@ -26,6 +26,9 @@ namespace ArachnaeSwarm
public float flightCooldownSeconds = 2f;
public float flightStartChanceOnJobStart = 0.5f;
// takeoffCurve and landingCurve are removed as they cannot be loaded directly from XML.
// They will be hardcoded in the CompPawnFlight class.
public CompProperties_PawnFlight()
{
compClass = typeof(CompPawnFlight);