The Inventory system is based on scriptable objects, which allow each item to be universally referenced and edited. The inventory system is comprised of the InventoryManager, InventorySlots, PlayerInventorySlots, Shop, ShowInventory scripts, UpgradeManager, UpgradeSlot, and the UpgradeShop scripts. The scriptable objects used are Scrap and Upgrades

Implementing a Shop

Adding a new shop is fairly straightforward. Add the shop prefab to the scene in a menu attached to the dialogue system (reference the dialogue system guide for help with that). Then, move the ShopSlots game object to where you want them to appear in the menu, and do the same for the PlayerInventorySpots. The Shop script will automatically find the PlayerInventory if it is in the scene and adjust it to appear with the correct menus. Make sure the sell button on the UI is correctly set to call the Shop.sold() method. Finally, set the ShopOwner to the appropriate NPC.