Is there any convenient way to get the part for a given partname in lua? Something like core_vehicle_magic.getPartNameAtSlot('wheel_F_5') I'm building that explores, displays, and lets you configure car parts, specifically wheels and tires. Right now it looks through the whole parts config to find the suspension, and from there goes to hubs, wheels and tires. I've run into several issues by doing this from the parts config - since default parts can be omitted from the part config, the key may not be in the config. For instance if you load the default Bruckel Nine and do vehData = core_vehicle_manager.getVehicleData(be:getPlayerVehicle(0):getID()) mySuspensionName = vehData.config.parts.nine_suspension_F Then mySuspensionName will just be nil, even though the car does of course have its suspension in this slot. Even if you get the default parts config, the Nine still doesn't explicitly mention a suspension
This works. Code: vehData = core_vehicle_manager.getVehicleData(be:getPlayerVehicle(0):getID()) mySuspensionName = vehData.chosenParts.nine_suspension_F