Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
|
Go to the source code of this file.
Data Structures | |
class | SCR_ResourceComponentClass |
Typedefs | |
typedef func | SCR_Resources_OnResourceEnabledChanged |
Enumerations | |
enum | EResourceDebugVisualizationFlags |
Functions | |
enum EResourceDebugVisualizationFlags | SCR_Resources_OnResourceEnabledChanged (SCR_ResourceComponent resourceComponent, array< EResourceType > disabledResourceTypes) |
ScriptInvoker | TEMP_GetOnInteractorReplicated () |
HOTFIX: Until replication issues are resolved. More... | |
void | TEMP_OnInteractorReplicated () |
HOTFIX: Until replication issues are resolved. More... | |
bool | IsResourceTypeEnabled (EResourceType resourceType=EResourceType.SUPPLIES) |
int | GetDisabledResourceTypes (inout notnull array< EResourceType > disabledResourceTypes) |
bool | CanResourceTypeEnabledBeChanged (EResourceType resourceType=EResourceType.SUPPLIES) |
void | SetResourceTypeEnabled (bool enable, EResourceType resourceType=EResourceType.SUPPLIES) |
protected void | OnResourceTypeEnabledChanged () |
ScriptInvokerBase< SCR_Resources_OnResourceEnabledChanged > | GetOnResourceTypeEnabledChanged () |
int | GetGridContainersBoundsMins () |
int | GetGridContainersBoundsMaxs () |
void | GetGridContainersBounds (out int mins, out int maxs) |
void | GetGridContainersBoundingBox (out vector mins, out vector maxs) |
void | GetGridContainersWorldBoundingBox (out vector mins, out vector maxs) |
bool | IsDynamic () |
RplComponent | GetReplicationComponent () |
FactionAffiliationComponent | GetFactionAffiliationComponent () |
SCR_ResourceEncapsulator | GetEncapsulator (EResourceType resourceType) |
bool | GetEncapsulator (EResourceType resourceType, out SCR_ResourceEncapsulator encapsulator) |
protected bool | GetNextEncapsulatorCandidate (inout int position, inout int higherLimitPosition, inout SCR_ResourceEncapsulator encapsulator, EResourceType resourceType) |
array< SCR_ResourceEncapsulator > | GetEncapsulators () |
SCR_ResourceContainer | GetContainer (EResourceType resourceType) |
bool | GetContainer (EResourceType resourceType, out SCR_ResourceContainer container) |
protected bool | GetNextContainerCandidate (inout int position, inout int higherLimitPosition, inout SCR_ResourceContainer container, EResourceType resourceType) |
array< SCR_ResourceContainer > | GetContainers () |
SCR_ResourceConsumer | GetConsumer (EResourceGeneratorID identifier, EResourceType resourceType) |
bool | GetConsumer (EResourceGeneratorID identifier, EResourceType resourceType, inout SCR_ResourceConsumer consumer) |
protected bool | GetNextConsumerCandidate (inout int position, inout int higherLimitPosition, inout SCR_ResourceConsumer consumer, EResourceGeneratorID identifier, EResourceType resourceType) |
array< SCR_ResourceConsumer > | GetConsumers () |
SCR_ResourceGenerator | GetGenerator (EResourceGeneratorID identifier, EResourceType resourceType) |
bool | GetGenerator (EResourceGeneratorID identifier, EResourceType resourceType, out SCR_ResourceGenerator generator) |
protected bool | GetNextGeneratorCandidate (inout int position, inout int higherLimitPosition, inout SCR_ResourceGenerator generator, EResourceGeneratorID identifier, EResourceType resourceType) |
array< SCR_ResourceGenerator > | GetGenerators () |
int | GetGridUpdateId () |
vector | GetLastPosition () |
bool | HasParent () |
Color | GetDebugColor () |
bool | IsGridUpdateIdGreaterThan (int gridUpdateId) |
bool | IsDebugVisualizationEnabled () |
bool | IsVisible () |
bool | IsOwnerActive () |
protected bool | ShouldConsumersBeReplicated () |
protected bool | ShouldGeneratorsBeReplicated () |
void | SetGridUpdateId (int gridUpdateId) |
void | SetIsVisible (bool state) |
void | SetGridContainersBoundsMins (int mins) |
void | SetGridContainersBoundsMaxs (int maxs) |
void | SetGridContainersBounds (int mins, int maxs) |
void | UpdateLastPosition () |
Updates the serial number for the current processing call of the resource grid onto this component. More... | |
void | FlagForProcessing () |
void | UnflagForProcessing () |
void | DeleteConsumers () |
void | DeleteGenerators () |
void | DeleteQueryInteractors () |
override event protected void | OnPostInit (IEntity owner) |
Editable Mine. More... | |
void | Initialize (notnull IEntity owner) |
override event protected void | OnChildAdded (IEntity parent, IEntity child) |
override event protected void | EOnInit (IEntity owner) |
Initialise this component with data from FactionsManager. More... | |
protected void | DebugDraw () |
void | Replicate () |
void | ReplicateEx () |
void | OnVisibilityChanged () |
override event protected void | OnAddedToParent (IEntity child, IEntity parent) |
protected void | OnAddedToParentEx (IEntity child, IEntity parent) |
override event protected void | OnRemovedFromParent (IEntity child, IEntity parent) |
void | OnVehiclePhysicsActive (IEntity owner, bool activeState) |
override event protected void | OnDelete (IEntity owner) |
Variables | |
CONSUMER = 1 << 0 | |
CONTAINER = 1 << 1 | |
GENERATOR = 1 << 2 | |
ENCAPSULATOR = 1 << 3 | |
SCR_ResourceComponentClass | UPDATE_DISTANCE_TRESHOLD = 2.5 |
const float | UPDATE_DISTANCE_TRESHOLD_SQUARE = UPDATE_DISTANCE_TRESHOLD * UPDATE_DISTANCE_TRESHOLD |
const protected float | UPDATE_PERIOD = 10.0 / 60.0 |
protected bool | m_bIsDynamic |
protected bool | m_bIsNetDirty |
protected int | m_iGridUpdateId = int.MIN |
protected int | m_iGridContainersBoundsMins = 0xFFFFFFFF |
protected int | m_iGridContainersBoundsMaxs = 0xFFFFFFFF |
protected vector | m_vGridContainersBoundingVolumeMins |
protected vector | m_vGridContainersBoundingVolumeMaxs |
protected bool | m_bIsFlaggedForProcessing |
protected ref array< ref SCR_ResourceEncapsulator > | m_aEncapsulators |
Refer to SCR_ResourceEncapsulator for documentation. More... | |
protected ref array< ref SCR_ResourceConsumer > | m_aConsumers |
Refer to SCR_ResourceConsumer for documentation. More... | |
protected ref array< ref SCR_ResourceGenerator > | m_aGenerators |
Refer to SCR_ResourceGenerator for documentation. More... | |
protected ref array< EResourceType > | m_aDisabledResourceTypes |
protected ref array< EResourceType > | m_aDisallowChangingEnableResource |
protected ref ScriptInvoker | m_TEMP_OnInteractorReplicated |
HOTFIX: Until replication issues are resolved. More... | |
protected ref ScriptInvokerBase< SCR_Resources_OnResourceEnabledChanged > | m_OnResourceTypeEnabledChanged |
protected bool | m_bEnableDebugVisualization |
Setting for enabling the debugging visualization of the container and/or consumer. More... | |
protected EResourceDebugVisualizationFlags | m_eDebugVisualizationFlags |
Flags for enabling the debugging visualization. More... | |
protected ref Color | m_DebugColor |
Setting for the base color for the debugging visualization of the container and/or consumer. More... | |
protected bool | m_bIsVisible = true |
protected ref array< ref SCR_ResourceContainer > | m_aContainerInstances = {} |
protected RplComponent | m_ReplicationComponent |
Replication component attached to the owner entity. More... | |
protected FactionAffiliationComponent | m_FactionAffiliationComponent |
protected vector | m_LastPosition = vector.Zero |
protected bool | m_bHasParent |
protected bool | m_bIsOwnerActive |
protected bool | m_bIsInitialized |
protected bool | m_bIsAddedToParentBuffered |
Definition at line 11 of file SCR_ResourceComponent.c.
Definition at line 1 of file SCR_ResourceComponent.c.
bool CanResourceTypeEnabledBeChanged | ( | EResourceType | resourceType = EResourceType.SUPPLIES | ) |
[in] | resourceType | Type to check |
Definition at line 158 of file SCR_ResourceComponent.c.
protected void DebugDraw | ( | ) |
Processes and presents the debugging visualization for the consumer and/or container. Generic/Shared visualization should be processed explicitely here and consumer specific visualiation should be processed through SCR_ResourceConsumer::DebugDraw(), similarly for the container with SCR_ResourceContainer::DebugDraw(). A white arrow is drawn explicitely from here with the intent of providing a visual cue of the extents of the highest range, that is the storage range of the container or the resource range of the consumer. Whatever is the highest is the height that will be selected for this arrow.
TODO: Cache the height value and only change it on a event basis.
Processes and presents the debugging visualization for the encapsulator.
Draws the arrow for the visual cue regarding the maximum range.
Definition at line 1335 of file SCR_ResourceComponent.c.
void DeleteConsumers | ( | ) |
Definition at line 971 of file SCR_ResourceComponent.c.
void DeleteGenerators | ( | ) |
Definition at line 981 of file SCR_ResourceComponent.c.
void DeleteQueryInteractors | ( | ) |
Definition at line 991 of file SCR_ResourceComponent.c.
void FlagForProcessing | ( | ) |
Definition at line 947 of file SCR_ResourceComponent.c.
SCR_ResourceConsumer GetConsumer | ( | EResourceGeneratorID | identifier, |
EResourceType | resourceType | ||
) |
[in] | identifier | |
[in] | resourceType |
Definition at line 578 of file SCR_ResourceComponent.c.
bool GetConsumer | ( | EResourceGeneratorID | identifier, |
EResourceType | resourceType, | ||
inout SCR_ResourceConsumer | consumer | ||
) |
[in] | identifier | |
[in] | resourceType | |
[in,out] | consumer | The first consumer instance of a specified resource type, or null if none. |
Definition at line 611 of file SCR_ResourceComponent.c.
array<SCR_ResourceConsumer> GetConsumers | ( | ) |
Definition at line 681 of file SCR_ResourceComponent.c.
SCR_ResourceContainer GetContainer | ( | EResourceType | resourceType | ) |
[in] | resourceType |
Definition at line 463 of file SCR_ResourceComponent.c.
bool GetContainer | ( | EResourceType | resourceType, |
out SCR_ResourceContainer | container | ||
) |
[in] | resourceType | |
[out] | container |
Definition at line 495 of file SCR_ResourceComponent.c.
array<SCR_ResourceContainer> GetContainers | ( | ) |
Definition at line 555 of file SCR_ResourceComponent.c.
Color GetDebugColor | ( | ) |
Definition at line 848 of file SCR_ResourceComponent.c.
int GetDisabledResourceTypes | ( | inout notnull array< EResourceType > | disabledResourceTypes | ) |
[in] | disabledResourceTypes | List of disabled resources |
Definition at line 149 of file SCR_ResourceComponent.c.
SCR_ResourceEncapsulator GetEncapsulator | ( | EResourceType | resourceType | ) |
[in] | resourceType |
Definition at line 349 of file SCR_ResourceComponent.c.
bool GetEncapsulator | ( | EResourceType | resourceType, |
out SCR_ResourceEncapsulator | encapsulator | ||
) |
[in] | resourceType | |
[out] | encapsulator | The first encapsulator instance of a specified resource type, or null if none. |
Definition at line 380 of file SCR_ResourceComponent.c.
array<SCR_ResourceEncapsulator> GetEncapsulators | ( | ) |
Definition at line 437 of file SCR_ResourceComponent.c.
FactionAffiliationComponent GetFactionAffiliationComponent | ( | ) |
Definition at line 341 of file SCR_ResourceComponent.c.
SCR_ResourceGenerator GetGenerator | ( | EResourceGeneratorID | identifier, |
EResourceType | resourceType | ||
) |
[in] | identifier | |
[in] | resourceType |
Definition at line 702 of file SCR_ResourceComponent.c.
bool GetGenerator | ( | EResourceGeneratorID | identifier, |
EResourceType | resourceType, | ||
out SCR_ResourceGenerator | generator | ||
) |
[in] | identifier | |
[in] | resourceType | |
[out] | generator | The first generator instance of a specified resource type, or null if none. |
Definition at line 734 of file SCR_ResourceComponent.c.
array<SCR_ResourceGenerator> GetGenerators | ( | ) |
Definition at line 806 of file SCR_ResourceComponent.c.
void GetGridContainersBoundingBox | ( | out vector | mins, |
out vector | maxs | ||
) |
[out] | mins | |
[out] | maxs |
Definition at line 309 of file SCR_ResourceComponent.c.
[out] | mins | |
[out] | maxs |
Definition at line 300 of file SCR_ResourceComponent.c.
int GetGridContainersBoundsMaxs | ( | ) |
Definition at line 292 of file SCR_ResourceComponent.c.
int GetGridContainersBoundsMins | ( | ) |
Definition at line 285 of file SCR_ResourceComponent.c.
void GetGridContainersWorldBoundingBox | ( | out vector | mins, |
out vector | maxs | ||
) |
[out] | mins | |
[out] | maxs |
Definition at line 318 of file SCR_ResourceComponent.c.
int GetGridUpdateId | ( | ) |
Definition at line 827 of file SCR_ResourceComponent.c.
vector GetLastPosition | ( | ) |
Definition at line 834 of file SCR_ResourceComponent.c.
protected bool GetNextConsumerCandidate | ( | inout int | position, |
inout int | higherLimitPosition, | ||
inout SCR_ResourceConsumer | consumer, | ||
EResourceGeneratorID | identifier, | ||
EResourceType | resourceType | ||
) |
Definition at line 640 of file SCR_ResourceComponent.c.
protected bool GetNextContainerCandidate | ( | inout int | position, |
inout int | higherLimitPosition, | ||
inout SCR_ResourceContainer | container, | ||
EResourceType | resourceType | ||
) |
Definition at line 523 of file SCR_ResourceComponent.c.
protected bool GetNextEncapsulatorCandidate | ( | inout int | position, |
inout int | higherLimitPosition, | ||
inout SCR_ResourceEncapsulator | encapsulator, | ||
EResourceType | resourceType | ||
) |
Definition at line 409 of file SCR_ResourceComponent.c.
protected bool GetNextGeneratorCandidate | ( | inout int | position, |
inout int | higherLimitPosition, | ||
inout SCR_ResourceGenerator | generator, | ||
EResourceGeneratorID | identifier, | ||
EResourceType | resourceType | ||
) |
Definition at line 763 of file SCR_ResourceComponent.c.
ScriptInvokerBase<SCR_Resources_OnResourceEnabledChanged> GetOnResourceTypeEnabledChanged | ( | ) |
Definition at line 211 of file SCR_ResourceComponent.c.
RplComponent GetReplicationComponent | ( | ) |
Definition at line 334 of file SCR_ResourceComponent.c.
bool HasParent | ( | ) |
Definition at line 841 of file SCR_ResourceComponent.c.
void Initialize | ( | notnull IEntity | owner | ) |
[in] | owner |
Definition at line 1030 of file SCR_ResourceComponent.c.
bool IsDebugVisualizationEnabled | ( | ) |
Definition at line 863 of file SCR_ResourceComponent.c.
bool IsDynamic | ( | ) |
Definition at line 327 of file SCR_ResourceComponent.c.
bool IsGridUpdateIdGreaterThan | ( | int | gridUpdateId | ) |
bool IsOwnerActive | ( | ) |
Definition at line 877 of file SCR_ResourceComponent.c.
bool IsResourceTypeEnabled | ( | EResourceType | resourceType = EResourceType.SUPPLIES | ) |
[in] | resourceType | Type to check |
Definition at line 138 of file SCR_ResourceComponent.c.
bool IsVisible | ( | ) |
Definition at line 870 of file SCR_ResourceComponent.c.
override event protected void OnAddedToParent | ( | IEntity | child, |
IEntity | parent | ||
) |
Definition at line 1486 of file SCR_ResourceComponent.c.
protected void OnAddedToParentEx | ( | IEntity | child, |
IEntity | parent | ||
) |
Definition at line 1498 of file SCR_ResourceComponent.c.
override event protected void OnChildAdded | ( | IEntity | parent, |
IEntity | child | ||
) |
Called on parent entity when child entity is added into hierarchy
[in] | parent | |
[in] | child |
Definition at line 1275 of file SCR_ResourceComponent.c.
override event protected void OnRemovedFromParent | ( | IEntity | child, |
IEntity | parent | ||
) |
Definition at line 1532 of file SCR_ResourceComponent.c.
protected void OnResourceTypeEnabledChanged | ( | ) |
Definition at line 203 of file SCR_ResourceComponent.c.
void OnVehiclePhysicsActive | ( | IEntity | owner, |
bool | activeState | ||
) |
[in] | owner | |
[in] | activeState |
Definition at line 1551 of file SCR_ResourceComponent.c.
void OnVisibilityChanged | ( | ) |
Definition at line 1469 of file SCR_ResourceComponent.c.
void Replicate | ( | ) |
Definition at line 1400 of file SCR_ResourceComponent.c.
void ReplicateEx | ( | ) |
Utility method used to replicate the component state. Warning: This is important for the SCR_ResourceConsumer and SCR_ResourceContainer classes as it is used to cause the component to replicate, so do not add extra functionality here unless it is necessary for the replication functionality of both the SCR_ResourceConsumer and SCR_ResourceContainer classes.
Definition at line 1413 of file SCR_ResourceComponent.c.
enum EResourceDebugVisualizationFlags SCR_Resources_OnResourceEnabledChanged | ( | SCR_ResourceComponent | resourceComponent, |
array< EResourceType > | disabledResourceTypes | ||
) |
[in] | mins | |
[in] | maxs |
Definition at line 932 of file SCR_ResourceComponent.c.
void SetGridContainersBoundsMaxs | ( | int | maxs | ) |
[in] | maxs |
Definition at line 924 of file SCR_ResourceComponent.c.
void SetGridContainersBoundsMins | ( | int | mins | ) |
[in] | mins |
Definition at line 917 of file SCR_ResourceComponent.c.
void SetGridUpdateId | ( | int | gridUpdateId | ) |
[in] | gridUpdateId |
Definition at line 896 of file SCR_ResourceComponent.c.
void SetIsVisible | ( | bool | state | ) |
[in] | state |
Definition at line 906 of file SCR_ResourceComponent.c.
void SetResourceTypeEnabled | ( | bool | enable, |
EResourceType | resourceType = EResourceType.SUPPLIES |
||
) |
Set Resource Type enabled or disabled
[in] | enable | Set true to enable resource type, set false to disable |
[in] | resourceType | Resource type to enable/disable |
Definition at line 167 of file SCR_ResourceComponent.c.
protected bool ShouldConsumersBeReplicated | ( | ) |
Definition at line 883 of file SCR_ResourceComponent.c.
protected bool ShouldGeneratorsBeReplicated | ( | ) |
Definition at line 889 of file SCR_ResourceComponent.c.
ScriptInvoker TEMP_GetOnInteractorReplicated | ( | ) |
HOTFIX: Until replication issues are resolved.
Definition at line 86 of file SCR_ResourceComponent.c.
void TEMP_OnInteractorReplicated | ( | ) |
HOTFIX: Until replication issues are resolved.
Definition at line 96 of file SCR_ResourceComponent.c.
void UnflagForProcessing | ( | ) |
Definition at line 959 of file SCR_ResourceComponent.c.
void UpdateLastPosition | ( | ) |
Updates the serial number for the current processing call of the resource grid onto this component.
Definition at line 940 of file SCR_ResourceComponent.c.
CONSUMER = 1 << 0 |
Definition at line 2 of file SCR_ResourceComponent.c.
CONTAINER = 1 << 1 |
Definition at line 3 of file SCR_ResourceComponent.c.
ENCAPSULATOR = 1 << 3 |
Definition at line 5 of file SCR_ResourceComponent.c.
GENERATOR = 1 << 2 |
Definition at line 4 of file SCR_ResourceComponent.c.
protected ref array<ref SCR_ResourceConsumer> m_aConsumers |
Refer to SCR_ResourceConsumer for documentation.
Definition at line 65 of file SCR_ResourceComponent.c.
protected ref array<ref SCR_ResourceContainer> m_aContainerInstances = {} |
Defined/Configured through SCR_ResourceComponentClass::m_Container. Refer to SCR_ResourceContainer for documentation.
Definition at line 119 of file SCR_ResourceComponent.c.
protected ref array<EResourceType> m_aDisabledResourceTypes |
Definition at line 73 of file SCR_ResourceComponent.c.
protected ref array<EResourceType> m_aDisallowChangingEnableResource |
Definition at line 77 of file SCR_ResourceComponent.c.
protected ref array<ref SCR_ResourceEncapsulator> m_aEncapsulators |
Refer to SCR_ResourceEncapsulator for documentation.
Definition at line 61 of file SCR_ResourceComponent.c.
protected ref array<ref SCR_ResourceGenerator> m_aGenerators |
Refer to SCR_ResourceGenerator for documentation.
Definition at line 69 of file SCR_ResourceComponent.c.
protected bool m_bEnableDebugVisualization |
Setting for enabling the debugging visualization of the container and/or consumer.
Definition at line 104 of file SCR_ResourceComponent.c.
protected bool m_bHasParent |
Definition at line 126 of file SCR_ResourceComponent.c.
protected bool m_bIsAddedToParentBuffered |
Definition at line 133 of file SCR_ResourceComponent.c.
protected bool m_bIsDynamic |
Definition at line 48 of file SCR_ResourceComponent.c.
protected bool m_bIsFlaggedForProcessing |
Definition at line 57 of file SCR_ResourceComponent.c.
protected bool m_bIsInitialized |
Definition at line 130 of file SCR_ResourceComponent.c.
protected bool m_bIsNetDirty |
Definition at line 49 of file SCR_ResourceComponent.c.
protected bool m_bIsOwnerActive |
Definition at line 127 of file SCR_ResourceComponent.c.
protected bool m_bIsVisible = true |
Definition at line 115 of file SCR_ResourceComponent.c.
protected ref Color m_DebugColor |
Setting for the base color for the debugging visualization of the container and/or consumer.
Definition at line 112 of file SCR_ResourceComponent.c.
protected EResourceDebugVisualizationFlags m_eDebugVisualizationFlags |
Flags for enabling the debugging visualization.
Definition at line 108 of file SCR_ResourceComponent.c.
protected FactionAffiliationComponent m_FactionAffiliationComponent |
Definition at line 123 of file SCR_ResourceComponent.c.
protected int m_iGridContainersBoundsMaxs = 0xFFFFFFFF |
Definition at line 53 of file SCR_ResourceComponent.c.
protected int m_iGridContainersBoundsMins = 0xFFFFFFFF |
Definition at line 52 of file SCR_ResourceComponent.c.
protected int m_iGridUpdateId = int.MIN |
Definition at line 50 of file SCR_ResourceComponent.c.
protected vector m_LastPosition = vector.Zero |
Definition at line 125 of file SCR_ResourceComponent.c.
protected ref ScriptInvokerBase<SCR_Resources_OnResourceEnabledChanged> m_OnResourceTypeEnabledChanged |
Definition at line 82 of file SCR_ResourceComponent.c.
protected RplComponent m_ReplicationComponent |
Replication component attached to the owner entity.
Definition at line 122 of file SCR_ResourceComponent.c.
protected ref ScriptInvoker m_TEMP_OnInteractorReplicated |
HOTFIX: Until replication issues are resolved.
Definition at line 80 of file SCR_ResourceComponent.c.
protected vector m_vGridContainersBoundingVolumeMaxs |
Definition at line 55 of file SCR_ResourceComponent.c.
protected vector m_vGridContainersBoundingVolumeMins |
Definition at line 54 of file SCR_ResourceComponent.c.
SCR_ResourceComponentClass UPDATE_DISTANCE_TRESHOLD = 2.5 |
Component used to activate the sandbox resources functionality on an entity. This component can enable the functionality for both sandbox container and sandbox consumer in an individual manner. The sandbox resources functionality does not require a manager so just the presence of containers being registered into a consumer's queue is enough for it to perform its functionality. The replication component is a requirement for the component to work properly.
const float UPDATE_DISTANCE_TRESHOLD_SQUARE = UPDATE_DISTANCE_TRESHOLD * UPDATE_DISTANCE_TRESHOLD |
Definition at line 46 of file SCR_ResourceComponent.c.
const protected float UPDATE_PERIOD = 10.0 / 60.0 |
Definition at line 47 of file SCR_ResourceComponent.c.