diff --git a/schema/packs/items.json b/schema/packs/items.json index 938ff637..431825b8 100644 --- a/schema/packs/items.json +++ b/schema/packs/items.json @@ -35,7 +35,7 @@ "false" ] } - ] + ] }, "codes": { "$ref": "#/$defs/codes" @@ -48,7 +48,7 @@ }, "required": [ "type" - ], + ], "allOf": [ { "$ref": "#/$defs/static_type_if_block" @@ -107,6 +107,10 @@ ], "type": "string" }, + "name_stage": { + "description": "Readable name of the stage for tooltip.", + "type": "string" + }, "stages": { "description": "Stages of the progressive item.", "type": "array", @@ -154,14 +158,13 @@ "$ref": "#/$defs/disabled_img_mods" }, "name": { - "description": "Readable name of the stage for tooltip.", - "type": "string" + "$ref": "#/$defs/name_stage" } } } }, "initial_stage_idx": { - "description": "Initital stage index for the progressive item. Zero indexed.", + "description": "Initial stage index for the progressive item. Zero indexed.", "anyOf": [ { "type": "number", @@ -235,7 +238,7 @@ "$ref": "#/$defs/stages" }, "allow_disabled": { - "description": "Automatically addes a \"off\" stage if set to true.", + "description": "Automatically adds a \"off\" stage if set to true.", "anyOf": [ { "type": "boolean", @@ -339,89 +342,77 @@ ] }, "then": { - "oneOf": [ - { - "properties": { - "item_left": { - "description": "Code identifier of the left item.", - "type": "string" - }, - "item_right": { - "description": "Code identifier of the right item.", - "type": "string" - } - }, - "required": [ - "item_left", - "item_right" - ] + "properties": { + "item_left": { + "description": "Code identifier of the left item.", + "type": "string" }, - { - "properties": { - "images": { - "description": "Array of images and states (up to 4, on/off for each item)", - "type": "array", - "items": { - "type": "object", - "required": [ - "left", - "right" - ], - "properties": { - "left": { - "description": "State of left item.", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string", - "enum": [ - "true", - "false" - ] - } - ] + "item_right": { + "description": "Code identifier of the right item.", + "type": "string" + }, + "images": { + "description": "Array of images and states (up to 4, on/off for each item)", + "type": "array", + "items": { + "type": "object", + "required": [ + "left", + "right" + ], + "properties": { + "left": { + "description": "State of left item.", + "anyOf": [ + { + "type": "boolean" }, - "right": { - "description": "State of right item.", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string", - "enum": [ - "true", - "false" - ] - } + { + "type": "string", + "enum": [ + "true", + "false" ] + } + ] + }, + "right": { + "description": "State of right item.", + "anyOf": [ + { + "type": "boolean" }, - "img": { - "$ref": "#/$defs/img" - }, - "img_mods": { - "$ref": "#/$defs/img_mods" - }, - "disabled_img": { - "$ref": "#/$defs/disabled_img" - }, - "disabled_img_mods": { - "$ref": "#/$defs/disabled_img_mods" - }, - "codes": { - "$ref": "#/$defs/codes" + { + "type": "string", + "enum": [ + "true", + "false" + ] } - } - } + ] + }, + "img": { + "$ref": "#/$defs/img" + }, + "img_mods": { + "$ref": "#/$defs/img_mods" + }, + "disabled_img": { + "$ref": "#/$defs/disabled_img" + }, + "disabled_img_mods": { + "$ref": "#/$defs/disabled_img_mods" + }, + "name": { + "$ref": "#/$defs/name_stage" + } } - }, - "required": [ - "images" - ] + } } - ] + }, + "required": [ + "images" + ] } }, "toggle_badged_type_if_block": { @@ -552,7 +543,7 @@ "type": "string", "pattern": "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3}|[a-fA-F0-9]{8}|[a-fA-F0-9]{4})$" } - }, + }, "patternProperties": { "^(overlay|badge)_font_size$": { "description": "Font size of the overlay text displaying the quantity.", @@ -587,7 +578,7 @@ "badge_font_size": true } } - ], + ], "required": [] } } diff --git a/schema/packs/strict/items.json b/schema/packs/strict/items.json index 477ca02a..e39e03d8 100644 --- a/schema/packs/strict/items.json +++ b/schema/packs/strict/items.json @@ -96,6 +96,10 @@ ], "type": "string" }, + "name_stage": { + "description": "Readable name of the stage for tooltip.", + "type": "string" + }, "stages": { "description": "Stages of the progressive item.", "type": "array", @@ -131,8 +135,7 @@ "$ref": "#/$defs/disabled_img_mods" }, "name": { - "description": "Readable name of the stage for tooltip.", - "type": "string" + "$ref": "#/$defs/name_stage" } }, "additionalProperties": false @@ -201,7 +204,7 @@ "$ref": "#/$defs/stages" }, "allow_disabled": { - "description": "Automatically addes a \"off\" stage if set to true.", + "description": "Automatically adds a \"off\" stage if set to true.", "type": "boolean" }, "initial_stage_idx": { @@ -318,79 +321,59 @@ "name": true, "type": true, "capturable": true, - "item_left": true, - "item_right": true, - "images": true, - "overlay_align": true - }, - "additionalProperties": false, - "required": [ - "codes" - ], - "oneOf": [ - { - "properties": { - "item_left": { - "description": "Code identifier of the left item.", - "type": "string" - }, - "item_right": { - "description": "Code identifier of the right item.", - "type": "string" - }, - "images": false - }, - "required": [ - "item_left", - "item_right" - ] + "overlay_align": true, + "item_left": { + "description": "Code identifier of the left item.", + "type": "string" }, - { - "properties": { - "images": { - "description": "Array of images and states (up to 4, on/off for each item).", - "type": "array", - "items": { - "type": "object", - "required": [ - "left", - "right" - ], - "additionalProperties": false, - "properties": { - "left": { - "description": "State of left item.", - "type": "boolean" - }, - "right": { - "description": "State of right item.", - "type": "boolean" - }, - "img": { - "$ref": "#/$defs/img" - }, - "img_mods": { - "$ref": "#/$defs/img_mods" - }, - "disabled_img": { - "$ref": "#/$defs/disabled_img" - }, - "disabled_img_mods": { - "$ref": "#/$defs/disabled_img_mods" - }, - "codes": { - "$ref": "#/$defs/codes" - } - } + "item_right": { + "description": "Code identifier of the right item.", + "type": "string" + }, + "images": { + "description": "Array of images and states (up to 4, on/off for each item).", + "type": "array", + "items": { + "type": "object", + "required": [ + "left", + "right" + ], + "additionalProperties": false, + "properties": { + "left": { + "description": "State of left item.", + "type": "boolean" + }, + "right": { + "description": "State of right item.", + "type": "boolean" + }, + "img": { + "$ref": "#/$defs/img" + }, + "img_mods": { + "$ref": "#/$defs/img_mods" + }, + "disabled_img": { + "$ref": "#/$defs/disabled_img" }, - "left_item": false, - "right_item": false + "disabled_img_mods": { + "$ref": "#/$defs/disabled_img_mods" + }, + "name": { + "$ref": "#/$defs/name_stage" + } } - }, - "required": [ - "images" - ] + } } + }, + "additionalProperties": false, + "required": [ + "item_left", + "item_right", + "images", + "codes" ] } },