mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed #2026
This commit is contained in:
parent
f894abe494
commit
a832b7efee
@ -157,7 +157,7 @@
|
|||||||
"base" : {
|
"base" : {
|
||||||
"base" : {
|
"base" : {
|
||||||
"visitableFrom" : [ "---", "+++", "+++" ],
|
"visitableFrom" : [ "---", "+++", "+++" ],
|
||||||
"mask" : [ "VVV", "VAV" ]
|
"mask" : [ "VVV", "VVV", "VAV" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"types" : {
|
"types" : {
|
||||||
|
@ -249,7 +249,11 @@ void ObjectTemplate::readJson(const JsonNode &node)
|
|||||||
usedTiles[mask.size() - 1 - i][line.size() - 1 - j] = charToTile(line[j]);
|
usedTiles[mask.size() - 1 - i][line.size() - 1 - j] = charToTile(line[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
printPriority = node["zIndex"].Float();
|
const JsonNode zindex = node["zIndex"];
|
||||||
|
if (!zindex.isNull())
|
||||||
|
printPriority = node["zIndex"].Float();
|
||||||
|
else
|
||||||
|
printPriority = 0; //default value
|
||||||
}
|
}
|
||||||
|
|
||||||
ui32 ObjectTemplate::getWidth() const
|
ui32 ObjectTemplate::getWidth() const
|
||||||
@ -332,7 +336,7 @@ int3 ObjectTemplate::getBlockMapOffset() const
|
|||||||
return int3(w, h, 0);
|
return int3(w, h, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return int3(-1,-1,-1);
|
return int3(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ObjectTemplate::isVisitableFrom(si8 X, si8 Y) const
|
bool ObjectTemplate::isVisitableFrom(si8 X, si8 Y) const
|
||||||
|
@ -801,12 +801,10 @@ bool CRmgTemplateZone::createTreasurePile(CMapGenerator* gen, int3 &pos, float m
|
|||||||
oiptr->maxPerZone--;
|
oiptr->maxPerZone--;
|
||||||
if (!oiptr->maxPerZone)
|
if (!oiptr->maxPerZone)
|
||||||
possibleObjects.erase(oiptr);
|
possibleObjects.erase(oiptr);
|
||||||
//TODO
|
|
||||||
|
|
||||||
//update treasure pile area
|
//update treasure pile area
|
||||||
int3 visitablePos = info.nextTreasurePos;
|
int3 visitablePos = info.nextTreasurePos;
|
||||||
|
|
||||||
//TODO: actually we need to check is object is either !blockVisit or removable after visit - this means object below can be accessed
|
|
||||||
if (oi.templ.isVisitableFromTop())
|
if (oi.templ.isVisitableFromTop())
|
||||||
info.visitableFromTopPositions.insert(visitablePos); //can be accessed from any direction
|
info.visitableFromTopPositions.insert(visitablePos); //can be accessed from any direction
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user