diff --git a/docs/Modders/Type-checking.md b/docs/Modders/Type-checking.md index bdf5537b7d..ab1c4933cf 100644 --- a/docs/Modders/Type-checking.md +++ b/docs/Modders/Type-checking.md @@ -60,6 +60,12 @@ Tada! Now Android Studio will recognize all Buildings.json files as belonging to ], "url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/unitTypes.json" }, + { + "fileMatch": [ + "*/UnitPromotions.json" + ], + "url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/unitPromotions.json" + }, { "fileMatch": [ "*/TileResources.json" diff --git a/docs/Modders/schemas/unitPromotions.json b/docs/Modders/schemas/unitPromotions.json new file mode 100644 index 0000000000..e2cfc6674d --- /dev/null +++ b/docs/Modders/schemas/unitPromotions.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "prerequisites": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, + "unitTypes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, + + "row": { "type": "integer", "minimum": 0, + "description": "Used as **column** hint in the promotion picker screen. Not a direct position, it is used to sort before an automatic distribution." + }, + "column": { "type": "integer", "minimum": 0, + "description": "Used as **row** hint in the promotion picker screen. Not a direct position, it is used to sort before an automatic distribution." + }, + + "uniques": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/uniques.json" }, + "civilopediaText": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/civilopediaText.json" }, + + "outerColor": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/color.json" }, + "innerColor": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/color.json" } + }, + "required": [ + "name" + ], + "additionalProperties": false + } +}