Locks this item in it's current attachment slot of its parent. This makes the "locked" icon visible in inventory over this item.
853 {
854 EntityAI parent = GetHierarchyParent();
855
856 if (parent)
857 {
858 InventoryLocation inventory_location_to_lock = new InventoryLocation;
859 GetInventory().GetCurrentInventoryLocation(inventory_location_to_lock);
860 parent.GetInventory().SetSlotLock(inventory_location_to_lock.
GetSlot(),
true);
861 }
862 }
proto native int GetSlot()
returns slot id if current type is Attachment