Skip to content

Commit

Permalink
docs: document shop filterability, correct kit to action (#195)
Browse files Browse the repository at this point in the history
* docs: document shop filterability

Documents that shop categories and shop items are filterable, allowing map authors to restrict their visibility.

Ref: https://github.com/PGMDev/PGM/blob/e50d824efc5ab83ea34afbd79f1dfc646b5a43ab/core/src/main/java/tc/oc/pgm/shops/ShopModule.java#L96 (shop categories)
Ref: https://github.com/PGMDev/PGM/blob/e50d824efc5ab83ea34afbd79f1dfc646b5a43ab/core/src/main/java/tc/oc/pgm/shops/ShopModule.java#L158 (shop items)
Signed-off-by: TTtie <[email protected]>

* docs: shop item kits are actually actions

Signed-off-by: TTtie <[email protected]>

---------

Signed-off-by: TTtie <[email protected]>
  • Loading branch information
TTtie authored Jan 18, 2025
1 parent 7ed5c35 commit f703b78
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/modules/gear/shops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,25 @@ Players can also buy a kit, instead of individual items, or use muiltiple curren

#### Category Attributes

| Element | Description | Value |
|---|---|---|
| Element | Description | Value | Default |
|---|---|---|---|
| `id` | <span className="badge badge--danger">Required</span>Unique identifier used to reference this category from other places in the XML. | <span className="badge badge--primary">String</span> |
| `name` | The display name for the category. | <span className="badge badge--primary">Formatted Text</span> |
| `material` | The item to display as an icon for the category. | [Material Name](/docs/reference/items/inventory#material-matchers) |
| `filter` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span>Filters whether to show the category in the shop. | [Filter](/docs/modules/mechanics/filters) | `always` |

#### Item Attributes

Items have unique attributes when used in a shop, usually for currency purchases.
Items can be purchased with multiple currencies using the `<payment>` tag.

| Element | Description | Value |
|---|---|---|
| Element | Description | Value | Default |
|---|---|---|---|
| `currency` | The currency needed to purchase. | [Material Name](/docs/reference/items/inventory#material-matchers) |
| `price` | The amount of a currency needed to purchase. | <span className="badge badge--primary">Number</span> |
| `kit` | The kit to give to players purchasing the item. | [Kit](/docs/modules/gear/kits) |
| `action` | A player-scoped action to execute after the player purchases an item. | [Action](/docs/modules/mechanics/actions-triggers) |
| `color` | Set the currency's display text color. This is used for associating colors with different currency tiers. | [Chat Color Name](/docs/reference/misc/formatting#chat-colors) |
| `filter` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span>Filters whether to show the item in the shop category. | [Filter](/docs/modules/mechanics/filters) | `always` |

### Examples

Expand Down

0 comments on commit f703b78

Please sign in to comment.