mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fix regressions in RMG & map editor
This commit is contained in:
parent
668aee71ff
commit
c455986a55
@ -204,7 +204,7 @@ RoadType * RoadTypeHandler::loadFromJson(
|
||||
|
||||
const std::vector<std::string> & RoadTypeHandler::getTypeNames() const
|
||||
{
|
||||
static const std::vector<std::string> typeNames = { "river" };
|
||||
static const std::vector<std::string> typeNames = { "road" };
|
||||
return typeNames;
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ TerrainType::TerrainType()
|
||||
|
||||
std::string RoadType::getNameTextID() const
|
||||
{
|
||||
return TextIdentifier( "terrain", identifier, "name" ).get();
|
||||
return TextIdentifier( "road", identifier, "name" ).get();
|
||||
}
|
||||
|
||||
std::string RoadType::getNameTranslated() const
|
||||
@ -284,7 +284,7 @@ std::string RoadType::getNameTranslated() const
|
||||
|
||||
std::string RiverType::getNameTextID() const
|
||||
{
|
||||
return TextIdentifier( "terrain", identifier, "name" ).get();
|
||||
return TextIdentifier( "river", identifier, "name" ).get();
|
||||
}
|
||||
|
||||
std::string RiverType::getNameTranslated() const
|
||||
@ -293,11 +293,13 @@ std::string RiverType::getNameTranslated() const
|
||||
}
|
||||
|
||||
RiverType::RiverType():
|
||||
id(River::NO_RIVER)
|
||||
id(River::NO_RIVER),
|
||||
identifier("empty")
|
||||
{}
|
||||
|
||||
RoadType::RoadType():
|
||||
id(Road::NO_ROAD),
|
||||
identifier("empty"),
|
||||
movementCost(GameConstants::BASE_MOVEMENT_COST)
|
||||
{}
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
@ -129,9 +129,9 @@ CCastleEvent::CCastleEvent() : town(nullptr)
|
||||
TerrainTile::TerrainTile():
|
||||
terType(nullptr),
|
||||
terView(0),
|
||||
riverType(nullptr),
|
||||
riverType(VLC->riverTypeHandler->getById(River::NO_RIVER)),
|
||||
riverDir(0),
|
||||
roadType(nullptr),
|
||||
roadType(VLC->roadTypeHandler->getById(Road::NO_ROAD)),
|
||||
roadDir(0),
|
||||
extTileFlags(0),
|
||||
visitable(false),
|
||||
|
@ -86,11 +86,11 @@ struct DLL_LINKAGE TerrainTile
|
||||
EDiggingStatus getDiggingStatus(const bool excludeTop = true) const;
|
||||
bool hasFavorableWinds() const;
|
||||
|
||||
TerrainType * terType;
|
||||
const TerrainType * terType;
|
||||
ui8 terView;
|
||||
RiverType * riverType;
|
||||
const RiverType * riverType;
|
||||
ui8 riverDir;
|
||||
RoadType * roadType;
|
||||
const RoadType * roadType;
|
||||
ui8 roadDir;
|
||||
/// first two bits - how to rotate terrain graphic (next two - river graphic, next two - road);
|
||||
/// 7th bit - whether tile is coastal (allows disembarking if land or block movement if water); 8th bit - Favorable Winds effect
|
||||
|
@ -346,7 +346,7 @@ CDrawTerrainOperation::ValidationResult CDrawTerrainOperation::validateTerrainVi
|
||||
int cy = pos.y + (i / 3) - 1;
|
||||
int3 currentPos(cx, cy, pos.z);
|
||||
bool isAlien = false;
|
||||
TerrainType * terType = nullptr;
|
||||
const TerrainType * terType = nullptr;
|
||||
if(!map->isInTheMap(currentPos))
|
||||
{
|
||||
// position is not in the map, so take the ter type from the neighbor tile
|
||||
|
Loading…
x
Reference in New Issue
Block a user