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

◆ OnUpdateInfoActions()

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

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

268 {
269 ValidateConstructionData(item,target,component_index);
270
271 ItemBase tool = ItemBase.Cast(item);
272 EntityAI ent = EntityAI.Cast(target);
273 if (ent)
274 {
275 ConstructionBase con = ConstructionBase.Cast(ent.GetConstructionBasic());
276 if (con)
277 {
278 array<string> compNames = new array<string>;
279 target.GetActionComponentNameList(component_index, compNames, LOD.NAME_VIEW); //in case component is part of more than one named selection
280 m_BuildPartsJustInfos.Clear();
281 foreach (string compName : compNames)
282 {
283 array<ConstructionPart> tmp = new array<ConstructionPart>();
284 con.GetConstructionPartsUnableToBuild(compName, tmp, tool, m_MainPartName, tool != null); //m_MainPartName unused?
285 foreach (ConstructionPart part : tmp)
286 {
287 if (m_BuildPartsJustInfos.Find(part) == -1)
288 m_BuildPartsJustInfos.Insert(part);
289 }
290 }
291 m_ActionInfoContinuousVariantManager.SetActionVariantCount(m_BuildPartsJustInfos.Count());
292 //m_ActionInfoInteractVariantManager.SetActionVariantCount(m_BuildPartsJustInfos.Count());
293 }
294 else
295 {
296 m_BuildPartsJustInfos.Clear();
298 //m_ActionInfoInteractVariantManager.Clear();
299 }
300 }
301 else
302 {
303 m_BuildPartsJustInfos.Clear();
305 //m_ActionInfoInteractVariantManager.Clear();
306 }
307 }
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
ActionVariantManager m_ActionInfoContinuousVariantManager
Определения ConstructionActionData.c:32
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
ref array< ConstructionPart > m_BuildPartsJustInfos
Определения ConstructionActionData.c:9

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

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