Skip to content

Instantly share code, notes, and snippets.

@ronyx69
Last active December 4, 2020 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronyx69/89d48923dbd020c2109686487dcc4d9c to your computer and use it in GitHub Desktop.
Save ronyx69/89d48923dbd020c2109686487dcc4d9c to your computer and use it in GitHub Desktop.
Sets the amount, type, flags, direction and position of parking spaces for props. Not tested or researched.
// m_parkingSpaces
// Sets the amount, type, flags, direction and position of parking spaces for props.
// I haven't tested or researched this at all.
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
var parkingSpaces = 1; // amount of parking spaces
PropInfo.ParkingSpace[] temp = new PropInfo.ParkingSpace[parkingSpaces];
// parking direction and position
temp[0].m_type = VehicleInfo.VehicleType.Car;
temp[0].m_direction = new Vector3(0, 0, 1);
temp[0].m_position = new Vector3(0.0f, 0.0f, 0.0f);
temp[0].m_size = new Vector3(3.0f, 2.0f, 6.0f); // not sure what this should be, or what it affects
//temp[0].m_flags = PropInfo.ParkingFlags.RequireElectric; // if you want electric only
// if you want want another one (increase amount on top as well)
//temp[1].m_type = VehicleType.Car;
//temp[1].m_direction = new Vector3(0, 0, 1);
//temp[1].m_position = new Vector3(0.0f, 0.0f, 0.0f);
//temp[1].m_size = new Vector3(3.0f, 2.0f, 6.0f); // not sure what this should be, or what it affects
//temp[1].m_flags = PropInfo.ParkingFlags.RequireElectric; // if you want electric only
asset.m_parkingSpaces = temp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment