﻿{
	"definitions": [//Dyes: Black=0 Red =1 Green=2 Brown=3 Blue=4 Purple=5 UNU=6 Silver=7 Grey=8 Pink=9 Lime=10 Yellow=11 Light Blue=12 Magenta=13 Orange=14 White=15
		{
			"name": "§3UNU Contractor 4WD Suspension - Front",
			"subName": "",
			"extraMaterialLists": [[],[]]
			//"extraMaterialLists": [[],[]]
		}
	],

	"general": {
		"description": "Vehicle: UNU Contractor\nPart Slot: Front Suspension",
		"stackSize": 1,
		//"materialLists": [["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:0:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:0:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:0:1", "immersiveengineering:material:2:2"],["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:1", "immersiveengineering:stick_steel:2"]]
		"materialLists": [["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:0:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:0:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:0:1", "minecraft:iron_ingot:0:2"],["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:1", "minecraft:iron_ingot:2"]]
	},	
	
	"generic": {
		"type": "generic_bodypart_unu_suspension_contractor_front",
		"useVehicleTexture": true,
		"mustBeRemovedByScrewdriver": true,
		"width": 0.25,
		"height": 0.25
	},
	
	"subParts": [
		{
			"pos": [-1.1875, 0, 0],
			"turnsWithSteer": true,
			"types": ["ground_wheel"],
			"defaultPart": "unuparts:unuparts_part_unu_wheel_standard",
			"conditionalDefaultParts": {
				"wheel_standard"="unuparts:unuparts_part_unu_wheel_standard",
				"wheel_standard_wire"="unuparts:unuparts_part_unu_wheel_standard_wire",
				"wheel_standard_wireknockoff"="unuparts:unuparts_part_unu_wheel_standard_wireknockoff",
				"wheel_standard_offroad"="unuparts:unuparts_part_unu_wheel_standard_offroad"
			},
			"toneIndex": 1,
			"minValue": 0.75,
			"maxValue": 0.875,
			"applyAfter": "$RightFront"
		},
		{
			"pos": [1.1875, 0, 0],
			"isMirrored": true,
			"turnsWithSteer": true,
			"types": ["ground_wheel"],
			"defaultPart": "unuparts:unuparts_part_unu_wheel_standard",
			"conditionalDefaultParts": {
				"wheel_standard"="unuparts:unuparts_part_unu_wheel_standard",
				"wheel_standard_wire"="unuparts:unuparts_part_unu_wheel_standard_wire",
				"wheel_standard_wireknockoff"="unuparts:unuparts_part_unu_wheel_standard_wireknockoff",
				"wheel_standard_offroad"="unuparts:unuparts_part_unu_wheel_standard_offroad"
			},
			"toneIndex": 1,
			"minValue": 0.75,
			"maxValue": 0.875,
			"applyAfter": "$LeftFront"
		}
	],
	
	"collisionGroups": [
		{
			"collisions": [
				{	//Wheel 1
					"pos": [-1.1875, -0.125, 0],
					"width": 0.125,
					"height": 0.125
				}
			],
			"animations": [
				{
					"animationType": "visibility",
					"variable": "part_present_1",
					"clampMin": 0,
					"clampMax": 0
				}
			]
		},
		{
			"collisions": [
				{	//Wheel 2
					"pos": [1.1875, -0.125, 0],
					"width": 0.125,
					"height": 0.125
				}
			],
			"animations": [
				{
					"animationType": "visibility",
					"variable": "part_present_2",
					"clampMin": 0,
					"clampMax": 0
				}
			]
		}
	],

	"rendering": {
		"animatedObjects": [
			{
				"objectName": "$SuspensionFront",
				"animations": []
			},
			{
				"objectName": "$FrontDriveShaft",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightFront",
						"centerPoint": [-0.1875, 0.25, -0.9375],
						"axis" : [-2.2820, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftFront",
						"centerPoint": [-0.1875, 0.25, -0.9375],
						"axis" : [-1.3395, 0, 0]
					},
					{
						"animationType": "rotation",
						"centerPoint": [-0.1875, 0.25, -0.9375],
						"axis": [0.548688, 1.025453, -3.354111],
						"variable": "parent_engine_driveshaft_rotation_1"
					}
				]
			},
			{
				"objectName": "$Axle1_LeafSpring1",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [0.75, 0.125, -0.6875],
						"axis" : [-4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [0.75, 0.125, -0.6875],
						"axis" : [-0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle1_LeafSpring2",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [-0.75, 0.125, -0.6875],
						"axis" : [-4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [-0.75, 0.125, -0.6875],
						"axis" : [-0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle1_LeafSpring3",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [-0.75, 0.125, 0.6875],
						"axis" : [4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [-0.75, 0.125, 0.6875],
						"axis" : [0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle1_LeafSpring4",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [0.75, 0.125, 0.6875],
						"axis" : [4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [0.75, 0.125, 0.6875],
						"axis" : [0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle1_LeafSpringMountL",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "translation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0510, 0]
					},
					{
						"animationType" : "translation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0115, 0]
					}
				]
			},
			{
				"objectName": "$Axle1_LeafSpringMountR",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "translation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0510, 0]
					},
					{
						"animationType" : "translation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0115, 0]
					}
				]
			},
			{
				"objectName": "$Axle1",
				"applyAfter": "$SuspensionFront",
				"animations": [
					{
						"animationType" : "translation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.03125, 0]
					},
					{
						"animationType" : "translation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.03125, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0, -1.5074]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftFront",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0, 1.5074]
					}
				]
			},
			{
				"objectName": "$RightFront",
				"applyAfter": "$Axle1",
				"animations": [
					{
						"animationType": "rotation",
						"centerPoint": [-1.0625, 0, 0],
						"axis": [0, 1, 0],
						"variable": "steeringwheel"
					}
				]
			},
			{
				"objectName": "$RightFrontWheel",
				"applyAfter": "$RightFront",
				"animations": [
					{
						"animationType": "rotation",
						"centerPoint": [-1.1875, 0, 0],
						"axis": [-1, 0, 0],
						"variable": "ground_rotation_1"
					}
				]
			},
			{
				"objectName": "$LeftFront",
				"applyAfter": "$Axle1",
				"animations": [
					{
						"animationType": "rotation",
						"centerPoint": [1.0625, 0, 0],
						"axis": [0, 1, 0],
						"variable": "steeringwheel"
					}
				]
			},
			{
				"objectName": "$LeftFrontWheel",
				"applyAfter": "$LeftFront",
				"animations": [
					{
						"animationType": "rotation",
						"centerPoint": [1.1875, 0, 0],
						"axis": [1, 0, 0],
						"variable": "ground_rotation_2"
					}
				]
			}
		]
	},
	
	"constantValues": {
		"unuisbest": 1
	},
		
	"variableModifiers": [

		{
			"variable": "Forces_Pitch",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "Forces_Pitch",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "acceleration",
					"axis" : [0, 5, 0]
				},
				{
					"animationType" : "translation",
					"variable": "speed_scaled",
					"axis": [1, 0, 0],
					"clampMin": 0,
					"clampMax": 1
				},
				{
					"animationType": "translation",
					"variable": "Stiffness_Pitch",
					"axis": [-1, 0, 0],
					"offset": 1
				},
				{
					"animationType" : "inhibitor",
					"variable" : "transmission_reversed",
					"clampMin": 0,
					"clampMax": 0
				},
				{
					"animationType": "translation",
					"variable": "transmission_reversed",
					"axis": [-1, 0, 0]
				}
			]
		},
		{
			"variable": "Forces_Roll",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "Forces_Roll",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "rudder",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "speed_scaled",
					"axis" : [0.001, 0, 0]
				},
				{
					"animationType": "translation",
					"variable": "Stiffness_Roll",
					"axis": [-1, 0, 0],
					"offset": 1
				}
			]
		},
		{
			"variable": "Wheel_RightFront",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "ground_onground_1",
					"axis" : [0, 0, 2],
					"offset": -2
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Roll",
					"axis" : [0, 1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Pitch",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Enable_Suspension",
					"axis" : [1, 0, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Ride_Height_Front",
					"axis" : [0, -1, 0]
				}
			],
			"minValue": -4,
			"maxValue": 2
		},
		{
			"variable": "Wheel_LeftFront",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "ground_onground_2",
					"axis" : [0, 0, 2],
					"offset": -2
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Roll",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Pitch",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Enable_Suspension",
					"axis" : [1, 0, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Ride_Height_Front",
					"axis" : [0, -1, 0]
				}
			],
			"minValue": -4,
			"maxValue": 2
		}
	]
}
