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

Function CcAddVehicleNewGroup

src/group_gui.cpp:1295–1301  ·  view source on GitHub ↗

* Open rename window after adding a vehicle to a new group via drag and drop. * @param result Did command succeed? * @param new_group ID of the created group. */

Source from the content-addressed store, hash-verified

1293 * @param new_group ID of the created group.
1294 */
1295void CcAddVehicleNewGroup(Commands, const CommandCost &result, GroupID new_group, GroupID, VehicleID, bool, const VehicleListIdentifier &)
1296{
1297 if (result.Failed()) return;
1298
1299 const Group *g = Group::Get(new_group);
1300 CcCreateGroup(new_group, g->vehicle_type);
1301}
1302
1303/**
1304 * Removes the highlight of a vehicle in a group window

Callers

nothing calls this directly

Calls 2

CcCreateGroupFunction · 0.85
FailedMethod · 0.80

Tested by

no test coverage detected