inventory.json 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {
  2. "$schema": "http://json-schema.org/draft-06/schema#",
  3. "properties": {
  4. "items": {
  5. "items": {
  6. "properties": {
  7. "name": {"type": "string"},
  8. "count": {"type": "integer", "minimum": 1},
  9. "countEquipped": {"type": "integer", "minimum": 0},
  10. "value": {"$ref": "file:common.json#/definitions/money"},
  11. "page": {"type": "string"},
  12. "slot": {
  13. "allOf":[
  14. {"$ref": "#/definitions/slot"},
  15. {"not": {"enum": ["RING1", "RING2"]}}
  16. ]
  17. },
  18. "weight": {"type": "number"}
  19. },
  20. "oneOf": [
  21. {
  22. "properties": {
  23. "weapon": {"$ref": "file:weapon.json#"},
  24. "armor": false
  25. }
  26. },
  27. {
  28. "properties": {
  29. "weapon": false,
  30. "armor": {"$ref": "file:armor.json#"}
  31. }
  32. },
  33. {
  34. "properties": {"weapon": false, "armor": false}
  35. }
  36. ],
  37. "required": [
  38. "name",
  39. "count",
  40. "value",
  41. "weight"
  42. ],
  43. "type": "object"
  44. },
  45. "type": "array"
  46. },
  47. "equipment": {"$ref": "#/definitions/loadout"},
  48. "favorites": {
  49. "additionalProperties": {
  50. "$ref": "#/definitions/loadout"
  51. }
  52. },
  53. "wealth": {"$ref": "file:common.json#/definitions/money"}
  54. },
  55. "definitions": {
  56. "loadout": {
  57. "propertyNames": {"$ref": "#/definitions/slot"},
  58. "properties": {
  59. "RING": false,
  60. "ONE_HAND": false,
  61. "TWO_HANDS": false
  62. },
  63. "additionalProperties": {"type": "string"},
  64. "type": "object"
  65. },
  66. "slot": {
  67. "type": "string",
  68. "enum": [
  69. "HEAD",
  70. "FACE",
  71. "NECK",
  72. "TORSO",
  73. "BODY",
  74. "WAIST",
  75. "SHOULDER",
  76. "ARM",
  77. "HAND",
  78. "RING",
  79. "RING1",
  80. "RING2",
  81. "FEET",
  82. "MAIN_HAND",
  83. "OFF_HAND",
  84. "ONE_HAND",
  85. "TWO_HANDS"
  86. ]
  87. }
  88. },
  89. "type": "object",
  90. "additionalProperties": false
  91. }