Skip to content

Ticket Details

abhat0 edited this page Oct 2, 2024 · 11 revisions

Introduction

The ticket details is where information of the current order being considered by the player is stored. It keeps track of three details of each ticket:

  1. The order number
  2. The recipe name
  3. The meal and ingredients image with processing icons.
  4. The time left on the order

The ticket details will be retrieved from the Station Serving Component once a submission has been made. Further details of this can be seen here.

Here is an image below of a list of tickets. In this example, it is the last ticket, Order 1, would be getting saved in TicketDetails.

Screenshot 2024-09-11 at 8 04 28 PM Screenshot 2024-09-11 at 8 08 28 PM

To go into more detail of the format of values being saved, take the following example:

currentOrderNumber = "1"

currentMeal = "acaiBowl"

currentTimeLeft = "24"

Usage

The following statements will add a fresh docket on screen:

entity.getEvents().trigger("createOrder","recipeName");

Dockets can also be added by using triggers for specific recipe dockets

ServiceLocator.getEntityService().getEvents().trigger("createAcaiDocket");
ServiceLocator.getEntityService().getEvents().trigger("createSaladDocket");
ServiceLocator.getEntityService().getEvents().trigger("createFruitSaladDocket");
ServiceLocator.getEntityService().getEvents().trigger("createSteakDocket");
ServiceLocator.getEntityService().getEvents().trigger("createBananaDocket");

Examples of create docket usage:

receipe name is as per core/assets/configs/recipe.json

// acaiBowl : 
`entity.getEvents().trigger("createOrder","acaiBowl");`
// steakMeal : 
`entity.getEvents().trigger("createOrder","steakMeal");`
// salad : 
`entity.getEvents().trigger("createOrder","salad");`

For type safety, use RecipeNameEnums when passing the recipe name argument:

// acaiBowl : 
`entity.getEvents().trigger("createOrder", RecipeNameEnums.ACAI_BOWL.getRecipeName());`
// steakMeal : 
`entity.getEvents().trigger("createOrder", RecipeNameEnums.STEAK_MEAL.getRecipeName());`
// salad : 
`entity.getEvents().trigger("createOrder", RecipeNameEnums.SALAD.getRecipeName());`

Calling the events - as previously outlined - will create a fresh docket and automatically position it. The docket automatically handles updating its position when another docket is either removed from or added to the screen.

Sequence Diagram

MainGameActions_onCreateOrder

Table of Contents

Home

Team Design Document

Game Features

Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes

Game

Getting Started

Entities and Components

World Backstory

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Map Design

Test Plans

Sensor Component

Customer Sensor Component

Interaction Component

Inventory Component

Inventory Display

Station Meal Component

Station Progress Display

Keyboard Input Component

Fire Extinguisher Handler Component

Score System

HoverBox Component

MainGameActions Create Docket Triggers

End Day Display Component

Cutscene Area

Docket

Docket Line Display

Docket Meal Display

Main Game Order Button Display

Order Actions

Recipe

Ticket Details Component

BackstoryCutscene Test Plan

BackstoryCutsceneDisplay Test Plan

Test Plan for Tutorial

Keybinds

Keybinds Test Plan

Test Plan for MainGameOrderTicketDisplay

Test Plan for MainGameOrderBtnDisplay

Test Plan for Docket

Test Plan for DocketLineDisplay

Test Plan for OrderActions

Ticket Details

Test plan for RandomComboService

Test plan for LoanUpgrade

Test plan for UpgradesDisplay

Test plan for RageUpgrade

Test plan for SpeedBoostUpgrade

Test plan for DancePartyUpgrade

Test plan for ExtortionUpgrade

Troubleshooting

MacOS Setup Guide

Clone this wiki locally