Fuel (7)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

  • Called when a player tries to loot a vehicle's fuel container.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.IsInFuelInteractionRange of Assembly-CSharp.dll.

Example
object CanCheckFuel(EntityFuelSystem self, StorageContainer local0, BasePlayer player)
{
    Puts("CanCheckFuel was called!");
    return (bool) null;
}
  • Called before a vehicle fuel system consumes fuel.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.TryUseFuel of Assembly-CSharp.dll.

Example
object CanUseFuel(EntityFuelSystem self, StorageContainer local0, float seconds, float fuelUsedPerSecond)
{
    Puts("CanUseFuel was called!");
    return (bool) null;
}
  • Called when the amount of fuel in a vehicle is being determined.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.GetFuelAmount of Assembly-CSharp.dll.

Example
object OnFuelAmountCheck(EntityFuelSystem self, Item local0)
{
    Puts("OnFuelAmountCheck was called!");
    return (int) null;
}
  • Called when determining whether a vehicle has sufficient fuel.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.HasFuel of Assembly-CSharp.dll.

Example
object OnFuelCheck(EntityFuelSystem self)
{
    Puts("OnFuelCheck was called!");
    return (bool) null;
}
  • Called right before fuel is used (furnace, lanterns, camp fires, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseOven.ConsumeFuel of Assembly-CSharp.dll.

Example
object OnFuelConsume(BaseOven self)
{
    Puts("OnFuelConsume was called!");
    return (object) null;
}
  • Called after fuel is used (furnace, lanterns, camp fires, etc.).

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseOven.ConsumeFuel of Assembly-CSharp.dll.

Example
void OnFuelConsumed(BaseOven self)
{
    Puts("OnFuelConsumed was called!");
}

This hook requires OnFuelConsume, which loads alongside OnFuelConsumed.

  • Called when determining which item should be used to fuel a vehicle.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches EntityFuelSystem.GetFuelItem of Assembly-CSharp.dll.

Example
object OnFuelItemCheck(EntityFuelSystem self, StorageContainer local0)
{
    Puts("OnFuelItemCheck was called!");
    return (Item) null;
}

Last updated