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 committed Sep 26, 2021
1 parent e73d678 commit d06db8a
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 d06db8a

Please sign in to comment.