Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[Suggestion] Default Sub Parts

DrprofLuigi opened this issue ยท 2 comments

commented

A defaultSubParts list on the part definition that overrides the subParts on the defaultPart.

For example:

		{
			"pos": [1.125, 0, 0],
			"rot": [0, 0, 0],
			"types": ["ground_wheel"],
			"defaultPart": "unuparts:unuparts_part_unu_wheel_standard",
			"defaultSubParts": ["unuparts:unuparts_part_unu_hubcap_standard_dish", ""],
			"toneIndex": 1,
			"minValue": 0.8,
			"maxValue": 0.875,
			"applyAfter": "$Axle2",
			"linkedParts" : [12]
		}

unuparts:unuparts_part_unu_wheel_standard Has two subPart slots. This defaultSubParts list will override those two slots to have the default parts of a dish hubcap, and empty.

This would be great for things like modular lightbars and wheels because you could define default parts from the vehicle without needing a bunch of basically identical parts (like the 'UNU Standard Wheel' and 'UNU Turbine wheel' which are identical save for the default hubcap).

This would also be useful for things like Blaze's wheels where he could define a default rim from the vehicle.

commented

I'm tepid on how to do this. Trying to "pass down" inputs to parts is very nasty. I'm going to mull on this for a while while I do other things.

commented

Added something that will allow for this in 22.3.0. Rather than default parts defined at the vehicle-level, you can define multiple default parts at the part level, with each default part being triggered by a variable. If that variable is true, then that default part will be used. In conjunction, definitions now have constants, which allows for "super" or "crappy" vehicle variants with different engines, and different wheel hubcaps.