> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-prison/features/the-armoury.md).

# The Armoury

The quartermaster's counter — what officers may draw, how much of it, and the audit trail behind every movement.

A prison guard ped stands behind the counter with two options. Officers draw their kit at the start of a shift and hand it back at the end, and **every single movement is logged**.

Everything is `config/armory.lua`.

## The two options

Third eye or an `[E]` marker, following `Config.Interact.armoury`:

* **Open armoury** — a two-panel window. The **issue list** on one side, **what the officer is carrying** on the other. Draw items out, or put them straight back.
* **Return armoury** — hands back **everything on the issue list** in one go, at end of shift.

Corrections staff only, decided by `Config.Guards.jobs`.

{% hint style="info" %}
The player panel shows **armoury items only**. Open it carrying handcuffs and a bag of shopping and you see the handcuffs — an officer's own belongings are none of the quartermaster's business. The filtering happens on the server, so those items never leave it in the first place.
{% endhint %}

## Stock

```lua
items = {
    { item = 'weapon_pumpshotgun', label = 'Pump Shotgun', max = 1, grade = 1 },
    { item = 'weapon_stungun',     label = 'Taser',        max = 1 },
    { item = 'weapon_nightstick',  label = 'Nightstick',   max = 1 },
    { item = 'handcuffs',          label = 'Handcuffs',    max = 2 },
    { item = 'radio',              label = 'Radio',        max = 1 },
    { item = 'armour',             label = 'Body Armour',  max = 2 },
    { item = 'bandage',            label = 'Bandage',      max = 5 },
    { item = 'ammo-shotgun',       label = 'Shotgun Shells', max = 10 },
},
```

| Field   | Does                                                                  |
| ------- | --------------------------------------------------------------------- |
| `item`  | The inventory item name. **It must exist in your inventory resource** |
| `label` | What the window calls it                                              |
| `max`   | How many an officer may hold **at once**. Drawing stops there         |
| `grade` | Optional minimum guard grade. Below it, the line shows locked         |

`returnAll = true` makes **Return armoury** take back every listed item. Anything the officer brought from elsewhere is untouched.

## The quartermaster

```lua
ped = {
    model    = `s_m_m_prisguard_01`,
    coords   = vec4(1766.439575, 2583.731934, 45.994873, 181.417328),
    scenario = 'WORLD_HUMAN_CLIPBOARD',   -- '' for a plain idle
    frozen   = true,
    invincible = true,
},
```

`interactDistance` (2.5 m) is the third-eye range; `markerReach` (1.8 m) is the `[E]` range when the armoury is a button.

## What the server checks

The window only ever **asks**. The server decides, and re-checks on **every** movement:

* the caller is corrections staff
* they meet the item's `grade`, when one is set
* they are **standing at the ped** (6 m)
* the item is actually on the issue list — an officer can never draw something that isn't stocked
* they are under `max` for that item

Both panels are then redrawn from the server's answer, so what the window shows can never drift from what actually happened.

## Missing items

An item that isn't registered with your inventory resource cannot be drawn, and the failure is indistinguishable from a full inventory unless you say so. Mango Corrections says so twice.

**At boot**, listing everything it can't hand out:

```
[mango_prison] armoury: 1 item(s) are not registered with your inventory resource
               and cannot be drawn: handcuffs
               Add them to your inventory, or remove them from config/armory.lua.
```

**At the counter**, if it somehow gets that far, with a message naming the item rather than a generic "no room".

{% hint style="warning" %}
`handcuffs`, `radio` and `ammo-shotgun` are **not** in a stock ox\_inventory. If the boot check names them, either add them to your inventory's `data/items.lua` or take them out of `config/armory.lua` — either is a valid answer, but leaving it is not.
{% endhint %}

## The audit trail

Every open, draw, store and hand-back lands in the terminal's **LOGS** page and in the `armoury` [Discord channel](/mango5m-docs/resources/mango-prison/configuration/discord-logging.md):

| Action              | Logged as                                       |
| ------------------- | ----------------------------------------------- |
| Opening the window  | *Armoury opened*                                |
| Drawing an item     | *Armoury: item drawn* — with the item and count |
| Putting one back    | *Armoury: item returned*                        |
| End-of-shift return | *Armoury: kit handed back* — with the full list |

That is the point of an armoury: not to stop an officer taking a shotgun, but to make it a matter of record that they did.

## Turning it off

```lua
Config.Armory = { enabled = false }
```

The ped is never spawned and no interaction is registered.
