|
int | GetScriptedFuelNodesList (out notnull array< SCR_FuelNode > outScriptedNodes) |
|
int | GetScriptedFuelNodesList (out notnull array< SCR_FuelNode > outScriptedNodes, SCR_EFuelNodeTypeFlag hasFuelNodeFlags, SCR_EFuelNodeTypeFlag ignoreIfHasFlags=0, SCR_EFuelNodeFlagQueryType queryType=SCR_EFuelNodeFlagQueryType.ALL_GIVEN_TYPES) |
|
bool | CanBeRefueledScripted (array< int > fuelTanksReceivers=null, SCR_EFuelNodeTypeFlag ignoreIfHasFlags=0) |
| Check if fuel manager can be refueled.
|
|
bool | HasFuelToProvide (SCR_EFuelNodeTypeFlag ignoreIfHasFlags=0) |
| Check if fuelmanager has any fuel in fuel nodes that can provide fuel (SCR_FuelNode only)
|
|
void | GetTotalValuesOfFuelNodes (out float totalFuel, out float totalMaxFuel, out float totalFuelPercentage, SCR_EFuelNodeTypeFlag hasFuelNodeFlags=0, SCR_EFuelNodeTypeFlag ignoreIfHasFlags=0, SCR_EFuelNodeFlagQueryType queryType=SCR_EFuelNodeFlagQueryType.ALL_GIVEN_TYPES) |
| Get to currentFuel, totalfuel and fuel percentage of all nodes with the given flags.
|
|
void | SetTotalFuelPercentage (float percentage, SCR_EFuelNodeTypeFlag hasFuelNodeFlags=0, SCR_EFuelNodeTypeFlag ignoreIfHasFlags=0, SCR_EFuelNodeFlagQueryType queryType=SCR_EFuelNodeFlagQueryType.ALL_GIVEN_TYPES) |
| Set the total fuel percentage to a value between 0 and 1.
|
|
ScriptInvokerFloat | GetOnFuelChanged () |
| Return script invoker for on fuel changed.
|
|
void | SCR_FuelManagerComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
|
proto external int | GetFuelNodesList (out notnull array< BaseFuelNode > outNodes) |
|
proto external bool | HasFuel () |
| Returns true if one node has at least some fuel.
|
|
proto external bool | CanBeRefueled () |
| Returns true if at least one node can be refueled.
|
|
proto external float | GetTotalFuel () |
| Get the current sum of amount of fuel in all nodes.
|
|
proto external float | GetTotalMaxFuel () |
| Get the current sum of the max amount of fuel in all nodes.
|
|
void | OnInit (IEntity owner) |
|
bool | OnTicksOnRemoteProxy () |
|
|
static int | GetAllFuelManagers (notnull IEntity entity, out notnull array< SCR_FuelManagerComponent > fuelManagers) |
| Transfer fuel to fuel nodes within the fuel manager (server only)
|
|
static void | GetTotalValuesOfFuelNodesOfFuelManagers (notnull array< SCR_FuelManagerComponent > fuelManagers, out float totalFuel, out float totalMaxFuel, out float totalFuelPercentage, SCR_EFuelNodeTypeFlag hasfuelNodeFlags=0, SCR_EFuelNodeTypeFlag ignoreIfHasFlags=0, SCR_EFuelNodeFlagQueryType queryType=SCR_EFuelNodeFlagQueryType.ALL_GIVEN_TYPES) |
| Get to currentFuel, totalfuel and fuel percentage of all nodes with the given flags.
|
|
static void | SetTotalFuelPercentageOfFuelManagers (notnull array< SCR_FuelManagerComponent > fuelManagers, float percentage, SCR_EFuelNodeTypeFlag hasFuelNodeFlags=0, SCR_EFuelNodeTypeFlag ignoreIfHasFlags=0, SCR_EFuelNodeFlagQueryType queryType=SCR_EFuelNodeFlagQueryType.ALL_GIVEN_TYPES) |
| Set the total fuel percentage to a value between 0 and 1 of all given fuelmanagers (Server Only) Distributes the fuel correctly between all fuel nodes.
|
|
◆ SCR_FuelManagerComponent()
void SCR_FuelManagerComponent.SCR_FuelManagerComponent |
( |
IEntityComponentSource |
src, |
|
|
IEntity |
ent, |
|
|
IEntity |
parent |
|
) |
| |
- Parameters
-
[in] | src | |
[in] | ent | |
[in] | parent | |
◆ CanBeRefueledScripted()
bool SCR_FuelManagerComponent.CanBeRefueledScripted |
( |
array< int > |
fuelTanksReceivers = null , |
|
|
SCR_EFuelNodeTypeFlag |
ignoreIfHasFlags = 0 |
|
) |
| |
Check if fuel manager can be refueled.
Will only check fuel nodes with the CAN_RECEIVE_FUEL and without any of the given ignoreIfHasFlags
- Parameters
-
[in] | fuelTanksReceivers | optional if you want to only check specific fuel tanks. Leave null or empty to ignore |
[in] | ignoreIfHasFlags | ignore any fuel nodes that have the ignore flags. Leave 0 to ignore |
- Returns
- true if at least one fuel node can be refueled
◆ GetAllFuelManagers()
static int SCR_FuelManagerComponent.GetAllFuelManagers |
( |
notnull IEntity |
entity, |
|
|
out notnull array< SCR_FuelManagerComponent > |
fuelManagers |
|
) |
| |
|
static |
Transfer fuel to fuel nodes within the fuel manager (server only)
- Parameters
-
[in] | provider | If fuel should be taken from another fuel manager |
[in] | fuelTanksReceivers | Only transfer fuel into the given fuel managers. If empty array all are used. Note that the fuel tanks still need the CAN_RECEIVE_FUEL flag in order to receive fuel |
[in] | ignoreIfHasFlags | Ignore any fuel nodes of provider that have the ignore flags. Leave 0 to ignore |
- Returns
- Fuel amount that was left over as all fuel nodes that can receive full are full
- Parameters
-
[in] | entity | |
[out] | fuelManagers | |
- Returns
◆ GetOnFuelChanged()
ScriptInvokerFloat SCR_FuelManagerComponent.GetOnFuelChanged |
( |
| ) |
|
Return script invoker for on fuel changed.
Note that this creates fuel invokers for all SCR_FuelNodes and there is no way currently to destroy them so can be costly
- Returns
- scriptInvoker on fuel changed. Includes current total fuel amount
◆ GetScriptedFuelNodesList() [1/2]
int SCR_FuelManagerComponent.GetScriptedFuelNodesList |
( |
out notnull array< SCR_FuelNode > |
outScriptedNodes | ) |
|
◆ GetScriptedFuelNodesList() [2/2]
int SCR_FuelManagerComponent.GetScriptedFuelNodesList |
( |
out notnull array< SCR_FuelNode > |
outScriptedNodes, |
|
|
SCR_EFuelNodeTypeFlag |
hasFuelNodeFlags, |
|
|
SCR_EFuelNodeTypeFlag |
ignoreIfHasFlags = 0 , |
|
|
SCR_EFuelNodeFlagQueryType |
queryType = SCR_EFuelNodeFlagQueryType::ALL_GIVEN_TYPES |
|
) |
| |
- Parameters
-
[out] | outScriptedNodes | |
[in] | hasFuelNodeFlags | |
[in] | ignoreIfHasFlags | |
[in] | queryType | |
- Returns
◆ GetTotalValuesOfFuelNodes()
void SCR_FuelManagerComponent.GetTotalValuesOfFuelNodes |
( |
out float |
totalFuel, |
|
|
out float |
totalMaxFuel, |
|
|
out float |
totalFuelPercentage, |
|
|
SCR_EFuelNodeTypeFlag |
hasFuelNodeFlags = 0 , |
|
|
SCR_EFuelNodeTypeFlag |
ignoreIfHasFlags = 0 , |
|
|
SCR_EFuelNodeFlagQueryType |
queryType = SCR_EFuelNodeFlagQueryType::ALL_GIVEN_TYPES |
|
) |
| |
Get to currentFuel, totalfuel and fuel percentage of all nodes with the given flags.
- Parameters
-
[out] | totalFuel | Total current fuel of all fuel nodes |
[out] | totalMaxFuel | Total max fuel of all fuel nodes |
[out] | totalFuelPercentage | Total fuel percentage of all fuel nodes. Gives value from 0 to 1 |
[in] | fuelNodeFlags | Only checks fuel nodes with given type (or types depending if all or one flag is required). Leave 0 to get all node types even non SCR_FuelNodes. Otherwise only checks SCR_FuelNodes |
[in] | ignoreIfHasFlags | Any nodes with this flag is skipped. Leave 0 to ignore |
[in] | queryType | If the obtained data is from fuelnodes with: The exact given type, has all given flags, has at least one given flag |
◆ GetTotalValuesOfFuelNodesOfFuelManagers()
static void SCR_FuelManagerComponent.GetTotalValuesOfFuelNodesOfFuelManagers |
( |
notnull array< SCR_FuelManagerComponent > |
fuelManagers, |
|
|
out float |
totalFuel, |
|
|
out float |
totalMaxFuel, |
|
|
out float |
totalFuelPercentage, |
|
|
SCR_EFuelNodeTypeFlag |
hasfuelNodeFlags = 0 , |
|
|
SCR_EFuelNodeTypeFlag |
ignoreIfHasFlags = 0 , |
|
|
SCR_EFuelNodeFlagQueryType |
queryType = SCR_EFuelNodeFlagQueryType::ALL_GIVEN_TYPES |
|
) |
| |
|
static |
Get to currentFuel, totalfuel and fuel percentage of all nodes with the given flags.
- Parameters
-
[in] | fuelManagers | FuelManagers |
[out] | totalFuel | Total current fuel of all fuel nodes |
[out] | totalMaxFuel | Total max fuel of all fuel nodes |
[out] | totalFuelPercentage | Total fuel percentage of all fuel nodes. Gives value from 0 to 1 |
[in] | hasfuelNodeFlags | Only checks fuel nodes with given type (or types depending if all or one flag is required). Leave 0 to get all node types even non SCR_FuelNodes. Otherwise only checks SCR_FuelNodes |
[in] | ignoreIfHasFlags | Any nodes with this flag is skipped. Leave 0 to ignore |
[in] | queryType | If the obtained data is from fuelnodes with: The exact given type, has all given flags, has at least one given flag |
◆ HasFuelToProvide()
bool SCR_FuelManagerComponent.HasFuelToProvide |
( |
SCR_EFuelNodeTypeFlag |
ignoreIfHasFlags = 0 | ) |
|
Check if fuelmanager has any fuel in fuel nodes that can provide fuel (SCR_FuelNode only)
- Parameters
-
[in] | ignoreIfHasFlags | any nodes with this flag is skipped. Leave 0 to ignore |
- Returns
- true if it can provide fuel
◆ OnFuelNodeAmountChanged()
void SCR_FuelManagerComponent.OnFuelNodeAmountChanged |
( |
float |
newFuel | ) |
|
|
protected |
◆ SetTotalFuelPercentage()
void SCR_FuelManagerComponent.SetTotalFuelPercentage |
( |
float |
percentage, |
|
|
SCR_EFuelNodeTypeFlag |
hasFuelNodeFlags = 0 , |
|
|
SCR_EFuelNodeTypeFlag |
ignoreIfHasFlags = 0 , |
|
|
SCR_EFuelNodeFlagQueryType |
queryType = SCR_EFuelNodeFlagQueryType::ALL_GIVEN_TYPES |
|
) |
| |
Set the total fuel percentage to a value between 0 and 1.
(Server only) Distributes the fuel correctly between all fuel nodes
- Parameters
-
[in] | percentage | Percentage of fuel to set |
[in] | hasFuelNodeFlags | Flag of what type (or types depending if all or one flag is required) of fuel nodes can be set. Leave 0 to set all node types. Non SCR_Nodes are always valid |
[in] | ignoreIfHasFlags | Any nodes with this flag is skipped. Leave 0 to ignore |
[in] | queryType | If the nodes that are set have: The exact given type, has all given flags, has at least one given flag |
◆ SetTotalFuelPercentageOfFuelManagers()
static void SCR_FuelManagerComponent.SetTotalFuelPercentageOfFuelManagers |
( |
notnull array< SCR_FuelManagerComponent > |
fuelManagers, |
|
|
float |
percentage, |
|
|
SCR_EFuelNodeTypeFlag |
hasFuelNodeFlags = 0 , |
|
|
SCR_EFuelNodeTypeFlag |
ignoreIfHasFlags = 0 , |
|
|
SCR_EFuelNodeFlagQueryType |
queryType = SCR_EFuelNodeFlagQueryType::ALL_GIVEN_TYPES |
|
) |
| |
|
static |
Set the total fuel percentage to a value between 0 and 1 of all given fuelmanagers (Server Only) Distributes the fuel correctly between all fuel nodes.
- Parameters
-
[in] | fuelManagers | FuelManagers |
[in] | percentage | Percentage of fuel to set |
[in] | hasFuelNodeFlags | Flag of what type (or types depending if all or one flag is required) of fuel nodes can be set. Leave 0 to set all node types. Non SCR_Nodes are always valid |
[in] | ignoreIfHasFlags | Any nodes with this flag is skipped. Leave 0 to ignore |
[in] | queryType | If the nodes that are set have: The exact given type, has all given flags, has at least one given flag |
◆ m_OnFuelChanged
ref ScriptInvokerFloat SCR_FuelManagerComponent.m_OnFuelChanged |
|
protected |
The documentation for this interface was generated from the following file:
- Game/Components/Fuel/SCR_FuelManagerComponent.c