Guide 1 Docs 2 Reference 3
4

shop global

Sells this experience's products for Gems. Minefort asks the player in its own dialog; the pack learns only paid or not, never a balance, price or reason. Calls yield. Without the platform's shop every answer is no.

Docs: Data

Functions 4

shop.prompt(player: Player | string, product: string) → string?

Asks Minefort to offer product to the player. Returns the request id, or nil when it was not offered.

shop.owns(player: Player | string, product: string) → boolean

Whether the player owns this pass.

shop.on_paid(handler: (purchase: ShopPurchase) -> ()) → Connection

Called once per paid purchase; returning without an error hands it over. An error leaves it waiting, to be called again later.

shop.on_declined(handler: (purchase: ShopPurchase) -> ()) → Connection

Called when the player said no or did not answer.