For the complete documentation index, see llms.txt. This page is also available as Markdown.

Code Redeem

The player runs the refund command, by default /refund.

Players can also open it by walking up to a delivery point and pressing E, if you have those enabled.

The item grid

With a valid code the panel expands into the claim view. The header names the code's contents and shows how many items remain. Below it sits a yellow banner reminding them to have inventory space before claiming.

Each item is a card with its image, label, a badge showing the amount, and the word Claim. Already claimed items are dimmed, greyed out, marked with a check and cannot be clicked.

Claiming an item

Clicking a card starts the claim. The image is replaced by a spinner while it processes, and the rest of the grid locks so nothing else can be clicked mid flight.

On the server, five things happen in sequence:

The code is looked up again and confirmed still valid. Your claim condition check is run again on the client — this is the second call, the one that stops a player opening the panel somewhere valid and walking away. The inventory is asked whether the item will fit. The item is marked as claimed in the database. And only then is it actually handed over.

That last ordering is deliberate and worth understanding. Marking it claimed before giving it means that if the database write fails, nothing was given and nothing was lost. If the write succeeded but the inventory refused the item, the mark is rolled back and the item becomes claimable again. Doing it the other way round — give first, record second — would mean a failed write leaves the item both in the player's pocket and still claimable, which is duplication.

If it worked, the player gets a success notification and the card flips to claimed. If it failed, they are told why: either their inventory was too full, or the claim was refused, and the grid refreshes so what they see matches reality.

Repeating until done

The player works through the grid at their own pace. They can claim two items, close the panel, sort out their inventory, and come back later with the same code — progress is stored per item, so what they already took stays taken and the rest is still waiting.

When the last item is claimed the grid is replaced by a confirmation, with a button to enter a different code if they have more than one.

Last updated