1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge pull request #5934 from MichalZr6/fix_schemas

Fix JSON schemas
This commit is contained in:
Ivan Savenko
2025-07-17 16:17:35 +03:00
committed by GitHub
13 changed files with 60 additions and 34 deletions

View File

@@ -481,7 +481,6 @@
}, },
"graphics" : "graphics" :
{ {
"missile" : null,
"mapAttackFromRight": "AvWattak.def:0:110", "mapAttackFromRight": "AvWattak.def:0:110",
"mapAttackFromLeft": "AvWattak.def:0:111", "mapAttackFromLeft": "AvWattak.def:0:111",
"animation": "CADEVL.DEF" "animation": "CADEVL.DEF"

View File

@@ -9,7 +9,6 @@
"hasDoubleWeek": true, "hasDoubleWeek": true,
"graphics" : "graphics" :
{ {
"missile" : null,
"mapAttackFromRight": "AvWattak.def:0:28", "mapAttackFromRight": "AvWattak.def:0:28",
"mapAttackFromLeft": "AvWattak.def:0:29", "mapAttackFromLeft": "AvWattak.def:0:29",
"animation": "CCENTR.DEF" "animation": "CCENTR.DEF"
@@ -32,7 +31,6 @@
"doubleWide" : true, "doubleWide" : true,
"graphics" : "graphics" :
{ {
"missile" : null,
"mapAttackFromRight": "AvWattak.def:0:30", "mapAttackFromRight": "AvWattak.def:0:30",
"mapAttackFromLeft": "AvWattak.def:0:31", "mapAttackFromLeft": "AvWattak.def:0:31",
"animation": "CECENT.DEF" "animation": "CECENT.DEF"

View File

@@ -5,28 +5,24 @@
{ {
"faction": "neutral", "faction": "neutral",
"disabled" : true, "disabled" : true,
"graphics" : null,
"index" : 122 "index" : 122
}, },
"unused124" : "unused124" :
{ {
"faction": "neutral", "faction": "neutral",
"disabled" : true, "disabled" : true,
"graphics" : null,
"index" : 124 "index" : 124
}, },
"unused126" : "unused126" :
{ {
"faction": "neutral", "faction": "neutral",
"disabled" : true, "disabled" : true,
"graphics" : null,
"index" : 126 "index" : 126
}, },
"unused128" : "unused128" :
{ {
"faction": "neutral", "faction": "neutral",
"disabled" : true, "disabled" : true,
"graphics" : null,
"index" : 128 "index" : 128
}, },

View File

@@ -146,10 +146,10 @@
"properties" : { "properties" : {
"usageType": { "usageType": {
"type" : "string", "type" : "string",
"enum" : ["SPELLCAST", "BATTLE", "BUILDING"], "enum" : ["SPELLCAST", "BATTLE", "BUILDING"]
}, },
"removeOnDepletion" : { "removeOnDepletion" : {
"type" : "boolean", "type" : "boolean"
}, },
"startingCharges" : { "startingCharges" : {
"type" : "number", "type" : "number",

View File

@@ -186,7 +186,7 @@
"properties" : { "properties" : {
"type" : { "type" : {
"type" : "string", "type" : "string",
"const" : "GROWS_WITH_LEVEL", "const" : "GROWS_WITH_LEVEL"
}, },
"valPer20" : { "valPer20" : {
"type" : "integer", "type" : "integer",
@@ -207,7 +207,7 @@
"properties" : { "properties" : {
"type" : { "type" : {
"type" : "string", "type" : "string",
"const" : "TIMES_HERO_LEVEL", "const" : "TIMES_HERO_LEVEL"
}, },
"stepSize" : { "stepSize" : {
"type" : "integer", "type" : "integer",
@@ -224,7 +224,7 @@
"properties" : { "properties" : {
"type" : { "type" : {
"type" : "string", "type" : "string",
"const" : "TIMES_STACK_SIZE", "const" : "TIMES_STACK_SIZE"
}, },
"stepSize" : { "stepSize" : {
"type" : "integer", "type" : "integer",
@@ -249,7 +249,7 @@
"properties" : { "properties" : {
"type" : { "type" : {
"type" : "string", "type" : "string",
"const" : "TIMES_ARMY_SIZE", "const" : "TIMES_ARMY_SIZE"
}, },
"stepSize" : { "stepSize" : {
"type" : "integer", "type" : "integer",
@@ -297,12 +297,12 @@
}, },
"sourceType" : { "sourceType" : {
"type" : "string", "type" : "string",
"enum" : [ "ARTIFACT", "ARTIFACT_INSTANCE", "OBJECT_TYPE", "OBJECT_INSTANCE", "CREATURE_ABILITY", "TERRAIN_NATIVE", "TERRAIN_OVERLAY", "SPELL_EFFECT", "TOWN_STRUCTURE", "HERO_BASE_SKILL", "SECONDARY_SKILL", "HERO_SPECIAL", "ARMY", "CAMPAIGN_BONUS", "STACK_EXPERIENCE", "COMMANDER", "GLOBAL", "OTHER", ], "enum" : [ "ARTIFACT", "ARTIFACT_INSTANCE", "OBJECT_TYPE", "OBJECT_INSTANCE", "CREATURE_ABILITY", "TERRAIN_NATIVE", "TERRAIN_OVERLAY", "SPELL_EFFECT", "TOWN_STRUCTURE", "HERO_BASE_SKILL", "SECONDARY_SKILL", "HERO_SPECIAL", "ARMY", "CAMPAIGN_BONUS", "STACK_EXPERIENCE", "COMMANDER", "GLOBAL", "OTHER" ],
"description" : "sourceType" "description" : "sourceType"
}, },
"targetSourceType" : { "targetSourceType" : {
"type" : "string", "type" : "string",
"enum" : [ "ARTIFACT", "ARTIFACT_INSTANCE", "OBJECT_TYPE", "OBJECT_INSTANCE", "CREATURE_ABILITY", "TERRAIN_NATIVE", "TERRAIN_OVERLAY", "SPELL_EFFECT", "TOWN_STRUCTURE", "HERO_BASE_SKILL", "SECONDARY_SKILL", "HERO_SPECIAL", "ARMY", "CAMPAIGN_BONUS", "STACK_EXPERIENCE", "COMMANDER", "GLOBAL", "OTHER", ], "enum" : [ "ARTIFACT", "ARTIFACT_INSTANCE", "OBJECT_TYPE", "OBJECT_INSTANCE", "CREATURE_ABILITY", "TERRAIN_NATIVE", "TERRAIN_OVERLAY", "SPELL_EFFECT", "TOWN_STRUCTURE", "HERO_BASE_SKILL", "SECONDARY_SKILL", "HERO_SPECIAL", "ARMY", "CAMPAIGN_BONUS", "STACK_EXPERIENCE", "COMMANDER", "GLOBAL", "OTHER" ],
"description" : "targetSourceType" "description" : "targetSourceType"
}, },
"propagator" : { "propagator" : {

View File

@@ -25,10 +25,10 @@
"description" : "Message that will be shown to player on capturing this object", "description" : "Message that will be shown to player on capturing this object",
"anyOf" : [ "anyOf" : [
{ {
"type" : "string", "type" : "string"
}, },
{ {
"type" : "number", "type" : "number"
} }
] ]
}, },

View File

@@ -34,7 +34,7 @@
"compatibilityIdentifiers" : { "compatibilityIdentifiers" : {
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string"
}, },
"description" : "Additional identifiers that may refer to this object, to provide compatibility after object has been renamed" "description" : "Additional identifiers that may refer to this object, to provide compatibility after object has been renamed"
}, },

View File

@@ -0,0 +1,33 @@
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Highscore Creature format",
"description" : "Json format for defining highscore for creatures in VCMI",
"properties": {
"creatures": {
"type": "array",
"items": {
"type": "object",
"required": [
"creature"
],
"properties": {
"min": {
"type": "integer"
},
"max": {
"type": "integer"
},
"creature": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"required": [
"creatures"
],
"additionalProperties": false
}

View File

@@ -147,7 +147,7 @@
{ {
"type" : "array", "type" : "array",
"items" : { "type" : "string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, }
] ]
}, },
"filesystem" : { "filesystem" : {

View File

@@ -82,8 +82,8 @@
"additionalProperties" : { "additionalProperties" : {
"$ref" : "#/definitions/value" "$ref" : "#/definitions/value"
} }
}, }
], ]
}, },
"reward" : { "reward" : {
"type" : "object", "type" : "object",
@@ -210,7 +210,7 @@
"noneOf" : { "noneOf" : {
"type" : "array", "type" : "array",
"items" : { "$ref" : "#/definitions/limiter" } "items" : { "$ref" : "#/definitions/limiter" }
}, }
} }
}, },
"message" : { "message" : {
@@ -275,8 +275,8 @@
}, },
"secondarySkill" : { "secondarySkill" : {
"$ref" : "#/definitions/variableList" "$ref" : "#/definitions/variableList"
}, }
}, }
}, },
"onGuardedMessage" : { "onGuardedMessage" : {

View File

@@ -695,19 +695,19 @@
"properties" : { "properties" : {
"defaultRepositoryEnabled" : { "defaultRepositoryEnabled" : {
"type" : "boolean", "type" : "boolean",
"default" : true, "default" : true
}, },
"defaultRepositoryURL" : { "defaultRepositoryURL" : {
"type" : "string", "type" : "string",
"default" : "https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/vcmi-1.7.json", "default" : "https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/vcmi-1.7.json"
}, },
"extraRepositoryEnabled" : { "extraRepositoryEnabled" : {
"type" : "boolean", "type" : "boolean",
"default" : false, "default" : false
}, },
"extraRepositoryURL" : { "extraRepositoryURL" : {
"type" : "string", "type" : "string",
"default" : "", "default" : ""
}, },
"setupCompleted" : { "setupCompleted" : {
"type" : "boolean", "type" : "boolean",
@@ -736,7 +736,7 @@
"defaultAndroid": false, "defaultAndroid": false,
"defaultDesktop" : true "defaultDesktop" : true
}, }
} }
}, },
"lobby" : { "lobby" : {

View File

@@ -466,8 +466,8 @@
}, },
"properties": { "properties": {
"type": { "type": {
"enum" : ["adventure", "combat"], "enum" : ["adventure", "combat"]
}, }
} }
}, },
@@ -479,7 +479,7 @@
}, },
"graphics" : { "graphics" : {
"required" : ["iconBook", "iconScroll", "iconEffect", "iconImmune", "iconScenarioBonus"] "required" : ["iconBook", "iconScroll", "iconEffect", "iconImmune", "iconScenarioBonus"]
}, }
} }
} }
}, },
@@ -506,7 +506,7 @@
}, },
"graphics" : { "graphics" : {
"required" : ["iconEffect", "iconImmune"] "required" : ["iconEffect", "iconImmune"]
}, }
} }
} }
} }

View File

@@ -125,7 +125,7 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"enum" : [ "resource-resource", "resource-player", "creature-resource", "resource-artifact", "artifact-resource", "artifact-experience", "creature-experience", "creature-undead", "resource-skill"], "enum" : [ "resource-resource", "resource-player", "creature-resource", "resource-artifact", "artifact-resource", "artifact-experience", "creature-experience", "creature-undead", "resource-skill"]
}, },
"description" : "List of modes available in this market" "description" : "List of modes available in this market"
}, },