MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CcBuildPrimaryVehicle

Function CcBuildPrimaryVehicle

src/vehicle_gui.cpp:3495–3501  ·  view source on GitHub ↗

* This is the Callback method after the construction attempt of a primary vehicle * @param result indicates completion (or not) of the operation * @param new_veh_id ID of the new vehicle. */

Source from the content-addressed store, hash-verified

3493 * @param new_veh_id ID of the new vehicle.
3494 */
3495void CcBuildPrimaryVehicle(Commands, const CommandCost &result, VehicleID new_veh_id, uint, uint16_t, CargoArray)
3496{
3497 if (result.Failed()) return;
3498
3499 const Vehicle *v = Vehicle::Get(new_veh_id);
3500 ShowVehicleViewWindow(v);
3501}
3502
3503/**
3504 * Get the width of a vehicle (part) in pixels.

Callers

nothing calls this directly

Calls 2

ShowVehicleViewWindowFunction · 0.85
FailedMethod · 0.80

Tested by

no test coverage detected