Jump to content

Remove option to drop item


tommysticks

Recommended Posts

This is my workaround:

ISInventoryPaneContextMenu.onDropItems = function(items, player)
    for i,k in pairs(items) do
        if not instanceof(k, "InventoryItem") then
            for i2,k2 in ipairs(k.items) do
                -- first in a list is a dummy duplicate, so ignore it.
                if i2 ~= 1 then
					if k2:getType() == "IDCard" then --my added lines
						k2:getContainer():Remove(k2);
					else
                    ISInventoryPaneContextMenu.dropItem(k2, player);
					end
				end
            end
        else
            ISInventoryPaneContextMenu.dropItem(k, player);
        end
    end
end

But if someone knows a better way, that'd be cool.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...