# Client

***

### startHotdog

Starts a hotdog cart shift for the local player. Opens cart placement, then continues into tutorial (first time) or active service.

```lua
exports['axiam_hotdogcart']:startHotdog()
```

Does nothing if the player is already working or not in the `idle` flow state.

***

### endHotdog

Ends the current shift for the local player (same flow as the in-game end-shift prompt).

```lua
exports['axiam_hotdogcart']:endHotdog()
```

***

### startShift

Alias for `startHotdog`.

```lua
exports['axiam_hotdogcart']:startShift()
```

***

### endShift

Alias for `endHotdog`.

```lua
exports['axiam_hotdogcart']:endShift()
```

***

### isWorking

Checks whether the local player is in an active work phase (tutorial, serving customers, or closing).

```lua
exports['axiam_hotdogcart']:isWorking()
```

**Return:**

* `boolean` — `true` while the flow state is `tutorial`, `active`, or `closing`. `false` during `idle`, `placement`, or `summary`.

***

### getFlowState

Returns the current shift lifecycle phase for the local player.

```lua
exports['axiam_hotdogcart']:getFlowState()
```

**Return:**

* `string` — One of:
  * `idle` — No shift running.
  * `placement` — Placing the cart in the world.
  * `tutorial` — First-shift onboarding.
  * `active` — Normal service (customers, cooking, laptop).
  * `closing` — Wind-down; in-flight customers can finish.
  * `summary` — Shift summary UI is open.

***

### getCartEntity

Returns the world entity handle for the local player's placed cart.

```lua
exports['axiam_hotdogcart']:getCartEntity()
```

**Return:**

* `number` — Entity handle, or `nil` if no cart is spawned.

***

### getCurrentShiftStats

Returns live statistics for the current shift.

```lua
exports['axiam_hotdogcart']:getCurrentShiftStats()
```

**Return:**

* `table` — Shift stats for the active shift, or `nil` if `FlowController` is unavailable.

| Field             | Type     | Description                                                |
| ----------------- | -------- | ---------------------------------------------------------- |
| `customersServed` | `number` | Customers successfully served this shift.                  |
| `totalEarnings`   | `number` | Sales revenue this shift.                                  |
| `totalTips`       | `number` | Tips received this shift.                                  |
| `supplySpend`     | `number` | Supply / pantry spend this shift.                          |
| `totalRating`     | `number` | Sum of star ratings (divide by `reviewCount` for average). |
| `reviewCount`     | `number` | Number of reviews this shift.                              |
| `xpEarned`        | `number` | XP earned this shift.                                      |
| `customersLost`   | `number` | Customers who left unhappy this shift.                     |

***

### forceExitWorkstation

Forces the local player out of workstation camera / interaction mode (laptop, assembly, etc.).

```lua
exports['axiam_hotdogcart']:forceExitWorkstation()
```

Triggers the internal `hotdogcart:requestExit` event.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.axiam.shop/axiam_hotdogcart/exports/client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
