Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ComboRequiredDeployableParts.c
Go to the documentation of this file.
2{
3 [Attribute(uiwidget: UIWidgets.ResourcePickerThumbnail, desc: "Second prefab that must be found in order to complete this requirement", params: "et")]
5
6 [Attribute(defvalue: "1", desc: "How many required prefabs need to be found in order to meet this requirement", params: "1 inf 1")]
8
9 [Attribute(desc: "Localized string used to tell the player which part he is missing when wont be found")]
11
12 protected ref array<IEntity> m_aOtherFoundEntities;
13
14 //------------------------------------------------------------------------------------------------
15 override bool EvaluateFoundEntity(vector origin, float distanceSqToFoundEntity, notnull BaseContainer foundPrefab, notnull IEntity foundEntity)
16 {
17 if (super.EvaluateFoundEntity(origin, distanceSqToFoundEntity, foundPrefab, foundEntity))
18 return true;
19
20 ResourceName mainPartPrefab = m_sPrefab;
22
23 array<IEntity> mainPartStorage = m_aFoundEntities;
25
26 int requiredNumberOfMainParts = m_iNumberOfRequiredPrefabs;
28
29 bool finalResult = super.EvaluateFoundEntity(origin, distanceSqToFoundEntity, foundPrefab, foundEntity);
30
32 m_sPrefab = mainPartPrefab;
33 m_aFoundEntities = mainPartStorage;
34 m_iNumberOfRequiredPrefabs = requiredNumberOfMainParts;
35
36 return finalResult;
37 }
38
39 //------------------------------------------------------------------------------------------------
40 override bool IsRequirementMet(out int difference)
41 {
42 if (!super.IsRequirementMet(difference))
43 return false;
44
47 return false;
48
49 difference -= m_aOtherFoundEntities.Count();
50
51 return difference == 0;
52 }
53
54 //------------------------------------------------------------------------------------------------
62
63 //------------------------------------------------------------------------------------------------
64 override bool DeleteFoundEntity(int id, notnull IEntity user)
65 {
66 bool result = super.DeleteFoundEntity(id, user);
67
68 array<IEntity> mainPartStorage = m_aFoundEntities;
70
71 result &= super.DeleteFoundEntity(id, user);
72
73 m_aFoundEntities = mainPartStorage;
74 return result;
75 }
76
77 //------------------------------------------------------------------------------------------------
78 override array<IEntity> GetFoundEntities()
79 {
80 array<IEntity> combinedList;
82 {
83 combinedList = {};
84 combinedList.Copy(m_aOtherFoundEntities);
85 }
86
88 return combinedList;
89
90 if (!combinedList)
91 return m_aFoundEntities;
92
93 combinedList.InsertAll(m_aFoundEntities);
94 return combinedList;
95 }
96}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override bool IsRequirementMet(out int difference)
override bool DeleteFoundEntity(int id, notnull IEntity user)
override bool EvaluateFoundEntity(vector origin, float distanceSqToFoundEntity, notnull BaseContainer foundPrefab, notnull IEntity foundEntity)
SCR_FieldOfViewSettings Attribute