37 protected ref set<SCR_ResourceInteractor>
m_aInteractors =
new set<SCR_ResourceInteractor>();
149 m_Owner.GetWorldBounds(mins, maxs);
187 array<SCR_ResourceInteractor> result =
new array<SCR_ResourceInteractor>();
191 result.Insert(interactor);
229 bool IsAllowed(notnull SCR_ResourceInteractor interactor)
239 return m_Owner == interactor.GetOwner();
244 FactionAffiliationComponent interactorFactionComponent = interactor.GetComponent().GetFactionAffiliationComponent();
246 if (!interactorFactionComponent)
249 FactionAffiliationComponent containerFactionComponent =
m_ResourceComponent.GetFactionAffiliationComponent();
251 if (!containerFactionComponent)
254 Faction interactorFaction = interactorFactionComponent.GetAffiliatedFaction();
255 Faction containerFaction = containerFactionComponent.GetAffiliatedFaction();
257 if (!interactorFaction || !containerFaction)
260 return interactorFaction == containerFaction || interactorFaction.IsFactionFriendly(containerFaction);
281 return Math3D.IntersectionSphereAABB(origin -
m_Owner.GetOrigin(), range, mins, maxs);
419 if (newValue > previousValue)
421 else if (newValue < previousValue)
648 SCR_ResourceInteractor interactor;
657 interactor.UnregisterContainer(
this);
694 int textColor = 0xFFFFFFFF;
697 textColor = 0xFF2222FF;
701 textColor = 0xFFFF2222;
772 interactor.UpdateContainerResourceValue(
this, previousValue);
799 if (previousValue != 0.0)
842 RplComponent.DeleteRplEntity(
m_Owner,
false);
868 interactor.UpdateContainerMaxResourceValue(
this, previousValue);
924 m_ResourceComponent = SCR_ResourceComponent.Cast(owner.FindComponent(SCR_ResourceComponent));
930 SCR_ResourceComponent parentResourceComponent;
941 parentResourceComponent = SCR_ResourceComponent.Cast(parentEntity.
FindComponent(SCR_ResourceComponent));
943 if (parentResourceComponent)
944 encapsulator = parentResourceComponent.GetEncapsulator(
m_eResourceType);
988 interactor.UnregisterContainer(
this);
ArmaReforgerScripted GetGame()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
EResourceContainerStorageType
EResourceContainerOnEmptyBehavior
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto external IEntity GetParent()
void SetHierarchyAsDirtyInParents()
SCR_ResourceComponent m_ResourceComponent
EResourceType m_eResourceType
EResourceRights m_eResourceRights
float GetResourceGainTickrate()
array< SCR_ResourceInteractor > GetLinkedInteractorsCopy()
SCR_ResourceEncapsulator m_ResourceEncapsulator
void OnResourcesDepleted(float previousValue)
override void Update(WorldTimestamp timestamp)
ref ScriptInvoker m_OnMaxResourcesChangedInvoker
void CopyFromContainer(notnull SCR_ResourceContainer container)
void ComputeResourceGain(float timeslice, out float resourceValue)
WorldTimestamp GetLastUpdateTimestamp()
Returns the timestamp that is aimed to be used for the computation of gain and decay.
void OnResourcesChanged(float previousValue)
void OnResourcesDecreased(float previousValue)
void OnGainEnabledChanged(float previousValue)
bool EnableDecay(bool shouldEnable, bool notifyChange=true)
bool SetResourceDecay(float value, bool notifyChange=true)
bool SetResourceValue(float value, bool notifyChange=true)
bool IsAllowed(notnull SCR_ResourceInteractor interactor)
bool IsInRange(vector origin, float range)
SCR_ResourceEncapsulator GetResourceEncapsulator()
void OnDecayChanged(float previousValue)
void SetResourceGainTickrate(float tickrate)
void UnlinkEveryInteractor()
void DebugDraw(bool shouldShowRange=true)
SCR_ResourceInteractor GetLinkedInteractorAt(int index)
ref ScriptInvoker m_OnResourcesDepletedInvoker
bool DecreaseResourceValue(float value, bool notifyChange=true)
void SetResourceGainTimeout(float timeout)
ref ScriptInvoker m_OnGainChangedInvoker
bool SetResourceGain(float value, bool notifyChange=true)
ref set< SCR_ResourceInteractor > m_aInteractors
bool MaxOutResourceValue(bool notifyChange=true)
float m_fResourceValueMax
ref ScriptInvoker m_OnResourcesMaxedOutInvoker
ScriptInvoker GetOnGainEnabledChanged()
ScriptInvoker GetOnResourcesDepleted()
bool UnlinkInteractor(notnull SCR_ResourceInteractor interactor)
EResourceContainerOnEmptyBehavior m_eOnEmptyBehavior
ScriptInvoker GetOnDecayChanged()
ref ScriptInvoker m_OnDecayEnabledChangedInvoker
void ComputeResourceDecay(float timeslice, out float resourceValue)
ref ScriptInvoker m_OnGainEnabledChangedInvoker
float GetResourceDecayTickrate()
int GetLinkedInteractorIndex(notnull SCR_ResourceInteractor interactor)
float m_fResourceGainTickrate
float m_fWeightMultiplier
void OnMaxResourcesChanged(float previousValue)
void OnDecayEnabledChanged(float previousValue)
float m_fResourceDecayTimeout
float m_fResourceValueCurrent
ScriptInvoker GetOnDecayEnabledChanged()
EResourceType GetResourceType()
float ComputeResourceDifference()
float GetMaxResourceValue()
bool SetMaxResourceValue(float value, bool notifyChange=true)
void SetResourceEncapsulator(SCR_ResourceEncapsulator encapsulator)
float m_fResourceGainTimeout
ScriptInvoker GetOnMaxResourcesChanged()
void OnResourcesMaxedOut(float previousValue)
void SetOnEmptyBehavior(EResourceContainerOnEmptyBehavior behavior)
void OnGainChanged(float previousValue)
ref ScriptInvoker m_OnResourcesChangedInvoker
bool IsResourceDecayEnabled()
void OnResourcesIncreased(float previousValue)
bool LinkInteractor(notnull SCR_ResourceInteractor interactor)
bool SetResourceValueUnsafe(float value, bool notifyChange=true)
bool m_bEnableResourceGain
bool EnableGain(bool shouldEnable, bool notifyChange=true)
bool DepleteResourceValue(bool notifyChange=true)
ScriptInvoker GetOnResourcesChanged()
override bool IsIsolated()
void SetResourceDecayTimeout(float timeout)
void GetBoundingVolume(inout vector mins, inout vector maxs)
float m_fResourceDecayElapsedTime
void Initialize(notnull IEntity owner, notnull SCR_ResourceContainer container)
bool m_bEnableResourceDecay
EResourceContainerStorageType m_eStorageType
override bool ShouldUpdate()
EResourceContainerOnEmptyBehavior GetOnEmptyBehavior()
set< SCR_ResourceInteractor > GetLinkedInteractors()
void UpdateWeightMultiplier()
WorldTimestamp m_LastUpdateTimestamp
void SetResourceDecayTickrate(float tickrate)
void SetIsEncapsulated(bool shouldEnable)
void GetAxisAlignedBoundingVolume(inout vector mins, inout vector maxs)
bool IncreaseResourceValue(float value, bool notifyChange=true)
bool IsInteractorLinked(notnull SCR_ResourceInteractor interactor)
EResourceContainerStorageType GetStorageType()
ScriptInvoker GetOnResourcesMaxedOut()
float GetWeightMultiplier()
void SetLastUpdateTimestamp(WorldTimestamp timestamp)
float m_fResourceDecayTickrate
float m_fResourceGainElapsedTime
int GetLinkedInteractorsCount()
ScriptInvoker GetOnGainChanged()
bool IsAllowedToStoreResource()
bool IsResourceGainEnabled()
ref ScriptInvoker m_OnDecayChangedInvoker
override bool RegisterContainer(notnull SCR_ResourceContainer container)
void UnregisterContainer(notnull SCR_ResourceContainer container)
void RegisterContainer(notnull SCR_ResourceContainer container)
@ NONE
When Shape is created and not initialized yet.
SCR_FieldOfViewSettings Attribute
@ DELETE
Further load on the instance is aborted and is deleted immediately.
@ ALL
Everything except general switch.
@ INVALID
Missing components, or obstruction test was not possible.