Combining Stations - UQcsse3200/2024-studio-3 GitHub Wiki
These are relating to stations where items are being combined, for example those containing the StationMealComponent and how that works. Multiple items can be processed on these stations, compared to the Processing Stations. Further information on how each system works as well as a visual walk through can be seen in the Station Inventory and Visualisation wiki page.
Station Meal Component
Sequence Diagram:
Here you can see the process done when using rotating and combining interactions on a combining station.
Overview:
StationMealComponent is based on the structure of StationItemHandlerComponent, adapted to store more than 1 item in the station inventory due to the current set of defined recipes and allow customised meal creation with the correct items added. The player is able to place ingredients, and receive either meal items or the original ingredient items, as well as choose a number of interactions with the inventory of items.
If the player chooses to 'chop' on the station, nothing occurs. If the player chooses to place an item on the station, the current player item is removed from the player and placed in the station inventory. This can be visualised by the InventoryDisplayHoverComponent. If the player chooses to 'rotate' the items in the inventory to select a different item for removal, this is completed and visualised by the InventoryDisplayHoverComponent.
If the player chooses to 'combine' on the station and there is a PlateComponent on the station, a valid meal is created with the required items on the station and returned into the station inventory, on the condition that the items on the station create a valid meal (as defined in the recipes.json file). See below for an example of the ingredients of a valid meal, and note the presence of the 'combine' interaction (verified by the station logic).