# eggox entrance

Use a mint from an experience's stock as its entrance, or restore the default floor star.

```sh
eggox entrance [dir]
eggox entrance set <stock-mint-name-or-id> [dir]
eggox entrance reset [dir]
eggox entrance set "Moss Portal" --room Hall [dir]
```

The default experience entrance is a flat five-point star. For a custom entrance,
put a mint into the game's stock, then choose it as the entrance appearance:

```sh
eggox stock add "Cat Door"
eggox entrance set "Cat Door"
eggox entrance --json
```

`entrance` lists the current appearance and available stock mints. `set` accepts
an exact name, the stock's project name, or an item id. Use an id if names are
ambiguous. `reset` restores the default star. Without `--room` the commands
work on the game's entrance; `--room <name>` works on the doors leading into that room
(the name of its folder under `rooms/`). All commands accept `--server` and
`--json`; the optional folder identifies the game through its `eggox.json`.

In Studio, select GAME or ROOM and use **Entrance Appearance**. The same stock
mint can still supply instances inside the game. It is not consumed. Before
returning that mint to your bag, change any entrance that uses it and pick up its
other instances.

A custom entrance keeps the mint's shape, animation, footprint and walking rules.
Authors are responsible for making an accessible entrance: the player must be
able to stand on its entry tile. Use a walk-through footprint for a doorway or
zero standing height for a floor piece. The placed entrance must fit on land
you can build on; an appearance that would extend beyond it is refused.

The entrance takes a snapshot of the mint's currently displayed iteration and
filter. Select the mint again to apply later changes. The entrance remains bound
to the experience, with its name, entry action and Enter Studio button.

Changes apply to the entrance immediately, including an already placed entrance.
They do not publish gameplay or modify project files. `eggox push` and `check`
leave the entrance setting alone.

## MCP

`eggox_entrance` accepts `action` (`get`, `set`, `reset`), optional `dir`, and
`item` for `set`. This changes the outside entrance immediately; it is not a game
publication tool.

## HTTP API

With a games-scope creator token:

- `GET /api/dev/games/:id/entrance` returns `room` and available stock `items`.
- `PUT /api/dev/games/:id/entrance` accepts `{"item":"mint-id"}` or
  `{"item":null}` for the default star and returns the updated `room`.

Only the owner can change the entrance, and a custom mint must belong to that
experience's stock. An unrelated bag mint or another game's stock is refused.

