Merge branch 'master' into jgrpp
# Conflicts: # src/station_cmd.cpp
This commit is contained in:
@@ -3620,27 +3620,25 @@ static void UpdateStationRating(Station *st)
|
||||
}
|
||||
}
|
||||
if (ge->last_vehicle_type == VEH_SHIP) waittime >>= 2;
|
||||
(waittime > 21) ||
|
||||
(rating += 25, waittime > 12) ||
|
||||
(rating += 25, waittime > 6) ||
|
||||
(rating += 45, waittime > 3) ||
|
||||
(rating += 35, true);
|
||||
if (waittime <= 21) rating += 25;
|
||||
if (waittime <= 12) rating += 25;
|
||||
if (waittime <= 6) rating += 45;
|
||||
if (waittime <= 3) rating += 35;
|
||||
|
||||
(rating -= 90, ge->max_waiting_cargo > 1500) ||
|
||||
(rating += 55, ge->max_waiting_cargo > 1000) ||
|
||||
(rating += 35, ge->max_waiting_cargo > 600) ||
|
||||
(rating += 10, ge->max_waiting_cargo > 300) ||
|
||||
(rating += 20, ge->max_waiting_cargo > 100) ||
|
||||
(rating += 10, true);
|
||||
rating -= 90;
|
||||
if (ge->max_waiting_cargo <= 1500) rating += 55;
|
||||
if (ge->max_waiting_cargo <= 1000) rating += 35;
|
||||
if (ge->max_waiting_cargo <= 600) rating += 10;
|
||||
if (ge->max_waiting_cargo <= 300) rating += 20;
|
||||
if (ge->max_waiting_cargo <= 100) rating += 10;
|
||||
}
|
||||
|
||||
if (Company::IsValidID(st->owner) && HasBit(st->town->statues, st->owner)) rating += 26;
|
||||
|
||||
byte age = ge->last_age;
|
||||
(age >= 3) ||
|
||||
(rating += 10, age >= 2) ||
|
||||
(rating += 10, age >= 1) ||
|
||||
(rating += 13, true);
|
||||
if (age < 3) rating += 10;
|
||||
if (age < 2) rating += 10;
|
||||
if (age < 1) rating += 13;
|
||||
|
||||
{
|
||||
int or_ = ge->rating; // old rating
|
||||
@@ -4045,16 +4043,16 @@ static void AddNearbyStationsByCatchment(TileIndex tile, StationList *stations,
|
||||
* Find all stations around a rectangular producer (industry, house, headquarter, ...)
|
||||
*
|
||||
* @param location The location/area of the producer
|
||||
* @param stations The list to store the stations in
|
||||
* @param[out] stations The list to store the stations in
|
||||
* @param use_nearby Use nearby station list of industry/town associated with location.tile
|
||||
*/
|
||||
void FindStationsAroundTiles(const TileArea &location, StationList *stations, bool use_nearby)
|
||||
void FindStationsAroundTiles(const TileArea &location, StationList * const stations, bool use_nearby)
|
||||
{
|
||||
if (use_nearby) {
|
||||
/* Industries and towns maintain a list of nearby stations */
|
||||
if (IsTileType(location.tile, MP_INDUSTRY)) {
|
||||
/* Industry nearby stations are already filtered by catchment. */
|
||||
stations = &Industry::GetByTile(location.tile)->stations_near;
|
||||
*stations = Industry::GetByTile(location.tile)->stations_near;
|
||||
return;
|
||||
} else if (IsTileType(location.tile, MP_HOUSE)) {
|
||||
/* Town nearby stations need to be filtered per tile. */
|
||||
|
Reference in New Issue
Block a user