You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found an issue with vehicles. They have unlimited fuel when in a caravan (world view). The code to look at is here in CompVehicle.cs
//If it isn't moving than it shouldn't use fuel
if ((this.Pawn.pather != null && !this.Pawn.pather.Moving) || (this.Pawn.GetCaravan() != null && (this.Pawn.GetCaravan().CantMove)))
compRefuelable.Props.fuelConsumptionRate = 0f;
else
//If it's moving than it should use fuel
compRefuelable.Props.fuelConsumptionRate = this.fuelConsumptionRate;
Change to something like this to fix:
if ((this.Pawn.pather != null && this.Pawn.pather.Moving))
compRefuelable.Props.fuelConsumptionRate = this.fuelConsumptionRate;
else if((this.Pawn.GetCaravan() != null && !this.Pawn.GetCaravan().Resting) && (this.Pawn.GetCaravan() != null && !this.Pawn.GetCaravan().CantMove))
compRefuelable.Props.fuelConsumptionRate = this.fuelConsumptionRate;
else //If it isn't moving than it shouldn't use fuel
compRefuelable.Props.fuelConsumptionRate = 0f;
The text was updated successfully, but these errors were encountered:
Found an issue with vehicles. They have unlimited fuel when in a caravan (world view). The code to look at is here in CompVehicle.cs
Change to something like this to fix:
The text was updated successfully, but these errors were encountered: