Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/codeql.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-windows.yml
#	src/map.cpp
#	src/music/midifile.hpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/pbs.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_text.cpp
#	src/ship_cmd.cpp
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_func.h
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/viewport.cpp
#	src/waypoint_cmd.cpp
This commit is contained in:
Jonathan G Rennison
2024-03-12 17:44:28 +00:00
87 changed files with 3648 additions and 2256 deletions

View File

@@ -240,7 +240,7 @@ int UpdateCompanyRatingAndValue(Company *c, bool update)
if (v->owner != owner) continue;
if (IsCompanyBuildableVehicleType(v->type) && v->IsPrimaryVehicle() && !HasBit(v->subtype, GVSF_VIRTUAL)) {
if (v->profit_last_year > 0) num++; // For the vehicle score only count profitable vehicles
if (v->age > 730) {
if (v->economy_age > VEHICLE_PROFIT_MIN_AGE) {
/* Find the vehicle with the lowest amount of profit */
if (min_profit_first || min_profit > v->profit_last_year) {
min_profit = v->profit_last_year;