Added tileImprovement json schema

This commit is contained in:
Yair Morgenstern
2023-09-24 12:05:00 +03:00
parent fc02ac8825
commit daafa5104f
3 changed files with 48 additions and 4 deletions

View File

@ -41,6 +41,12 @@ Tada! Now Android Studio will recognize all Buildings.json files as belonging to
"*/Nations.json" "*/Nations.json"
], ],
"url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/nations.json" "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"
} }
] ]
``` ```

View File

@ -18,9 +18,9 @@
"civilopediaText": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/civilopediaText.json" }, "civilopediaText": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/civilopediaText.json" },
"requiredTech": { "type": "string" }, "requiredTech": { "type": "string" },
"cost": { "type": "number" }, "cost": { "type": "integer" },
"maintenance": { "maintenance": {
"type": "number", "type": "integer",
"description": "Gold upkeep per turn for this building" "description": "Gold upkeep per turn for this building"
}, },
"percentStatBonus": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/stats.json" }, "percentStatBonus": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/stats.json" },
@ -44,8 +44,8 @@
"items": { "type": "string" }, "items": { "type": "string" },
"uniqueItems": true "uniqueItems": true
}, },
"cityStrength": { "type": "number" }, "cityStrength": { "type": "integer" },
"cityHealth": { "type": "number" }, "cityHealth": { "type": "integer" },
"uniqueTo": { "uniqueTo": {
"type": "string", "type": "string",

View File

@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"terrainsCanBeBuiltOn": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true,
},
"turnsToBuild": { "type": "integer" },
"techRequired": { "type": "string" },
"uniqueTo": { "type": "string" },
"shortcutKey": {
"type": "string",
"maxLength": 1
},
"production": { "type": "number" },
"food": { "type": "number" },
"gold": { "type": "number" },
"science": { "type": "number" },
"culture": { "type": "number" },
"happiness": { "type": "number" },
"faith": { "type": "number" },
"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": [
"name",
],
"additionalProperties": false
}
}