{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/robust-station-image/latest.json",
  "title": "RSI Schema",
  "description": "JSON Schema for SS14 RSI validation.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/space-wizards/RobustToolbox/refs/heads/master/Schemas/rsi.json",
    "sourceSha256": "c2216349ca601a07ba166aeaaf99ed2b9c9e2c8d42c3ebb753574f6ecdc6b6bc",
    "fileMatch": [
      "**/*.rsi/meta.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "version": {
      "type": "integer",
      "default": "",
      "description": "RSI version integer.",
      "title": "The version schema"
    },
    "license": {
      "type": "string",
      "default": "",
      "description": "The license for the associated icon states. Restricted to SS14-compatible asset licenses.",
      "enum": [
        "CC-BY-3.0",
        "CC-BY-4.0",
        "CC-BY-SA-3.0",
        "CC-BY-SA-4.0",
        "CC-BY-NC-3.0",
        "CC-BY-NC-4.0",
        "CC-BY-NC-SA-3.0",
        "CC-BY-NC-SA-4.0",
        "CC0-1.0"
      ],
      "examples": [
        "CC-BY-SA-3.0"
      ],
      "title": "License"
    },
    "copyright": {
      "examples": [
        "Taken from CODEBASE at COMMIT LINK"
      ],
      "type": "string",
      "title": "Copyright Info",
      "description": "The copyright holder. This is typically a link to the commit of the codebase that the icon is pulled from.",
      "default": ""
    },
    "size": {
      "properties": {
        "x": {
          "examples": [
            32
          ],
          "type": "integer",
          "default": 32
        },
        "y": {
          "examples": [
            32
          ],
          "type": "integer",
          "default": 32
        }
      },
      "default": {},
      "description": "The dimensions of the sprites inside the RSI.  This is not the size of the PNG files that store the sprite sheet.",
      "examples": [
        {
          "x": 32,
          "y": 32
        }
      ],
      "title": "Sprite Dimensions",
      "required": [
        "x",
        "y"
      ],
      "type": "object",
      "additionalProperties": true
    },
    "states": {
      "items": {
        "properties": {
          "name": {
            "type": "string"
          },
          "directions": {
            "type": "integer",
            "enum": [
              1,
              4,
              8
            ]
          },
          "delays": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          }
        },
        "type": "object",
        "required": [
          "name"
        ]
      },
      "type": "array",
      "title": "Icon States",
      "description": "Metadata for icon states. Includes name, directions, delays, etc.",
      "default": [],
      "examples": [
        [
          {
            "name": "basic"
          },
          {
            "name": "basic-directions",
            "directions": 4
          }
        ]
      ],
      "additionalItems": true
    }
  },
  "additionalProperties": true,
  "default": {},
  "required": [
    "version",
    "license",
    "copyright",
    "size",
    "states"
  ],
  "examples": [
    {
      "version": 1,
      "license": "CC-BY-SA-3.0",
      "copyright": "Taken from CODEBASE at COMMIT PERMALINK",
      "size": {
        "x": 32,
        "y": 32
      },
      "states": [
        {
          "name": "basic"
        },
        {
          "name": "basic-directions",
          "directions": 4
        },
        {
          "name": "basic-delays",
          "delays": [
            [
              0.1,
              0.1
            ]
          ]
        },
        {
          "name": "basic-delays-directions",
          "directions": 4,
          "delays": [
            [
              0.1,
              0.1
            ],
            [
              0.1,
              0.1
            ],
            [
              0.1,
              0.1
            ],
            [
              0.1,
              0.1
            ]
          ]
        }
      ]
    }
  ]
}
