Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_FuelConsumptionComponent Interface Reference
Inheritance diagram for SCR_FuelConsumptionComponent:
[legend]

Public Member Functions

void SetCurrentFuelTank (int iFuelTankID)
 Switch the actual fuel tank (i.e.
 
BaseFuelNode GetCurrentFuelTank ()
 
void SetEnabled (bool enabled)
 
void Update ()
 updates currently active fueltank to see if it can still be used. turns off engine if no usable fueltanks are present.
 
void Update (float timeSlice)
 
override void OnPostInit (IEntity owner)
 
override void EOnInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 

Static Public Member Functions

static void SetGlobalFuelConsumptionScale (float globalFuelConsumptionScale, int playerThatChangedValue=-1)
 Set Fuel consumption scale of vehicles (and other fuel consumers) (Server only)
 
static float GetGlobalFuelConsumptionScale ()
 

Protected Member Functions

BaseFuelNode FindFuelTankByID (int iFuelTankID)
 returns the fuel tank pointer by the given FuelTankID
 
void ConnectToFuelConsumptionSystem ()
 
void DisconnectFromFuelConsumptionSystem ()
 
- Protected Member Functions inherited from ScriptGameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Attributes

bool m_bConnectedToSystem = false
 
float m_fTimeDelta
 
BaseFuelNode m_CurrentFuelTank
 
VehicleBaseSimulation m_Simulation
 
SCR_FuelConsumptionComponentClass m_ComponentData
 

Static Protected Attributes

const float SECOND_TO_HOUR = 1/3600
 
const float MIN_FUEL = 0
 
const float MIN_THRUST = 0.04
 
const float MIN_CLUTCH = 0.04
 
const float NEUTRAL_GEAR = 1
 
const float TIME_STEP = 1
 
static float s_fGlobalFuelConsumptionScale = 8
 Global Fuel consumption scale for vehicles (and other fuel consumers). x1 means the fuel consumption is roughly equal to real world fuel consumption.
 

Member Function Documentation

◆ ConnectToFuelConsumptionSystem()

void SCR_FuelConsumptionComponent.ConnectToFuelConsumptionSystem ( )
protected

◆ DisconnectFromFuelConsumptionSystem()

void SCR_FuelConsumptionComponent.DisconnectFromFuelConsumptionSystem ( )
protected

◆ EOnInit()

override void SCR_FuelConsumptionComponent.EOnInit ( IEntity  owner)

◆ FindFuelTankByID()

BaseFuelNode SCR_FuelConsumptionComponent.FindFuelTankByID ( int  iFuelTankID)
protected

returns the fuel tank pointer by the given FuelTankID

Parameters
[in]iFuelTankID
Returns

◆ GetCurrentFuelTank()

BaseFuelNode SCR_FuelConsumptionComponent.GetCurrentFuelTank ( )
Returns

◆ GetGlobalFuelConsumptionScale()

static float SCR_FuelConsumptionComponent.GetGlobalFuelConsumptionScale ( )
static
Returns
Global Fuel consumption Scale

◆ OnDelete()

override void SCR_FuelConsumptionComponent.OnDelete ( IEntity  owner)

◆ OnPostInit()

override void SCR_FuelConsumptionComponent.OnPostInit ( IEntity  owner)

◆ SetCurrentFuelTank()

void SCR_FuelConsumptionComponent.SetCurrentFuelTank ( int  iFuelTankID)

Switch the actual fuel tank (i.e.

by a switch on the dashboard)

Parameters
[in]iFuelTankID

◆ SetEnabled()

void SCR_FuelConsumptionComponent.SetEnabled ( bool  enabled)
Parameters
[in]enabled

◆ SetGlobalFuelConsumptionScale()

static void SCR_FuelConsumptionComponent.SetGlobalFuelConsumptionScale ( float  globalFuelConsumptionScale,
int  playerThatChangedValue = -1 
)
static

Set Fuel consumption scale of vehicles (and other fuel consumers) (Server only)

Parameters
[in]globalFuelConsumptionScaleNew fuel consumption scale
[in]playerThatChangedValueOptional, if value given then a notification is send on scale changed

◆ Update() [1/2]

void SCR_FuelConsumptionComponent.Update ( )

updates currently active fueltank to see if it can still be used. turns off engine if no usable fueltanks are present.

◆ Update() [2/2]

void SCR_FuelConsumptionComponent.Update ( float  timeSlice)
Parameters
[in]timeSlice

Member Data Documentation

◆ m_bConnectedToSystem

bool SCR_FuelConsumptionComponent.m_bConnectedToSystem = false
protected

◆ m_ComponentData

SCR_FuelConsumptionComponentClass SCR_FuelConsumptionComponent.m_ComponentData
protected

◆ m_CurrentFuelTank

BaseFuelNode SCR_FuelConsumptionComponent.m_CurrentFuelTank
protected

◆ m_fTimeDelta

float SCR_FuelConsumptionComponent.m_fTimeDelta
protected

◆ m_Simulation

VehicleBaseSimulation SCR_FuelConsumptionComponent.m_Simulation
protected

◆ MIN_CLUTCH

const float SCR_FuelConsumptionComponent.MIN_CLUTCH = 0.04
staticprotected

◆ MIN_FUEL

const float SCR_FuelConsumptionComponent.MIN_FUEL = 0
staticprotected

◆ MIN_THRUST

const float SCR_FuelConsumptionComponent.MIN_THRUST = 0.04
staticprotected

◆ NEUTRAL_GEAR

const float SCR_FuelConsumptionComponent.NEUTRAL_GEAR = 1
staticprotected

◆ s_fGlobalFuelConsumptionScale

float SCR_FuelConsumptionComponent.s_fGlobalFuelConsumptionScale = 8
staticprotected

Global Fuel consumption scale for vehicles (and other fuel consumers). x1 means the fuel consumption is roughly equal to real world fuel consumption.

◆ SECOND_TO_HOUR

const float SCR_FuelConsumptionComponent.SECOND_TO_HOUR = 1/3600
staticprotected

◆ TIME_STEP

const float SCR_FuelConsumptionComponent.TIME_STEP = 1
staticprotected

The documentation for this interface was generated from the following file: