Exi-G
New member
I am using the Item shape inventory grid and i have multiple item shape grids (e.g. Backpack item shape grid which uses the main inventory item collection and Vest item shape grid which uses a separate inventory item collection (Vest)). I want to restrict the main item collection (backpack) to add item to the vest item collection when there are no space in the backpack inventory grid.
I am using the GroupItemRestriction and the ItemCollectionRestrictions field has an option for FullSize which works well with normal inventory grid. but for the item shape grid this option doesn't work well because if i set the FullSizeLimit to 4 and i add an item with grid shape of 2x2 which takes 4 grids, it only count it as 1 item.
I want to create a custom Item Restriction which determines the size of the inventory based on the number of grids available but not the number of item stacks. I know the ItemShapeGridData has a property for getting the grid count and also checking if item can be added to the grid using the IsItemValidForGridData method.
I want my custom item restriction to have the same functionalities as the GroupItemRestriction but just add the option to restrict based on the available grid spaces in the inventory. I was thinking of inheriting the GroupItemRestriction class but i am not sure the proper way of add the functionality i want.
Could you please advice the best way to solve this?
I am using the GroupItemRestriction and the ItemCollectionRestrictions field has an option for FullSize which works well with normal inventory grid. but for the item shape grid this option doesn't work well because if i set the FullSizeLimit to 4 and i add an item with grid shape of 2x2 which takes 4 grids, it only count it as 1 item.
I want to create a custom Item Restriction which determines the size of the inventory based on the number of grids available but not the number of item stacks. I know the ItemShapeGridData has a property for getting the grid count and also checking if item can be added to the grid using the IsItemValidForGridData method.
I want my custom item restriction to have the same functionalities as the GroupItemRestriction but just add the option to restrict based on the available grid spaces in the inventory. I was thinking of inheriting the GroupItemRestriction class but i am not sure the proper way of add the functionality i want.
Could you please advice the best way to solve this?
Last edited: