Skip to content

CanUseFuel

Usage

  • Return a non-null value or bool to override default behavior

Example Autogenerated

csharp
private void CanUseFuel( EntityFuelSystem instance, StorageContainer fuelContainer, float seconds, float fuelUsedPerSecond )
{
    Puts( "CanUseFuel works!" );
}

Location

  • EntityFuelSystem::TryUseFuel(float seconds, float fuelUsedPerSecond)
csharp
public int TryUseFuel(float seconds, float fuelUsedPerSecond)
{
	StorageContainer fuelContainer = this.GetFuelContainer();
	object returnvar = Interface.CallHook("CanUseFuel", this, fuelContainer, seconds, fuelUsedPerSecond);
	if (returnvar is int)
	{
		return (int)returnvar;
	}
	if (fuelContainer == null)
//---

Released under the MIT License.