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

◆ InitAttachmentGUIPartLinks()

void ConstructionDataTypeHolder::InitAttachmentGUIPartLinks ( EntityAIType eType,
ConstructionPartTypeData typeDataObject )
inlineprotected

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

83 {
84 if (!typeDataObject.HasRelatedGUICategories()) //nothing defined, skipping
85 return;
86
87 if (!m_GuiRequiredPartTypesMap) //SOMETHING defined, but no valid GUIInventoryAttachmentsProps subclass of that name
88 {
89 ErrorEx("'related_GUI_categories' defined on part " + typeDataObject.GetPartName() + ", but no valid 'GUIInventoryAttachmentsProps' group defined on the entity!");
90 return;
91 }
92 TypeAttachmentGroupsDataHolder holder = eType.GetTypeAttachmentGroupsDataHolder();
93 array<string> namesArr = typeDataObject.GetRelatedGUICategoryNames();
94 foreach (string name : namesArr)
95 {
96 array<ConstructionPartTypeData> tmp = m_GuiRequiredPartTypesMap.Get(name);
97 if (!tmp)
98 {
99 string validCategories = "";
100 TAttachmentGroupMap groupMap = holder.GetAttachmentGroupMap();
101 foreach (string validName, ref TypeAttachmentGroupData groupData : groupMap)
102 validCategories += "'" + validName + "' ";
103 ErrorEx("Part '" + typeDataObject.GetPartName() + "' on type '" + eType.GetName() + "' declares related_GUI_category '" + name + "', but it does not match any GUIInventoryAttachmentsProps entry! Valid categories: [" + validCategories + "]");
104 continue;
105 }
106 tmp.Insert(typeDataObject);
107 }
108 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
map< string, ref TypeAttachmentGroupData > TAttachmentGroupMap
Определения TypeAttachmentGroupDataHolders.c:1
ref map< string, ref array< ConstructionPartTypeData > > m_GuiRequiredPartTypesMap
Определения ConstructionPartTypedHolder.c:6
array< string > GetRelatedGUICategoryNames()
Определения ConstructionPartTyped.c:560
bool HasRelatedGUICategories()
Определения ConstructionPartTyped.c:513
string GetPartName()
Определения ConstructionPartTyped.c:438
TypeAttachmentGroupsDataHolder GetTypeAttachmentGroupsDataHolder()
Определения EntityAIType.c:76
proto native owned string GetName()
TAttachmentGroupMap GetAttachmentGroupMap()
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, TypeAttachmentGroupsDataHolder::GetAttachmentGroupMap(), EntityType::GetName(), ConstructionPartTypeData::GetPartName(), ConstructionPartTypeData::GetRelatedGUICategoryNames(), EntityAIType::GetTypeAttachmentGroupsDataHolder(), ConstructionPartTypeData::HasRelatedGUICategories(), m_GuiRequiredPartTypesMap и name.

Используется в InitPartsTypeDataHolder().