﻿{
	"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 flatbed",
			"subName": "",		
			"extraMaterialLists": [[],[]]
			//"extraMaterialLists": [[],[]]
		}
	],

	"general": {
		"description": "Replaces the stock Pickup Bed",
		"stackSize": 1,
		//"materialLists": [["mts:unuparts.unuparts_crafting_unu_sheetmetal_panel_steel:0:4"],["mts:unuparts.unuparts_crafting_unu_sheetmetal_panel_steel:4"]]
		"materialLists": [["mts:unuparts.unuparts_crafting_unu_sheetmetal_panel_steel:0:4"],["mts:unuparts.unuparts_crafting_unu_sheetmetal_panel_steel:4"]]
	},	
	
	"generic": {
		"type": "generic_bodypart_unu_truckbed_contractor",
		"mustBeRemovedByScrewdriver": true,
		"width": 2,
		"height": 0.25
	},
	
	"subParts": [
		{
			"pos": [0, -0.125, -1],
			"rot": [0, 0, -90],
			"allowParentRemoval": true,
			"types": ["ground_wheel"],
			"defaultPart": "unuparts:unuparts_part_unu_wheel_standard",
			"conditionalDefaultParts": {
				"spare_wheel_standard"="unuparts:unuparts_part_unu_wheel_standard",
				"spare_wheel_standard_wire"="unuparts:unuparts_part_unu_wheel_standard_wire",
				"spare_wheel_standard_wireknockoff"="unuparts:unuparts_part_unu_wheel_standard_wireknockoff",
				"spare_wheel_standard_offroad"="unuparts:unuparts_part_unu_wheel_standard_offroad"
			},
			"toneIndex": 1,
			"isSpare": true,
			"minValue": 0.75,
			"maxValue": 0.875
		},
		{
			"pos": [0, 0.1875, -1.45313],
			"allowParentRemoval": true,
			"types": ["generic_bodypart_unu_tailgate_default", "generic_bodypart_unu_tailgate_steed_fleetside"],
			"defaultPart": "unuparts:unuparts_bodypart_unu_tailgate_default",
			"minValue": 0,
			"maxValue": 1,
			"applyAfter": "HingeTailgate"
		},
		{
			"pos": [0, 0.75, 1.4375],
			"allowParentRemoval": true,
			"types": ["generic_unuaccessory_stakeside", "generic_bodypart_unu_stakeside_contractor_fleetside"],
			"minValue": 0,
			"maxValue": 30,
			"interactableVariables": [["!part_present_4"], ["!part_present_5"], ["!part_present_6"], ["!part_present_7"], ["!part_present_8"], ["!part_present_9"], ["!part_present_10"], ["!part_present_11"], ["!part_present_12"], ["!part_present_13"], ["!part_present_14"], ["!part_present_15"], ["!part_present_16"], ["!part_present_17"], ["!part_present_18"]]
		},
		{
			"pos": [0.8125, 0.1875, 0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_12"], ["!part_present_17"]]
		},
		{
			"pos": [0, 0.1875, 0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_12"], ["!part_present_13"], ["!part_present_17"]]
		},
		{
			"pos": [-0.8125, 0.1875, 0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_13"], ["!part_present_17"]]
		},
		{
			"pos": [0.4375, 0.1875, 0],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_14"]]
		},
		{
			"pos": [-0.4375, 0.1875, 0],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_14"]]
		},
		{
			"pos": [0.8125, 0.1875, -0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_15"], ["!part_present_18"]]
		},
		{
			"pos": [0, 0.1875, -0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_15"], ["!part_present_16"], ["!part_present_18"]]
		},
		{
			"pos": [-0.8125, 0.1875, -0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate", "interactable_barrel"],
			"minValue": 0,
			"maxValue": 5,
			"interactableVariables": [["!part_present_16"], ["!part_present_18"]]
		},
		{
			"pos": [0.40625, 0.1875, 0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate_double", "interactable_barrel_double"],
			"minValue": 0,
			"maxValue": 6,
			"interactableVariables": [["!part_present_4"], ["!part_present_5"], ["!part_present_13"], ["!part_present_17"]]
		},
		{
			"pos": [-0.40625, 0.1875, 0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate_double", "interactable_barrel_double"],
			"minValue": 0,
			"maxValue": 6,
			"interactableVariables": [["!part_present_5"], ["!part_present_6"], ["!part_present_12"], ["!part_present_17"]]
		},
		{
			"pos": [0, 0.1875, 0],
			"rot": [0, -90, 0],
			"types": ["interactable_crate_double", "interactable_barrel_double"],
			"minValue": 0,
			"maxValue": 6,
			"interactableVariables": [["!part_present_7"], ["!part_present_8"], ["!part_present_18"]]
		},
		{
			"pos": [0.40625, 0.1875, -0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate_double", "interactable_barrel_double"],
			"minValue": 0,
			"maxValue": 6,
			"interactableVariables": [["!part_present_9"], ["!part_present_10"], ["!part_present_16"], ["!part_present_18"]]
		},
		{
			"pos": [-0.40625, 0.1875, -0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate_double", "interactable_barrel_double"],
			"minValue": 0,
			"maxValue": 6,
			"interactableVariables": [["!part_present_10"], ["!part_present_11"], ["!part_present_15"], ["!part_present_18"]]
		},
		{
			"pos": [0, 0.1865, 0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate_triple", "interactable_barrel_triple"],
			"minValue": 0,
			"maxValue": 9,
			"interactableVariables": [["!part_present_4"], ["!part_present_5"], ["!part_present_6"], ["!part_present_12"], ["!part_present_13"], ["!part_present_18"]]
		},
		{
			"pos": [0, 0.1865, -0.9375],
			"rot": [0, -90, 0],
			"types": ["interactable_crate_triple", "interactable_barrel_triple"],
			"minValue": 0,
			"maxValue": 9,
			"interactableVariables": [["!part_present_9"], ["!part_present_10"], ["!part_present_11"], ["!part_present_15"], ["!part_present_16"]]
		}
	],
	
	"collisionGroups": [
		{
			"collisions": [
				{
					"pos": [-1.15625,0.46875,-1.5],
					"width": 0.25,
					"height": 0.25,
					"variableName": "door_Tailgate"
				},
				{
					"pos": [1.15625,0.46875,-1.5],
					"width": 0.25,
					"height": 0.25,
					"variableName": "door_Tailgate"
				}
			],
			"applyAfter": "HingeTailgate",
			"animations": [
				{
					"animationType": "visibility",
					"variable": "part_useDefaultHitboxes_2",
					"clampMin": 1,
					"clampMax": 1
				}
			]
		}
	],

	"rendering": {
		"animatedObjects": [
			{
				"objectName": "$Fender_LeftBack",
				"animations": [
					{
						"animationType": "visibility",
						"variable": "part_useDefaultModel_2",
						"clampMin": 1,
						"clampMax": 1
					}
				]
			},
			{
				"objectName": "$Fender_RightBack",
				"animations": [
					{
						"animationType": "visibility",
						"variable": "part_useDefaultModel_3",
						"clampMin": 1,
						"clampMax": 1
					}
				]
			},
			{
				"objectName": "HingeTailgate",
				"animations": [
					{
						"animationType": "inhibitor",
						"variable": "part_useDefaultAnimations_2",
						"clampMin": 0,
						"clampMax": 0
					},
					{
						"animationType": "rotation",
						"centerPoint": [0, 0.1875, -1.45313],
						"axis": [-80, 0, 0],
						"variable": "door_Tailgate",
						"duration": 8,
						"forwardsDelay": 2,
						"reverseDelay": 0
					},
					{
						"animationType": "rotation",
						"centerPoint": [0, 0.1875, -1.45313],
						"axis": [-10, 0, 0],
						"variable": "door_Tailgate",
						"duration": 2,
						"forwardsDelay": 0,
						"reverseDelay": 10
					}
				]
			},
			{
				"objectName": "$Tailgate",
				"applyAfter": "HingeTailgate",
				"animations": [
					{
						"animationType": "visibility",
						"variable": "part_useDefaultModel_2",
						"clampMin": 1,
						"clampMax": 1
					}
				]
			},
			{
				"objectName": "$StakesideBed",
				"animations": [
					{
						"animationType": "visibility",
						"variable": "part_useDefaultModel_3",
						"clampMin": 1,
						"clampMax": 1
					}
				]
			}
		],
		"lightObjects": [
			{
				"objectName": "&LightReverse",
				"emissive": true,
				"isElectric": true,
				"color": "#FFFFFF",
				"brightnessAnimations": [
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 1, 0],
						"variable": "transmission_reversed",
						"duration": 2,
						"skipForwardsMovement": true
					}
				],
				"blendableComponents": [
					{
						"pos": [1.3125, 0.1875, -1.51563],
						"axis": [0, 0, -1],
						"flareHeight": 0.375,
						"flareWidth": 0.375
					},
					{
						"pos": [-1.3125, 0.1875, -1.51563],
						"axis": [0, 0, -1],
						"flareHeight": 0.375,
						"flareWidth": 0.375
					}
				]
			},
			{
				"objectName": "&LightTurnLeftBack",
				"emissive": true,
				"isElectric": true,
				"color": "#FF0000",
				"brightnessAnimations": [
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 0.5, 0],
						"variable": "running_light",
						"duration": 2,
						"skipForwardsMovement": true
					},
					{
						"animationType": "inhibitor",
						"variable": "EMERLTS",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "inhibitor",
						"variable": "left_turn_signal",
						"clampMin": 0,
						"clampMax": 0
					},
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 1, 0],
						"variable": "0_5_15_cycle",
						"duration": 2,
						"skipForwardsMovement": true
					},
					{
						"animationType": "activator",
						"variable": "brake",
						"clampMin": 1,
						"clampMax": 1,
						"reverseDelay": 2
					},
					{
						"animationType": "inhibitor",
						"variable": "EMERLTS",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "inhibitor",
						"variable": "left_turn_signal",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 1, 0],
						"variable": "brake",
						"duration": 2,
						"skipForwardsMovement": true
					},
					{
						"animationType": "activator",
						"variable": "EMERLTS",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 1, 0],
						"variable": "0_5_5_cycle",
						"duration": 2,
						"skipForwardsMovement": true
					}
				],
				"blendableComponents": [
					{
						"pos": [1.3125, 0.375, -1.51563],
						"axis": [0, 0, -1],
						"flareHeight": 0.375,
						"flareWidth": 0.375
					}
				]
			},
			{
				"objectName": "&LightTurnRightBack",
				"emissive": true,
				"isElectric": true,
				"color": "#FF0000",
				"brightnessAnimations": [
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 0.5, 0],
						"variable": "running_light",
						"duration": 2,
						"skipForwardsMovement": true
					},
					{
						"animationType": "inhibitor",
						"variable": "EMERLTS",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "inhibitor",
						"variable": "right_turn_signal",
						"clampMin": 0,
						"clampMax": 0
					},
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 1, 0],
						"variable": "0_5_15_cycle",
						"duration": 2,
						"skipForwardsMovement": true
					},
					{
						"animationType": "activator",
						"variable": "brake",
						"clampMin": 1,
						"clampMax": 1,
						"reverseDelay": 2
					},
					{
						"animationType": "inhibitor",
						"variable": "EMERLTS",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "inhibitor",
						"variable": "right_turn_signal",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 1, 0],
						"variable": "brake",
						"duration": 2,
						"skipForwardsMovement": true
					},
					{
						"animationType": "activator",
						"variable": "EMERLTS",
						"clampMin": 1,
						"clampMax": 1
					},
					{
						"animationType": "translation",
						//"centerPoint": [0, 0, 0],
						"axis": [0, 1, 0],
						"variable": "5_5_0_cycle",
						"duration": 2,
						"skipForwardsMovement": true
					}
				],
				"blendableComponents": [
					{
						"pos": [-1.3125, 0.375, -1.51563],
						"axis": [0, 0, -1],
						"flareHeight": 0.375,
						"flareWidth": 0.375
					}
				]
			}
		],
		"sounds": [
			{
				"name": "unuparts:unuparts_rotation_unu_doorcargo_3_open",
				"activeAnimations": [
					{
						"animationType": "inhibitor",
						"variable": "part_useDefaultSounds_2",
						"clampMin": 0,
						"clampMax": 0
					},
					{
						"animationType": "visibility",
						"variable": "door_Tailgate",
						"clampMin": 1,
						"clampMax": 1,
						"forwardsDelay": 0,
						"reverseDelay": 0
					}
				]
			},
			{
				"name": "unuparts:unuparts_rotation_unu_doorcargo_3_close",
				"activeAnimations": [
					{
						"animationType": "inhibitor",
						"variable": "part_useDefaultSounds_2",
						"clampMin": 0,
						"clampMax": 0
					},
					{
						"animationType": "visibility",
						"variable": "door_Tailgate",
						"clampMin": 0,
						"clampMax": 0,
						"forwardsDelay": 0,
						"reverseDelay": 10
					}
				]
			}
		]
	},
	
	"constantValues": {
		"unuisbest": 1,
		"part_frontDistance": 1.5,
		"part_backDistance": 1.5,
		"part_tailpipeLength": 1
	},
	
	"variableModifiers": [
		{
			"variable": "crateHeightLimit",
			"animations": [
				{
					"animationType": "translation",
					"variable": "unuisbest",
					"axis": [0, 0, 1]
				},
				{
					"animationType": "translation",
					"variable": "part_part_crateHeightLimitAddition_3",
					"axis": [0, 1, 0]
				}
			]
		}
	]
}
