Merge branch 'master' into jgrpp

# Conflicts:
#	src/station_gui.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
This commit is contained in:
Jonathan G Rennison
2024-02-28 20:08:33 +00:00
20 changed files with 288 additions and 276 deletions

View File

@@ -742,9 +742,7 @@ CommandCost CmdMassStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32_
BuildDepotVehicleList(vli.vtype, tile, &list, nullptr);
}
for (uint i = 0; i < list.size(); i++) {
const Vehicle *v = list[i];
for (const Vehicle *v : list) {
if (!!(v->vehstatus & VS_STOPPED) != do_start) continue;
if (!vehicle_list_window && !v->IsChainInDepot()) continue;
@@ -782,8 +780,8 @@ CommandCost CmdDepotSellAllVehicles(TileIndex tile, DoCommandFlag flags, uint32_
CommandCost last_error = CMD_ERROR;
bool had_success = false;
for (uint i = 0; i < list.size(); i++) {
CommandCost ret = DoCommand(tile, list[i]->index | (1 << 20), 0, flags, sell_command);
for (const Vehicle *v : list) {
CommandCost ret = DoCommand(tile, v->index | (1 << 20), 0, flags, sell_command);
if (ret.Succeeded()) {
cost.AddCost(ret);
had_success = true;
@@ -816,9 +814,7 @@ CommandCost CmdDepotMassAutoReplace(TileIndex tile, DoCommandFlag flags, uint32_
/* Get the list of vehicles in the depot */
BuildDepotVehicleList(vehicle_type, tile, &list, &list, true);
for (uint i = 0; i < list.size(); i++) {
const Vehicle *v = list[i];
for (const Vehicle *v : list) {
/* Ensure that the vehicle completely in the depot */
if (!v->IsChainInDepot()) continue;