The hooks of one record of the game’s: the deposits it takes, and the
returns of those it sent, each handed Context.
| Property |
Type |
Default value |
Description |
onDepositReceive? |
DepositReceiveHooks<Context> |
none: deliver refuses a deposit to it |
The deposits the record takes, one hook per kind by its name, each applying a deposit inside its own transaction; "decline" sends it back. Example onDepositReceive: { gift: ({ writer, player, delivery }) => { addCoins(writer, player, delivery.payload.coins); }, } |
onDepositReturn? |
DepositReturnHooks<Context> |
none: a return to it is set aside for support |
The deposits the record sends, one hook per kind by its name, each putting back what a deposit that came back had taken, inside its own transaction. A return is never declined. |