It appears items stolen from monkies should have RemoveFromScene called for them, so you can only actually access these stashed items once you dig up the treasure mark, but it appears that call has been commented out for whatever reason in components/piratespawner.lua when stashing items from the passed inst's inventory.
local function stashloot(inst) local ps = TheWorld.components.piratespawner if ps then local stash = ps:GetCurrentStash() if inst.components.inventoryitem then if not inst:HasTag("personal_possession") then inst.Transform:SetPosition(stash.Transform:GetWorldPosition()) table.insert(stash.loot,inst) inst:RemoveFromScene() else inst:Remove() end elseif inst.components.inventory then for k,v in pairs(inst.components.inventory.itemslots) do if not v:HasTag("personal_possession") then local item = inst.components.inventory:RemoveItemBySlot(k) item.Transform:SetPosition(stash.Transform:GetWorldPosition()) table.insert(stash.loot,item) --item:RemoveFromScene() else v:Remove() end end end end end
Steps to Reproduce
1. Have monkies steal loot
2. Go to stash
3. Notice the items appear without digging up the stash.
There are no comments to display.
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