if attaching from att.slot to att.slot, skips the change to "ground" version. Allows for correct property transfers.
47 {
49 {
50 string str;
51 int idx = -1;
55
56 m_OldItem.ConfigGetTextArray(
"ChangeInventorySlot",inventory_slots);
57 if (inventory_slots.Count() < 1)
58 {
59 inventory_slots_idx.Insert(InventorySlots.GetSlotIdFromString(
m_OldItem.ConfigGetString(
"ChangeInventorySlot")));
60 attach_types.Insert(
m_OldItem.ConfigGetString(
"ChangeIntoOnAttach"));
61 }
62 else
63 {
64 inventory_slots_idx.Clear();
65 for (int i = 0; i < inventory_slots.Count(); ++i)
66 {
67 inventory_slots_idx.Insert(InventorySlots.GetSlotIdFromString(inventory_slots.Get(i)));
68 }
69 m_OldItem.ConfigGetTextArray(
"ChangeIntoOnAttach",attach_types);
70 }
71
73 str = attach_types.
Get(inventory_slots_idx.Find(idx));
74 if (str != "")
75 {
77 }
78 }
79 }
InventoryLocationType
types of Inventory Location
ref InventoryLocation m_NewLocation
class array< Class T > TStringArray
proto string Get(int index)
Gets n-th character from string.