1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #1918 from IvanSavenko/fix_map_loading

Fix vcmi map loading
This commit is contained in:
Ivan Savenko
2023-04-09 20:08:23 +03:00
committed by GitHub
6 changed files with 72 additions and 33 deletions

View File

@@ -18,6 +18,7 @@
"value" : 100,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"blockedVisitable" : true,
"onVisitedMessage" : 22,
@@ -49,6 +50,7 @@
"value" : 100,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 30,
"visitMode" : "bonus",
@@ -81,6 +83,7 @@
"value" : 100,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 50,
"visitMode" : "bonus",
@@ -112,6 +115,7 @@
"value" : 100,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 56,
"visitMode" : "bonus",
@@ -164,6 +168,7 @@
"value" : 100,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 58,
"visitMode" : "bonus",
@@ -195,6 +200,7 @@
"value" : 100,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 63,
"visitMode" : "bonus",
@@ -250,6 +256,7 @@
"value" : 100,
"rarity" : 20
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 82,
"visitMode" : "bonus",
@@ -280,6 +287,7 @@
"value" : 100,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 95,
"visitMode" : "bonus",
@@ -312,10 +320,10 @@
"value" : 200,
"rarity" : 40
},
"compatibilityIdentifiers" : [ "object" ],
"visitMode" : "bonus",
"selectMode" : "selectFirst",
"onVisited" : [
{
"message" : 139,
@@ -370,6 +378,7 @@
"value" : 100,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 141,
"visitMode" : "bonus",
@@ -406,6 +415,7 @@
"value" : 100,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 111,
"visitMode" : "bonus",
@@ -440,6 +450,7 @@
"value" : 500,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 167,
"visitMode" : "bonus",

View File

@@ -18,6 +18,7 @@
"value" : 3000,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onSelectMessage" : 0,
"onVisitedMessage" : 1,
@@ -51,6 +52,7 @@
"value" : 1500,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 40,
"visitMode" : "hero",
@@ -81,6 +83,7 @@
"value" : 1500,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 60,
"visitMode" : "hero",
@@ -110,6 +113,7 @@
"value" : 12000,
"rarity" : 20
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 67,
"onEmptyMessage" : 68,
@@ -154,6 +158,7 @@
"value" : 1500,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 81,
"visitMode" : "hero",
@@ -184,6 +189,7 @@
"value" : 1500,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 101,
"visitMode" : "hero",
@@ -214,6 +220,7 @@
"value" : 2500,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onEmpty" : [
{
@@ -270,6 +277,7 @@
"value" : 1000,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onSelectMessage" : 71,
"onVisitedMessage" : 72,
@@ -309,6 +317,7 @@
"value" : 1000,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onSelectMessage" : 158,
"onVisitedMessage" : 159,
@@ -348,6 +357,7 @@
"value" : 1500,
"rarity" : 200
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 144,
"visitMode" : "hero",

View File

@@ -17,6 +17,7 @@
"value" : 250,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onEmptyMessage" : 79,
"onVisitedMessage" : 78,
@@ -54,6 +55,7 @@
// "value" : 500,
// "rarity" : 50
//},
"compatibilityIdentifiers" : [ "object" ],
"onEmptyMessage" : 76,
"onVisitedMessage" : 75,
@@ -92,6 +94,7 @@
"value" : 500,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 93,
"resetParameters" : {
@@ -133,6 +136,7 @@
"value" : 1500,
"rarity" : 80
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 169,
"resetParameters" : {
@@ -174,6 +178,7 @@
"value" : 750,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 165,
"resetParameters" : {

View File

@@ -17,6 +17,7 @@
"value" : 500,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 65,
"visitMode" : "once",
@@ -52,6 +53,7 @@
"value" : 500,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 38,
"blockedVisitable" : true,
@@ -92,6 +94,7 @@
"value" : 500,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"onVisitedMessage" : 156,
"visitMode" : "once",
@@ -142,6 +145,7 @@
"value" : 6000,
"rarity" : 20
},
"compatibilityIdentifiers" : [ "object" ],
"onSelectMessage" : 161,
"visitMode" : "once",

View File

@@ -19,6 +19,7 @@
"value" : 2000,
"rarity" : 500
},
"compatibilityIdentifiers" : [ "object" ],
"blockedVisitable" : true,
"visitMode" : "unlimited",
@@ -60,6 +61,7 @@
"value" : 2000,
"rarity" : 100
},
"compatibilityIdentifiers" : [ "object" ],
"blockedVisitable" : true,
"visitMode" : "unlimited",
@@ -117,6 +119,7 @@
"value" : 1500,
"rarity" : 500
},
"compatibilityIdentifiers" : [ "object" ],
"blockedVisitable" : true,
"visitMode" : "unlimited",
@@ -167,6 +170,7 @@
"value" : 1500,
"rarity" : 50
},
"compatibilityIdentifiers" : [ "object" ],
"blockedVisitable" : true,
"visitMode" : "unlimited",
@@ -217,6 +221,7 @@
"value" : 1500,
"rarity" : 1000
},
"compatibilityIdentifiers" : [ "object" ],
"blockedVisitable" : true,
"onSelectMessage" : 146,

View File

@@ -165,6 +165,8 @@ void CObjectClassesHandler::loadSubObject(const std::string & scope, const std::
obj->objects.push_back(object);
registerObject(scope, obj->getJsonKey(), object->getSubTypeName(), object->subtype);
for (auto const & compatID : entry["compatibilityIdentifiers"].Vector())
registerObject(scope, obj->getJsonKey(), compatID.String(), object->subtype);
}
void CObjectClassesHandler::loadSubObject(const std::string & scope, const std::string & identifier, const JsonNode & entry, ObjectClass * obj, size_t index)
@@ -176,6 +178,8 @@ void CObjectClassesHandler::loadSubObject(const std::string & scope, const std::
obj->objects[index] = object;
registerObject(scope, obj->getJsonKey(), object->getSubTypeName(), object->subtype);
for (auto const & compatID : entry["compatibilityIdentifiers"].Vector())
registerObject(scope, obj->getJsonKey(), compatID.String(), object->subtype);
}
TObjectTypeHandler CObjectClassesHandler::loadSubObjectFromJson(const std::string & scope, const std::string & identifier, const JsonNode & entry, ObjectClass * obj, size_t index)