Skip to content

OnEngineStatsRefreshed

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnEngineStatsRefreshed( VehicleModuleEngine instance, EngineStorage engineStorage )
{
    Puts( "OnEngineStatsRefreshed works!" );
}

Location

  • VehicleModuleEngine::RefreshPerformanceStats(Rust.Modular.EngineStorage engineStorage)
csharp
//---
		this.PerformanceFractionAcceleration = this.GetPerformanceFraction(engineStorage.accelerationBoostPercent);
		this.PerformanceFractionTopSpeed = this.GetPerformanceFraction(engineStorage.topSpeedBoostPercent);
		this.PerformanceFractionFuelEconomy = this.GetPerformanceFraction(engineStorage.fuelEconomyBoostPercent);
	}
	this.OverallPerformanceFraction = (this.PerformanceFractionAcceleration + this.PerformanceFractionTopSpeed + this.PerformanceFractionFuelEconomy) / 3f;
	Interface.CallHook("OnEngineStatsRefreshed", this, engineStorage);
}

Released under the MIT License.