500 {
501 attachments.Clear();
502 TypeAttachmentGroupsDataHolder holder = target.GetTypeAttachmentGroupInfoHolder();
504 foreach (TypeAttachmentGroupData data : dataArray)
505 {
506 if (data)
507 {
508 int slotId;
510 GameInventory inventory = target.GetInventory();
511 foreach (
string slotName : data.m_AttSlots)
512 {
513 slotId = InventorySlots.GetSlotIdFromString(
slotName);
516 {
517 attachments.Insert(attachment);
518 }
519 }
520 }
521 }
522 }
PlayerSpawnPreset slotName
proto native bool CanRemoveAttachmentEx(EntityAI attachment, int slot)
proto native bool GetSlotLock(int slot)
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
array< TypeAttachmentGroupData > GetAttGroupsDataBySelectionParam(string selectionName)
Returns an array of 'GUIInventoryAttachmentsProps' subclasses that use the same 'selection'.