Merge branch 'master' into jgrpp
# Conflicts: # regression/regression/result.txt # src/aircraft_cmd.cpp # src/airport_gui.cpp # src/articulated_vehicles.cpp # src/console_cmds.cpp # src/date_gui.cpp # src/engine.cpp # src/genworld_gui.cpp # src/gfx_layout_fallback.cpp # src/group_gui.cpp # src/hotkeys.cpp # src/network/core/tcp_connect.cpp # src/network/core/tcp_listen.h # src/newgrf.cpp # src/newgrf.h # src/newgrf_engine.cpp # src/newgrf_gui.cpp # src/newgrf_station.cpp # src/openttd.cpp # src/order_gui.cpp # src/os/macosx/osx_main.cpp # src/pathfinder/yapf/yapf_node_rail.hpp # src/rail_gui.cpp # src/saveload/afterload.cpp # src/saveload/cargopacket_sl.cpp # src/saveload/linkgraph_sl.cpp # src/saveload/station_sl.cpp # src/script/api/script_industrytype.cpp # src/settings.cpp # src/settings_gui.cpp # src/settings_table.cpp # src/settingsgen/settingsgen.cpp # src/station.cpp # src/station_cmd.cpp # src/strings.cpp # src/timer/timer_game_calendar.cpp # src/timer/timer_game_calendar.h # src/timer/timer_manager.h # src/timer/timer_window.cpp # src/timetable_cmd.cpp # src/toolbar_gui.cpp # src/town_cmd.cpp # src/town_gui.cpp # src/train_gui.cpp # src/vehicle_cmd.h # src/vehicle_gui.cpp # src/viewport.cpp # src/widgets/dropdown.cpp # src/window_func.h # src/window_gui.h
This commit is contained in:
@@ -296,7 +296,7 @@ struct DepotWindow : Window {
|
||||
OrderBackup::Reset();
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
CloseWindowById(WC_BUILD_VEHICLE, this->window_number);
|
||||
CloseWindowById(GetWindowClassForVehicleType(this->type), VehicleListIdentifier(VL_DEPOT_LIST, this->type, this->owner, this->GetDepotIndex()).Pack(), false);
|
||||
@@ -812,7 +812,7 @@ struct DepotWindow : Window {
|
||||
|
||||
case WID_D_SELL_ALL:
|
||||
/* Only open the confirmation window if there are anything to sell */
|
||||
if (this->vehicle_list.size() != 0 || this->wagon_list.size() != 0) {
|
||||
if (!this->vehicle_list.empty() || !this->wagon_list.empty()) {
|
||||
SetDParam(0, this->type);
|
||||
SetDParam(1, this->GetDepotIndex());
|
||||
ShowQuery(
|
||||
@@ -877,7 +877,8 @@ struct DepotWindow : Window {
|
||||
/* Build tooltipstring */
|
||||
std::string details;
|
||||
|
||||
for (CargoID cargo_type = 0; cargo_type < NUM_CARGO; cargo_type++) {
|
||||
for (const CargoSpec *cs : _sorted_cargo_specs) {
|
||||
CargoID cargo_type = cs->Index();
|
||||
if (capacity[cargo_type] == 0) continue;
|
||||
|
||||
SetDParam(0, cargo_type); // {CARGO} #1
|
||||
|
Reference in New Issue
Block a user