From bb45b9aa9a1283f4e8bb22e50a0dc27ed66671d1 Mon Sep 17 00:00:00 2001 From: snipercup <50166150+snipercup@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:37:12 +0100 Subject: [PATCH] Add item_category documentation (#37346) * Add item_category documentation * Alignment --- doc/JSON_INFO.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index 829cb00aa9e9c..cc7215c204278 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -19,6 +19,7 @@ Use the `Home` key to return to the top. + [Bionics](#bionics) + [Dreams](#dreams) + [Item Groups](#item-groups) + + [Item Category](#item-category) + [Materials](#materials) + [Monster Groups](#monster-groups) - [Group definition](#group-definition) @@ -467,6 +468,26 @@ The syntax listed here is still valid. } ``` +### Item Category + +When you sort your inventory by category, these are the categories that are displayed. + +| Identifier | Description +|--- |--- +| id | Unique ID. Must be one continuous word, use underscores if necessary +| name | The name of the category. This is what shows up in-game when you open the inventory. +| zone | The corresponding loot_zone (see loot_zones.json) +| sort_rank | Used to sort categories when displaying. Lower values are shown first + +```C++ +{ + "id":"ammo", + "name": "AMMO", + "zone": "LOOT_AMMO", + "sort_rank": -21 +} +``` + ### Materials | Identifier | Description @@ -2943,4 +2964,4 @@ Setting of sprite sheets. Same as `tiles-new` field in `tile_config`. Sprite fil "type": "field_type", // this is a field type "id": "fd_gum_web", // id of the field "immune_mtypes": [ "mon_spider_gum" ], // list of monster immune to this field - } \ No newline at end of file + }