civilopediaText.json array-ized, since it's common *as an array*

This commit is contained in:
Yair Morgenstern
2023-09-22 10:36:51 +03:00
parent 8678e4eeda
commit 8ccee2e862
3 changed files with 24 additions and 69 deletions

View File

@ -14,14 +14,9 @@
"happiness": { "type": "number" },
"faith": { "type": "number" },
"uniques": {
"type": "array",
"items": { "type": "string" }
},
"civilopediaText": {
"type": "array",
"items": { "$ref": "#/definitions/civilopediaText"}
},
"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" },
"requiredTech": { "type": "string" },
"cost": { "type": "number" },
"maintenance": { "type": "number" },
@ -54,26 +49,5 @@
"name"
],
"additionalProperties": false
},
"definitions": {
"civilopediaText": {
"type": "object",
"properties": {
"text": { "type": "string" },
"link": { "type": "string" },
"icon": { "type": "string" },
"extraImage": { "type": "string" },
"imageSize": { "type": "number" },
"size": { "type": "number" },
"header": { "type": "number" },
"indent": { "type": "number" },
"padding": { "type": "number" },
"color": { "type": "string" },
"separator": { "type": "boolean" },
"starred": { "type": "boolean" },
"centered": { "type": "boolean" },
"iconCrossed": { "type": "boolean" }
}
}
}
}

View File

@ -1,19 +1,22 @@
{
"type": "object",
"properties": {
"text": { "type": "string" },
"link": { "type": "string" },
"icon": { "type": "string" },
"extraImage": { "type": "string" },
"imageSize": { "type": "number" },
"size": { "type": "number" },
"header": { "type": "number" },
"indent": { "type": "number" },
"padding": { "type": "number" },
"color": { "type": "string" },
"separator": { "type": "boolean" },
"starred": { "type": "boolean" },
"centered": { "type": "boolean" },
"iconCrossed": { "type": "boolean" }
"type": "array",
"items": {
"type": "object",
"properties": {
"text": { "type": "string" },
"link": { "type": "string" },
"icon": { "type": "string" },
"extraImage": { "type": "string" },
"imageSize": { "type": "number" },
"size": { "type": "number" },
"header": { "type": "number" },
"indent": { "type": "number" },
"padding": { "type": "number" },
"color": { "type": "string" },
"separator": { "type": "boolean" },
"starred": { "type": "boolean" },
"centered": { "type": "boolean" },
"iconCrossed": { "type": "boolean" }
}
}
}

View File

@ -26,7 +26,7 @@
"uniqueTo": { "type": "string" },
"replaces": { "type": "string" },
"uniques": { "$ref": "#/definitions/uniques" },
"uniques": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/uniques.json" },
"promotions": {
"type": "array",
@ -36,10 +36,7 @@
"attackSound": { "type": "string" },
"replacementTextForUniques": { "type": "string" },
"civilopediaText": {
"type": "array",
"items": { "$ref": "#/definitions/civilopediaText"}
}
"civilopediaText": { "$ref": "https://raw.githubusercontent.com/yairm210/Unciv/master/docs/Modders/schemas/civilopediaText.json" }
},
"required": [
"name", "unitType"
@ -50,25 +47,6 @@
"uniques": {
"type": "array",
"items": { "type": "string" }
},
"civilopediaText": {
"type": "object",
"properties": {
"text": { "type": "string" },
"link": { "type": "string" },
"icon": { "type": "string" },
"extraImage": { "type": "string" },
"imageSize": { "type": "number" },
"size": { "type": "number" },
"header": { "type": "number" },
"indent": { "type": "number" },
"padding": { "type": "number" },
"color": { "type": "string" },
"separator": { "type": "boolean" },
"starred": { "type": "boolean" },
"centered": { "type": "boolean" },
"iconCrossed": { "type": "boolean" }
}
}
}
}