tommysticks Posted September 13, 2016 Share Posted September 13, 2016 Anyone have a suggestion how I can remove the option to Drop an item from the inventory? Or have it be deleted if Drop is selected? Link to comment Share on other sites More sharing options...
tommysticks Posted September 14, 2016 Author Share Posted September 14, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now