DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnUpdateActions()

void ConstructionActionData::OnUpdateActions ( Object item,
Object target,
int component_index )
inlineprotected

regular tool actions

См. определение в файле ConstructionActionData.c строка 163

164 {
165 ValidateConstructionData(item,target,component_index);
166
167 ItemBase tool = ItemBase.Cast(item);
168 EntityAI ent = EntityAI.Cast(target);
169 if (ent)
170 {
171 ConstructionBase con = ConstructionBase.Cast(ent.GetConstructionBasic());
172 if (con)
173 {
174 array<string> compNames = new array<string>;
175 target.GetActionComponentNameList(component_index, compNames, LOD.NAME_VIEW); //in case component is part of more than one named selection
176 m_BuildParts.Clear();
177 foreach (string compName : compNames)
178 {
179 array<ConstructionPart> tmp = new array<ConstructionPart>();
180 con.GetConstructionPartsToBuild(compName, tmp, tool, m_MainPartName, true); //m_MainPartName unused?
181 foreach (ConstructionPart part : tmp)
182 {
183 if (m_BuildParts.Find(part) == -1)
184 m_BuildParts.Insert(part);
185 }
186 }
187 m_ActionVariantManager.SetActionVariantCount(m_BuildParts.Count());
188 }
189 else
190 {
191 m_BuildParts.Clear();
193 }
194 }
195 else
196 {
197 m_BuildParts.Clear();
199 }
200 //not needed
201 //m_Target = target;
202 }
class LogManager EntityAI
void ConstructionBase(EntityAI parent)
Определения ConstructionBase.c:58
void ConstructionPart(string name, string part_name, string main_part_name, int id, bool is_built, bool is_base, bool is_gate, array< string > required_parts)
Определения ConstructionPart.c:531
class GP5GasMask extends MaskBase ItemBase
string m_MainPartName
Определения ConstructionActionData.c:16
ref array< ConstructionPart > m_BuildParts
Определения ConstructionActionData.c:6
ActionVariantManager m_ActionVariantManager
Определения ConstructionActionData.c:29
void ValidateConstructionData(Object item, Object target, int component_index)
Single update method to prepare and validate all construction data for the update,...
Определения ConstructionActionData.c:153

Перекрестные ссылки ConstructionBase(), m_ActionVariantManager, m_BuildParts, m_MainPartName, LOD::NAME_VIEW и ValidateConstructionData().

Используется в ConstructionActionData() и ~ConstructionActionData().