Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[Feature] Picky Parts

DrprofLuigi opened this issue · 6 comments

commented

A function for parts that if true, can only be used if the part is specifically listed as a customType

i.e. My treads that are technically wheels won't be able to go on regular vehicles.

commented

Pretty sure this already exists. If it's a bug, feel free to re-open.

Per the handbook:

Section 7.0.0 Part JSON
customType – This parameter is optional and should only be used for parts that you need in specific places. This will prevent this part from going into any part definition that has customTypes listed if it does not match those customTypes. For more detail, see the customTypes parameter information in section 6.5.0 Parts.

6.5.0 Parts
customTypes – This parameter is optional. If included, this slot will ONLY accept parts whose customType parameter matches one of the items in this list. If the part's customType is not defined, it will be invalid and cannot be added. Useful for pack creators who don't want their vehicles to play nice with other content packs, or for part slots with a “custom” type that really should only accept a single type of customType part (such as a “custom”-typed part that is a pickup bed in a pack that also has a pickup topper).

commented

I think what he's saying is that the Scout accepts any wheel, and his track parts are wheels, but the Scout shouldn't be able to take them, but he can't fix that.

commented

Hm, I need to re-visit the code, then. I was pretty sure if you defined a part with a customType it would only go into slots that had the corresponding custonType parameter.

commented

Can confirm that while this is not a bug as it conforms to the manual, it is behavior that should exist. Marking as both a bug and enhancement and re-opening.

commented

Removing enhancement tag as from what I can tell this feature DOES exist, but SHOULDN'T exist if the handbook is to be believed. @DrprofLuigi, can you test if you can add a customType to your halftrack assembly and try to add it to your vehicles and other vehicles?

commented

Can confirm this is a bug. Will fix in an upcoming release.