public override float TickActive() { base.TickActive(); bool hasFuel = FuelComp.HasFuel; FuelComp.Props.fuelConsumptionRate = hasFuel ? HEDef.activeFuelBurnRate : 0f; if (!hasFuel) { return(0f); } tickCounter++; if (tickCounter % 15 == 0) { #if V13 FleckMaker.ThrowSmoke(Position.ToVector3ShiftedWithAltitude(AltitudeLayer.MoteOverhead) + new Vector3(0.5f, 0, 2f), Map, 0.65f); #else MoteMaker.ThrowSmoke(Position.ToVector3ShiftedWithAltitude(AltitudeLayer.MoteOverhead) + new Vector3(0.5f, 0, 2f), Map, 0.65f); #endif } FuelComp.ConsumeFuel(FuelComp.Props.fuelConsumptionRate / 60000f); return(HEDef.maxAddedHeat); }
private void StartPowerUpSequence() { // Then enter the powering up phase. PoweringUpTicks = 0; // Remove antimatter fuel. At his point the firing cannot be cancelled. FuelComp.SetFuelLevel(0); // Play the long attack sound. SoundInfo info = SoundInfo.InMap(this, MaintenanceType.PerTick); soundSustainer = AADefOf.LaserStrike_AA.TrySpawnSustainer(info); // Do particle effects. chargeEffect?.Play(true); // Enable glow start. CompGlower?.ReceiveCompSignal("PowerTurnedOn"); }