diff --git a/docs/Modders/Type-checking.md b/docs/Modders/Type-checking.md index b36b26f097..84b4c7818a 100644 --- a/docs/Modders/Type-checking.md +++ b/docs/Modders/Type-checking.md @@ -41,6 +41,12 @@ Tada! Now Android Studio will recognize all Buildings.json files as belonging to "*/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" } ] ``` diff --git a/docs/Modders/schemas/buildings.json b/docs/Modders/schemas/buildings.json index 4773c70871..4d06c0d122 100644 --- a/docs/Modders/schemas/buildings.json +++ b/docs/Modders/schemas/buildings.json @@ -18,9 +18,9 @@ "civilopediaText": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/civilopediaText.json" }, "requiredTech": { "type": "string" }, - "cost": { "type": "number" }, + "cost": { "type": "integer" }, "maintenance": { - "type": "number", + "type": "integer", "description": "Gold upkeep per turn for this building" }, "percentStatBonus": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/stats.json" }, @@ -44,8 +44,8 @@ "items": { "type": "string" }, "uniqueItems": true }, - "cityStrength": { "type": "number" }, - "cityHealth": { "type": "number" }, + "cityStrength": { "type": "integer" }, + "cityHealth": { "type": "integer" }, "uniqueTo": { "type": "string", diff --git a/docs/Modders/schemas/tileImprovements.json b/docs/Modders/schemas/tileImprovements.json new file mode 100644 index 0000000000..d024c9aec1 --- /dev/null +++ b/docs/Modders/schemas/tileImprovements.json @@ -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 + } +}