Project Zomboid

Project Zomboid

Nested Containers
(Debug mode issues with) Nested Containers + Inventory Tetris
for some reason when you're using debug mode and launch the game with these 2 mods, you can't edit the stacksize of any particular items such as water bottle grid size, stack size, etc etc. You're still able to edit the container size from backpack and storage containers however.
< >
Showing 1-5 of 5 comments
Tectin 6 Jun, 2024 @ 9:06am 
I looked into this and figured out why this is the case

"Nested Containers" completely hardcodes all the context menu entries and is with this probably somewhat incompatible with all other mods that interact with the context menu

There seems to be multiple ways to work around this

You are still able to edit the container size just because in "InventoryTetris" the container debug options are added after the call to `ItemGridUI.openItemContextMenu`
This is not done for the item debug options

It is possible to add the item debug options after the `ItemGridUI.openStackContextMenu`

File: `ItemGridUI_events.lua`
Line: 109

or just change `menu:addOptionOnTop` to `menu:addOption` in file `InventoryTetris_DevTool.lua`
Tectin 6 Jun, 2024 @ 9:41am 
Ok after futher investigation it does seem to be necessary to add
```
local item = ItemStack.getFrontItem(gridStack, self.grid.inventory)
TetrisDevTool.insertDebugOptions(menu, item)
```

to `ItemGridUI_events.lua` after line 109

effectively skipping whatever nested containers does to the context menu
Sioyth  [developer] 10 Jul, 2024 @ 7:51am 
Sadly the way that PZ works I had to completely override the file ;_;
Sioyth  [developer] 10 Jul, 2024 @ 7:51am 
Originally posted by Tectin:
Ok after futher investigation it does seem to be necessary to add
```
local item = ItemStack.getFrontItem(gridStack, self.grid.inventory)
TetrisDevTool.insertDebugOptions(menu, item)
```

to `ItemGridUI_events.lua` after line 109

effectively skipping whatever nested containers does to the context menu

It seems this is on their end then ;/
Q 31 Jan @ 2:22pm 
im curious to the status of this: is this the workaround I should use or do i need to pick one or the other?
< >
Showing 1-5 of 5 comments
Per page: 1530 50