src/town_gui.cpp
changeset 7928 63e18de69e50
parent 7824 5a63d41b59ea
child 7954 57b51c69c072
equal deleted inserted replaced
7927:3a3289a049f9 7928:63e18de69e50
    93 			/* Is the player not able to buy exclusive rights ? */
    93 			/* Is the player not able to buy exclusive rights ? */
    94 			if (cur == TACT_BUY_RIGHTS && !_patches.exclusive_rights)
    94 			if (cur == TACT_BUY_RIGHTS && !_patches.exclusive_rights)
    95 				continue;
    95 				continue;
    96 
    96 
    97 			/* Is the player not able to build a statue ? */
    97 			/* Is the player not able to build a statue ? */
    98 			if (cur == TACT_BUILD_STATUE && HASBIT(t->statues, pid))
    98 			if (cur == TACT_BUILD_STATUE && HasBit(t->statues, pid))
    99 				continue;
    99 				continue;
   100 
   100 
   101 			if (avail >= _town_action_costs[i] * ref) {
   101 			if (avail >= _town_action_costs[i] * ref) {
   102 				buttons |= cur;
   102 				buttons |= cur;
   103 				num++;
   103 				num++;
   130 		int numact;
   130 		int numact;
   131 		uint buttons = GetMaskOfTownActions(&numact, _local_player, t);
   131 		uint buttons = GetMaskOfTownActions(&numact, _local_player, t);
   132 
   132 
   133 		SetVScrollCount(w, numact + 1);
   133 		SetVScrollCount(w, numact + 1);
   134 
   134 
   135 		if (WP(w,def_d).data_1 != -1 && !HASBIT(buttons, WP(w,def_d).data_1))
   135 		if (WP(w,def_d).data_1 != -1 && !HasBit(buttons, WP(w,def_d).data_1))
   136 			WP(w,def_d).data_1 = -1;
   136 			WP(w,def_d).data_1 = -1;
   137 
   137 
   138 		SetWindowWidgetDisabledState(w, 6, WP(w, def_d).data_1 == -1);
   138 		SetWindowWidgetDisabledState(w, 6, WP(w, def_d).data_1 == -1);
   139 
   139 
   140 		{
   140 		{
   149 			DrawString(2, 15, STR_2023_TRANSPORT_COMPANY_RATINGS, TC_FROMSTRING);
   149 			DrawString(2, 15, STR_2023_TRANSPORT_COMPANY_RATINGS, TC_FROMSTRING);
   150 
   150 
   151 			/* Draw list of players */
   151 			/* Draw list of players */
   152 			y = 25;
   152 			y = 25;
   153 			FOR_ALL_PLAYERS(p) {
   153 			FOR_ALL_PLAYERS(p) {
   154 				if (p->is_active && (HASBIT(t->have_ratings, p->index) || t->exclusivity == p->index)) {
   154 				if (p->is_active && (HasBit(t->have_ratings, p->index) || t->exclusivity == p->index)) {
   155 					DrawPlayerIcon(p->index, 2, y);
   155 					DrawPlayerIcon(p->index, 2, y);
   156 
   156 
   157 					SetDParam(0, p->index);
   157 					SetDParam(0, p->index);
   158 					SetDParam(1, p->index);
   158 					SetDParam(1, p->index);
   159 
   159