Forráskód Böngészése

Expanded schema to validate ray configuration

Ivan Savenko 3 éve
szülő
commit
9afc1eed49
1 módosított fájl, 28 hozzáadás és 1 törlés
  1. 28 1
      config/schemas/creature.json

+ 28 - 1
config/schemas/creature.json

@@ -227,7 +227,34 @@
 						},
 						"ray": {
 							"type":"array",
-							"description": "Colors of ray projectile animation"
+							"description": "Colors of ray projectile animation",
+							"minItems" : 1,
+							"items": {
+								"type":"object",
+								"required" : [ "start", "end" ],
+								"properties":{
+									"start":  {
+										"type":"array",
+										"minItems" : 4,
+										"maxItems" : 4,
+										"items": {
+											"minimum" : 0,
+											"maximum" : 255,
+											"type":"number"
+										}
+									 },
+									"end":  {
+										"type":"array",
+										"minItems" : 4,
+										"maxItems" : 4,
+										"items": {
+											"minimum" : 0,
+											"maximum" : 255,
+											"type":"number"
+										}
+									}
+								}
+							}
 						},
 						"frameAngles": {
 							"type":"array",