json schema for tileResources

This commit is contained in:
Yair Morgenstern
2024-02-25 23:27:23 +02:00
parent 4dbed12e45
commit cba867bb7e
2 changed files with 40 additions and 0 deletions

View File

@ -59,6 +59,12 @@ Tada! Now Android Studio will recognize all Buildings.json files as belonging to
"*/UnitTypes.json"
],
"url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/unitTypes.json"
},
{
"fileMatch": [
"*/TileResources.json"
],
"url": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/tileResources.json"
}
]
```

View File

@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"terrainsCanBeFoundOn": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"improvement": { "type": "string" },
"techRequired": { "type": "string" },
"improvementStats": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/stats.json" },
"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
}
}