Locks this item in it's current attachment slot of its parent. This makes the "locked" icon visible in inventory over this item.
843 {
844 EntityAI parent = GetHierarchyParent();
845
846 if (parent)
847 {
848 InventoryLocation inventory_location_to_lock = new InventoryLocation;
849 GetInventory().GetCurrentInventoryLocation(inventory_location_to_lock);
850 parent.GetInventory().SetSlotLock(inventory_location_to_lock.
GetSlot(),
true);
851 }
852 }
proto native int GetSlot()
returns slot id if current type is Attachment