Updated code

Updated code for "Regenerate Loot" mod : https://steamcommunity.com/sharedfiles/filedetails/?id=2679148926
mail@pastecode.io avatar
unknown
lua
2 years ago
542 B
80
Indexable
Never
local defaultISInventoryPage_onBackpackRightMouseDown = ISInventoryPage.onBackpackRightMouseDown
function ISInventoryPage:onBackpackRightMouseDown(x, y)
	defaultISInventoryPage_onBackpackRightMouseDown(self, x, y)
    local page = self.parent
	if page.onCharacter then return end
	local container = self.inventory
	container:getSourceGrid():getRoom():getRoomDef():getProceduralSpawnedContainer():clear()
    container:removeItemsFromProcessItems()
	container:clear()
    ItemPicker.fillContainer(container, getSpecificPlayer(page.player))
end