src/economy.cpp
changeset 8012 51288087bccd
parent 8011 8e95362021d5
child 8016 35b14d118dd3
equal deleted inserted replaced
8011:8e95362021d5 8012:51288087bccd
    68 	{
    68 	{
    69 		Station *st;
    69 		Station *st;
    70 		uint num = 0;
    70 		uint num = 0;
    71 
    71 
    72 		FOR_ALL_STATIONS(st) {
    72 		FOR_ALL_STATIONS(st) {
    73 			if (st->owner == owner) num += CountBitsSet(st->facilities);
    73 			if (st->owner == owner) num += COUNTBITS(st->facilities);
    74 		}
    74 		}
    75 
    75 
    76 		value.AddCost(num * _price.station_value * 25);
    76 		value.AddCost(num * _price.station_value * 25);
    77 	}
    77 	}
    78 
    78 
   144 	{
   144 	{
   145 		uint num = 0;
   145 		uint num = 0;
   146 		const Station* st;
   146 		const Station* st;
   147 
   147 
   148 		FOR_ALL_STATIONS(st) {
   148 		FOR_ALL_STATIONS(st) {
   149 			if (st->owner == owner) num += CountBitsSet(st->facilities);
   149 			if (st->owner == owner) num += COUNTBITS(st->facilities);
   150 		}
   150 		}
   151 		_score_part[owner][SCORE_STATIONS] = num;
   151 		_score_part[owner][SCORE_STATIONS] = num;
   152 	}
   152 	}
   153 
   153 
   154 /* Generate statistics depending on recent income statistics */
   154 /* Generate statistics depending on recent income statistics */
   189 		}
   189 		}
   190 	}
   190 	}
   191 
   191 
   192 /* Generate score for variety of cargo */
   192 /* Generate score for variety of cargo */
   193 	{
   193 	{
   194 		uint num = CountBitsSet(p->cargo_types);
   194 		uint num = COUNTBITS(p->cargo_types);
   195 		_score_part[owner][SCORE_CARGO] = num;
   195 		_score_part[owner][SCORE_CARGO] = num;
   196 		if (update) p->cargo_types = 0;
   196 		if (update) p->cargo_types = 0;
   197 	}
   197 	}
   198 
   198 
   199 /* Generate score for player money */
   199 /* Generate score for player money */