Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions gamemode/core/meta/item/sv_item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ function ITEM:spawn(position, angles)
end
end

function ITEM:transfer(newInventory,bBypass)
if (!bBypass and !newInventory:canAccess("transfer")) then
return false
end

local inventory = nut.inventory.instances[self.invID]

inventory:removeItem(self.id, true)
:next(function()
newInventory:add(self)
end)

return true
end

-- Called when an instance of this item has been created.
function ITEM:onInstanced(id)
end
Expand Down