> For the complete documentation index, see [llms.txt](https://swonh.gitbook.io/sdmp-user-manual-eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swonh.gitbook.io/sdmp-user-manual-eng/routing-module/user-controls/vehiclecontrol.md).

# VehicleControl

Controls for functions related to vehicle

### GetLoadableResources

```csharp
public override List<Resource> GetLoadableResources(Product product, Vehicle vehicle)
```

#### Definition

Returns a list of resources in the corresponding vehicle that can handle the product.

#### Parameters

<table><thead><tr><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td>Product</td><td>The product object.</td></tr><tr><td>Vehicle</td><td>The vehicle object.</td></tr></tbody></table>

#### Return

<table><thead><tr><th width="183">Type</th><th width="311">Description</th><th>Default</th></tr></thead><tbody><tr><td>List&#x3C;Resource></td><td>A list of resources that can be processed.</td><td><a href="#default-logic">Default Logic</a></td></tr></tbody></table>

#### Example (Default Logic)

```csharp
public override List<Resource> GetLoadableResources(Product product, Vehicle vehicle)
{
    List<Resource> list = new List<Resource>();

    foreach (KeyValuePair<string, Resource> item in vehicle.Resources)
    {
        Resource res = item.Value;

        if (res.Product.ID != product.ID)
            continue;

        list.Add(res);
    }

    return list;
}
```
