Added techs json schema

This commit is contained in:
Yair Morgenstern
2023-09-24 12:15:22 +03:00
parent daafa5104f
commit f13bb7990f
2 changed files with 52 additions and 0 deletions

View File

@ -42,6 +42,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/nations.json"
},
{
"fileMatch": [
"*/TileImprovements.json"
],
"url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/tileImprovements.json"
},
{
"fileMatch": [
"*/TileImprovements.json"

View File

@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"columnNumber": { "type": "integer" },
"era": { "type": "string" },
"techCost": { "type": "integer" },
"buildingCost": { "type": "integer" },
"wonderCost": { "type": "integer" },
"techs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"row": { "type": "integer" },
"cost": {
"type": "integer",
"description": "Science cost of this tech - overrides the column techCost"
},
"uniques": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/uniques.json" },
"prerequisites": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"civilopediaText": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/civilopediaText.json" },
"quote": { "type": "string" }
},
"required": ["name", "row"],
"additionalProperties": false
}
},
"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" }
},
"required": [
"columnNumber", "era"
],
"additionalProperties": false
}
}