Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResourceStoredContainerStoragePartialHelper.c
Go to the documentation of this file.
2{
6 protected float m_fMaxStoredResourceValue;
7
8 //------------------------------------------------------------------------------------------------
10 {
12 return Math.Min(m_fMaxStoredResourceValue, m_ContainerFrom.GetResourceValue());
13
14 return -1.0;
15 }
16
17 //------------------------------------------------------------------------------------------------
18 protected bool IsSourceValid(notnull IEntity entity)
19 {
20 if (entity == m_ContainerFrom.GetOwner())
21 return false;
22
23 SCR_ResourceComponent component = SCR_ResourceComponent.Cast(entity.FindComponent(SCR_ResourceComponent));
24
25 if (!component)
26 return false;
27 // TODO MARIO: Fix the whole method for the container query.
28 //m_ContainerToCached = component.GetContainer();
29
31 return false;
32
33 if (!m_bHasDetectedContainers && m_ContainerToCached.IsAllowedToStoreResource())
35
36 return m_ContainerToCached.CanStoreResource();
37 }
38
39 //------------------------------------------------------------------------------------------------
40 protected bool ProcessStorage(notnull IEntity entity)
41 {
43 m_fMaxStoredResourceValue += m_ContainerToCached.ComputeResourceDifference();
44
45 return m_fMaxStoredResourceValue < m_ContainerFrom.GetResourceValue();
46 }
47
48 //------------------------------------------------------------------------------------------------
53};
Definition Math.c:13
void SCR_ResourceStoredContainerStoragePartialHelper(notnull SCR_ResourceContainer container)