Skip to content

OnEngineLoadoutRefresh ​

Usage ​

  • Return a non-null value to override default behavior

Example Autogenerated ​

csharp
private object OnEngineLoadoutRefresh( Rust.Modular.EngineStorage instance )
{
    Puts( "OnEngineLoadoutRefresh works!" );
    return null;
}

Location ​

  • Rust.Modular.EngineStorage::RefreshLoadoutData()
csharp
public void RefreshLoadoutData()
{
	if (Interface.CallHook("OnEngineLoadoutRefresh", this) == null)
	{
		isUsable = base.inventory.IsFull() && base.inventory.itemList.All((Item item) => !item.isBroken);
		accelerationBoostPercent = GetContainerItemsValueFor(EngineItemTypeEx.BoostsAcceleration) / (float)accelerationBoostSlots;
		topSpeedBoostPercent = GetContainerItemsValueFor(EngineItemTypeEx.BoostsTopSpeed) / (float)topSpeedBoostSlots;
		fuelEconomyBoostPercent = GetContainerItemsValueFor(EngineItemTypeEx.BoostsFuelEconomy) / (float)fuelEconomyBoostSlots;
//---

Released under the MIT License.