Update to 1.11.2

This commit is contained in:
dP
2021-05-03 22:10:57 +03:00
parent 5881c752f5
commit ac7d3eba75
103 changed files with 1631 additions and 942 deletions
+9 -5
View File
@@ -281,13 +281,17 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout
if (this->tile == INVALID_TILE) break;
return GetClosestIndustry(this->tile, MapNewGRFIndustryType(parameter, indspec->grf_prop.grffile->grfid), this->industry);
/* Get town zone and Manhattan distance of closest town */
case 0x65:
case 0x65: {
if (this->tile == INVALID_TILE) break;
return GetTownRadiusGroup(this->industry->town, this->tile) << 16 | std::min(DistanceManhattan(this->tile, this->industry->town->xy), 0xFFFFu);
/* Get square of Euclidian distance of closes town */
case 0x66:
TileIndex tile = GetNearbyTile(parameter, this->tile, true);
return GetTownRadiusGroup(this->industry->town, tile) << 16 | std::min(DistanceManhattan(tile, this->industry->town->xy), 0xFFFFu);
}
/* Get square of Euclidian distance of closest town */
case 0x66: {
if (this->tile == INVALID_TILE) break;
return GetTownRadiusGroup(this->industry->town, this->tile) << 16 | std::min(DistanceSquare(this->tile, this->industry->town->xy), 0xFFFFu);
TileIndex tile = GetNearbyTile(parameter, this->tile, true);
return DistanceSquare(tile, this->industry->town->xy);
}
/* Count of industry, distance of closest instance
* 68 is the same as 67, but with a filtering on selected layout */