Prechádzať zdrojové kódy

Merge pull request #1105 from krs0/feature/#1071__In_latest_night_builds_there_are_problems_with_schema_obstacle.json_and_file_obstacles.json

Problems with schema obstacle.json and file obstacles.json #1071
Andrii Danylchenko 3 rokov pred
rodič
commit
1ca2283a90
3 zmenil súbory, kde vykonal 114 pridanie a 114 odobranie
  1. 112 112
      config/obstacles.json
  2. 1 1
      config/schemas/obstacle.json
  3. 1 1
      lib/ObstacleHandler.cpp

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 112 - 112
config/obstacles.json


+ 1 - 1
config/schemas/obstacle.json

@@ -15,7 +15,7 @@
 		"specialBattlefields": {
 			"type": "array",
 			"description": "Obstacles can be placed on specified specified battlefields",
-			"items": { "$ref" : "battlefield.json" }
+			"items": { "type" : "string" }
 		},
 		"width": {
 			"type": "number",

+ 1 - 1
lib/ObstacleHandler.cpp

@@ -85,7 +85,7 @@ ObstacleInfo * ObstacleHandler::loadFromJson(const std::string & scope, const Js
 	info->animation = json["animation"].String();
 	info->width = json["width"].Integer();
 	info->height = json["height"].Integer();
-	for(auto & t : json["allowedTerrain"].Vector())
+	for(auto & t : json["allowedTerrains"].Vector())
 		info->allowedTerrains.emplace_back(VLC->terrainTypeHandler->getInfoByName(t.String())->id);
 	for(auto & t : json["specialBattlefields"].Vector())
 		info->allowedSpecialBfields.emplace_back(t.String());

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov