|
1 | 1 | #include "resource_settings.h" |
2 | 2 |
|
3 | 3 | #include "building/count.h" |
| 4 | +#include "city/buildings.h" |
4 | 5 | #include "city/resource.h" |
5 | 6 | #include "core/calc.h" |
6 | 7 | #include "core/image_group.h" |
@@ -101,7 +102,18 @@ static void draw_foreground(void) |
101 | 102 | lang_text_draw(54, 13, 98 + width, 172, FONT_NORMAL_BLACK); |
102 | 103 | } |
103 | 104 | } |
104 | | - } else if (data.resource != RESOURCE_MEAT || !scenario_building_allowed(BUILDING_WHARF)) { |
| 105 | + } else if (data.resource == RESOURCE_MEAT && scenario_building_allowed(BUILDING_WHARF)) { |
| 106 | + int active_wharfs = city_buildings_working_wharfs() - city_buildings_shipyard_boats_requested(); |
| 107 | + if (active_wharfs > 0) { |
| 108 | + // some wharfs are working and have boats |
| 109 | + int width = text_draw_number(active_wharfs, '@', " ", 98, 172, FONT_NORMAL_BLACK); |
| 110 | + if (active_wharfs == 1) { |
| 111 | + lang_text_draw(54, 8, 98 + width, 172, FONT_NORMAL_BLACK); |
| 112 | + } else { |
| 113 | + lang_text_draw(54, 9, 98 + width, 172, FONT_NORMAL_BLACK); |
| 114 | + } |
| 115 | + } |
| 116 | + } else { |
105 | 117 | // we cannot produce this good |
106 | 118 | lang_text_draw(54, 25, 98, 172, FONT_NORMAL_BLACK); |
107 | 119 | } |
|
0 commit comments