1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +02:00
vcmi/config/schemas/townBuilding.json
Ivan Savenko c927913f5f - Improved json validation. Now it support most of features from latest json schema draft
- Set of schemas in config/schemas directory that are used to validate input from mods.
2013-04-02 17:06:43 +00:00

51 lines
1.3 KiB
JSON

{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"title" : "VCMI town building format",
"description" : "Format used to define town buildings in VCMI",
"required": [ "id" ],
"properties":{
"id": {
"type":"number",
"description" : "Numeric identifier of this building"
},
"mode": {
"type":"string",
"enum" : [ "normal", "auto", "special", "grail" ],
"description" : "Mode in which this building will be built"
},
"requires": {
"type":"array",
"description" : "List of town buildings that must be built before this one",
"items": {
"type":"number"
}
},
"upgrades": {
"description" : "If this building is upgrade, identifier of base building",
"type":"number"
},
"name" : {
"description" : "Name of this building",
"type" : "string"
},
"description" : {
"description" : "Full decsription of this building",
"type" : "string"
},
"cost": {
"type":"object",
"description": "Cost to build this building",
"properties":{
"wood": { "type":"number"},
"mercury": { "type":"number"},
"ore": { "type":"number"},
"sulfur": { "type":"number"},
"crystal": { "type":"number"},
"gems": { "type":"number"},
"gold": { "type":"number"}
}
}
}
}