Godot Version
4.3
Question
I’m new to inventories, made a drag and drop inventory system by following a tutorial online - ‘RPG Inventory System from Scratch’ on youtube but in 2d and it is managed only by buttons, there is no player character, so you click trade - inventory and shop opens up, you click inventory - inventory opens up. It uses resources, by first creating an ItemData resource, a SlotData resource, and then an InventoryResource. I made an external inventory, which is basically a copy of the player inventory scene and using the same resources, which now acts as a shop inventory, I am able to stack items even if they’re from different inventories, but I want to make it so that the game notifies you whether you’re dropping an item in either the player inventory or the shop inventory, so that I can increase/decrease the player gold amount according to whether something is bought or sold. Since both inventories use the same resource for Slot Data and InventoryData, im wondering if I have to make a new InventoryData or a SlotData resource or whether I can edit the existing scenes/resources to make it work.
I tried assigning a data key to the InventoryData resource, so that each inventorydata created has a different key, but still I couldn’t find a way to make it work and would appreciate any suggestions