Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkResourceComponentAction.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Target entity for Resource Action")];
5 ref SCR_ScenarioFrameworkGet m_Getter;
6
7 [Attribute(defvalue: "EResourceType.INVALID.ToString()", desc: "Supply type", uiwidget: UIWidgets.ComboBox, enumType: EResourceType)]
8 EResourceType m_eResourceType;
9
10 [Attribute(desc: "Resource system actions to be executed")];
11 ref array<ref SCR_ScenarioFrameworkResourceComponentActionBase> m_aResourceComponentActions;
12
13 //------------------------------------------------------------------------------------------------
14 override void OnActivate(IEntity object)
15 {
16 if (!CanActivate())
17 return;
18
19 IEntity entity;
20 if (!ValidateInputEntity(object, m_Getter, entity))
21 {
22 Print(string.Format("ScenarioFramework Action: Entity not found for Action %1.", this), LogLevel.ERROR);
23 return;
24 }
25
26 SCR_ResourceComponent resourceComp = SCR_ResourceComponent.Cast(entity.FindComponent(SCR_ResourceComponent));
27 if (!resourceComp)
28 {
29 Print(string.Format("ScenarioFramework Action: Entity does not have SCR_ResourceComponent for Action %1.", this), LogLevel.ERROR);
30 return;
31 }
32
33 foreach (SCR_ScenarioFrameworkResourceComponentActionBase resourceAction : m_aResourceComponentActions)
34 {
35 resourceAction.Init(resourceComp, m_eResourceType);
36 }
37 }
38
39 //------------------------------------------------------------------------------------------------
40 array<ref SCR_ScenarioFrameworkResourceComponentActionBase> GetSubActionsResourceSystem()
41 {
42 return m_aResourceComponentActions;
43 }
44}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute