Skip to content

Commit

Permalink
Only show the occupied icon for occupied cities
Browse files Browse the repository at this point in the history
When using citybar style "simple", the "city is occupied" icon was always
shown. Only show it when the city is actually occupied.

Closes longturn#437.
  • Loading branch information
lmoureaux authored and psampathkumar committed Nov 14, 2021
1 parent 30c729c commit 27fa8b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/tilespec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4908,7 +4908,8 @@ fill_sprite_array(struct tileset *t, enum mapview_layer layer,
FULL_TILE_Y_OFFSET + t->city_offset_y);
}
}
if (!citybar_painter::current()->has_units()) {
if (!citybar_painter::current()->has_units()
&& pcity->client.occupied) {
sprs.emplace_back(t,
get_city_sprite(t->sprites.city.occupied, pcity),
true, FULL_TILE_X_OFFSET + t->occupied_offset_x,
Expand Down

0 comments on commit 27fa8b9

Please sign in to comment.