mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 09:22:42 +01:00
Fix #10032: Capacities of articulated vehicles in build window
See also: #9954
This commit is contained in:
committed by
Michael Lutz
parent
6d1331ebcd
commit
bd6a95c6b9
@@ -94,7 +94,7 @@
|
||||
if (!ScriptEngine::IsBuildable(engine_id)) return -1;
|
||||
if (!ScriptCargo::IsValidCargo(cargo)) return -1;
|
||||
|
||||
auto [res, veh_id, refit_capacity, refit_mail] = ::Command<CMD_BUILD_VEHICLE>::Do(DC_QUERY_COST, depot, engine_id, true, cargo, INVALID_CLIENT_ID);
|
||||
auto [res, veh_id, refit_capacity, refit_mail, cargo_capacities] = ::Command<CMD_BUILD_VEHICLE>::Do(DC_QUERY_COST, depot, engine_id, true, cargo, INVALID_CLIENT_ID);
|
||||
return res.Succeeded() ? refit_capacity : -1;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
if (!IsValidVehicle(vehicle_id)) return -1;
|
||||
if (!ScriptCargo::IsValidCargo(cargo)) return -1;
|
||||
|
||||
auto [res, refit_capacity, refit_mail] = ::Command<CMD_REFIT_VEHICLE>::Do(DC_QUERY_COST, vehicle_id, cargo, 0, false, false, 0);
|
||||
auto [res, refit_capacity, refit_mail, cargo_capacities] = ::Command<CMD_REFIT_VEHICLE>::Do(DC_QUERY_COST, vehicle_id, cargo, 0, false, false, 0);
|
||||
return res.Succeeded() ? refit_capacity : -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user