Skip to content

Commit

Permalink
Fix docks not showing all trade routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Keriew committed Mar 16, 2024
1 parent e7a926a commit b256ab6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/window/building/distribution.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "core/string.h"
#include "empire/city.h"
#include "empire/object.h"
#include "empire/trade_route.h"
#include "figure/figure.h"
#include "graphics/generic_button.h"
#include "graphics/image.h"
Expand Down Expand Up @@ -234,7 +235,7 @@ static void draw_granary_permissions_buttons(int x, int y, int buttons)
static void init_dock_permission_buttons(void)
{
dock_distribution_permissions_buttons_count = 0;
for (int route_id = 0; route_id < 20; route_id++) {
for (int route_id = 0; route_id < trade_route_count(); route_id++) {
int city_id = -1;
if (is_sea_trade_route(route_id) && empire_city_is_trade_route_open(route_id)) {
city_id = empire_city_get_for_trade_route(route_id);
Expand Down

0 comments on commit b256ab6

Please sign in to comment.