> For the complete documentation index, see [llms.txt](https://atiysus-organization.gitbook.io/aty-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atiysus-organization.gitbook.io/aty-scripts/restaurant-creator/features/custom-prop-duis-microwave-and-espresso.md).

# Custom-Prop DUIs (Microwave & Espresso)

The **microwave** and **espresso machine** are custom props whose UI renders **on the prop's own screen** — not as a fullscreen menu. This is powered by the built-in 3D DUI render engine (`cr3d`), which replaces a named screen texture on the model with a live DUI.

#### How it works

* The prop model ships a screen texture (`script_aty_microwave`, `script_aty_coffee_machine_screen`) inside `aty_restaurant_assets`.
* On spawn, the resource calls `CreateReplaceTexture` to render the Vue UI onto that texture.
* Interacting zooms a scripted camera to the screen and forwards your mouse to the DUI, so you click the on-prop UI directly.

#### Microwave

* Load a recipe or set time & power, then **Start**.
* The food prop spawns **inside the microwave** on its dedicated bone and spins via a looped entity animation while cooking.
* **Opening the door stops cooking** (like a real microwave).
* When done, the food is **not auto-deleted** — you must **take it** from the microwave first.
* Metallic items or overcooking can cause a small explosion.

#### Espresso machine

* Recipe-based brewing (multiple coffee types), each consuming its configured ingredients.
* The coffee prop spawns on the machine while brewing; the screen shows **Filling** while brewing and **Ready** when done.
* Take the cup when finished.

#### Configuration

Both are configured in `shared/config.lua`:

```lua
Config.Microwave = { prop = "aty_microwave", screenTxn = "script_aty_microwave",
                     spinBone = "SKEL_PLATE", animLoop = "loop",
                     duiResW = 800, duiResH = 2050, foodProps = { ... } }

Config.Espresso  = { prop = "aty_coffee_machine",
                     screenTxn = "script_aty_coffee_machine_screen",
                     duiResW = 1280, duiResH = 600, Recipes = { ... } }
```

`foodProps` maps each cooked item to the prop, position and rotation shown on the plate.

{% hint style="warning" %}
If the on-screen UI looks low-resolution on a specific client, it's the player's **Texture Quality** / **Extended Texture Budget** graphics setting (and available VRAM), not the script — the DUI renders at a fixed resolution for everyone.
{% endhint %}
