Storage - NeisesMike/VehicleFramework GitHub Wiki
There are two types of storage: innate and modular.
Innate storage is an intrinsic part of your vehicle. Every copy of your vehicle has this storage space. It can't normally be removed, and it doesn't need to be added.
Modular storage is only accessible to the player by way of a storage module upgrade.
Overview
ModVehicle has these two fields:
public virtual List<VehicleParts.VehicleStorage> InnateStorages => new List<VehicleParts.VehicleStorage>();
public virtual List<VehicleParts.VehicleStorage> ModularStorages => new List<VehicleParts.VehicleStorage>();
Here is the definition of the VehicleStorage struct:
public struct VehicleStorage
{
public GameObject Container;
public int Height;
public int Width;
}
Container
is the actual object you'll click on to access this container. Be sure this GameObject has a collider!
Height
and Width
describe the dimensions of the container. That is, you'll be able to store Height*Width number of unit-sized items in this container.