Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ResourceGeneratorActionStore.c
Go to the documentation of this file.
3 {
4  //------------------------------------------------------------------------------------------------
5  override void PerformAction(SCR_ResourceContainer containerTo, inout float resourceValue)
6  {
7  if (!containerTo)
8  return;
9 
10  SCR_ResourceComponent containerComponent = containerTo.GetComponent();
11  float usedResources = Math.Min(containerTo.ComputeResourceDifference(), resourceValue);
12  resourceValue -= usedResources;
13 
14  SCR_ResourceEncapsulator encapsulator = containerComponent.GetEncapsulator(containerTo.GetResourceType());
15 
16  if (encapsulator)
17  encapsulator.RequestGeneration(usedResources);
18  else
19  containerTo.IncreaseResourceValue(usedResources);
20 
21  containerComponent.Replicate();
22  }
23 }
SCR_ResourceContainer
Definition: SCR_ResourceContainer.c:34
SCR_ResourceGeneratorActionStore
Definition: SCR_ResourceGeneratorActionStore.c:2
SCR_ResourceEncapsulator
Definition: SCR_ResourceEncapsulator.c:1
SCR_ResourceGeneratorActionBase
Definition: SCR_ResourceGeneratorActionBase.c:2
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468