Don't show production of the hidden industries on a minimap

This commit is contained in:
dP
2025-12-14 17:24:27 +05:00
parent fe6e895001
commit d95e758bc2

View File

@@ -1030,6 +1030,7 @@ void SmallMapWindow::DrawIndustryProduction(const DrawPixelInfo *dpi) const
[this] (auto &e) { [this] (auto &e) {
auto ind = Industry::GetIfValid(e.index); auto ind = Industry::GetIfValid(e.index);
if (ind == nullptr) return; if (ind == nullptr) return;
if (!_legend_from_industries[_industry_to_list_pos[ind->type]].show_on_map) return;
auto pt = this->TileToPixel( auto pt = this->TileToPixel(
TileX(ind->location.tile) * TILE_SIZE + ind->location.w * TILE_SIZE / 2, TileX(ind->location.tile) * TILE_SIZE + ind->location.w * TILE_SIZE / 2,
TileY(ind->location.tile) * TILE_SIZE + ind->location.h * TILE_SIZE / 2 TileY(ind->location.tile) * TILE_SIZE + ind->location.h * TILE_SIZE / 2