src/town_gui.cpp
branchgamebalance
changeset 9903 dc85aaa556ae
parent 9898 324dad59eb35
child 9908 0fa543611bbe
equal deleted inserted replaced
9902:ed8f92929297 9903:dc85aaa556ae
    56 				SETBIT(avail_buttons, 7); // Allow bribing
    56 				SETBIT(avail_buttons, 7); // Allow bribing
    57 			}
    57 			}
    58 		}
    58 		}
    59 
    59 
    60 		// Things worth more than this are not shown
    60 		// Things worth more than this are not shown
    61 		avail = GetPlayer(pid)->player_money + _price.station_value * 200;
    61 		avail = GetPlayer(pid)->player_money + _eco->GetPrice(CEconomy::STATION_VALUE) * 200;
    62 		ref = _price.build_industry >> 8;
    62 		ref = _eco->GetPrice(CEconomy::BUILD_INDUSTRY) >> 8;
    63 
    63 
    64 		for (i = 0; i != lengthof(_town_action_costs); i++, avail_buttons >>= 1) {
    64 		for (i = 0; i != lengthof(_town_action_costs); i++, avail_buttons >>= 1) {
    65 			if (HASBIT(avail_buttons, 0) && avail >= _town_action_costs[i] * ref) {
    65 			if (HASBIT(avail_buttons, 0) && avail >= _town_action_costs[i] * ref) {
    66 				SETBIT(buttons, i);
    66 				SETBIT(buttons, i);
    67 				num++;
    67 				num++;
   171 
   171 
   172 		{
   172 		{
   173 			int i = WP(w,def_d).data_1;
   173 			int i = WP(w,def_d).data_1;
   174 
   174 
   175 			if (i != -1) {
   175 			if (i != -1) {
   176 				SetDParam(1, (_price.build_industry >> 8) * _town_action_costs[i]);
   176 				SetDParam(1, (_eco->GetPrice(CEconomy::BUILD_INDUSTRY) >> 8) * _town_action_costs[i]);
   177 				SetDParam(0, STR_2046_SMALL_ADVERTISING_CAMPAIGN + i);
   177 				SetDParam(0, STR_2046_SMALL_ADVERTISING_CAMPAIGN + i);
   178 				DrawStringMultiLine(2, 159, STR_204D_INITIATE_A_SMALL_LOCAL + i, 313);
   178 				DrawStringMultiLine(2, 159, STR_204D_INITIATE_A_SMALL_LOCAL + i, 313);
   179 			}
   179 			}
   180 		}
   180 		}
   181 
   181