OnVehicleModulesAssign
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnVehicleModulesAssign( ModularCar instance, ItemModVehicleModule socketItemDefs )
{
Puts( "OnVehicleModulesAssign works!" );
}
Location
- ModularCar::SpawnPreassignedModules()
csharp
//---
if (this.spawnSettings.configurationOptions.IsNullOrEmpty<ModularCarPresetConfig>())
{
return;
}
ModularCarPresetConfig modularCarPresetConfig = this.spawnSettings.configurationOptions[UnityEngine.Random.Range(0, this.spawnSettings.configurationOptions.Length)];
if (Interface.CallHook("OnVehicleModulesAssign", this, modularCarPresetConfig.socketItemDefs) != null)
{
return;
}
for (int i = 0; i < modularCarPresetConfig.socketItemDefs.Length; i++)
{
//---