module Base
{
repeat
	model VVA_Vehicles_[LABEL][Postfix]_Trunk
	{
 checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Trunk_[LABEL][Postfix]_obj,
 else
		mesh = vehicles/[FILENAME]|Trunk[Postfix]_obj,
 end
		shader = vehicle_multiuv_noreflect,
		static = FALSE,
		scale = [SCALE],
  checkprop:	Bones 
  	repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	end
  else
		boneWeight = TrunkBone 1.0,
  end
	}
	model VVA_Vehicles_[LABEL][Postfix]_Trunk_nr
	{
 checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Trunk_[LABEL][Postfix]_obj,
 else
		mesh = vehicles/[FILENAME]|Trunk[Postfix]_obj,
 end
		shader = vehicle_norandom_multiuv_noreflect,
		static = FALSE,
		scale = [SCALE],
  checkprop:	Bones 
  	repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	end
  else
		boneWeight = TrunkBone 1.0,
  end
	}
	template vehicle VVA_[LABEL][Postfix]_Trunk {
 checkprop:	Customtrunk
  pasteprop:	Customtrunk
		part [Customtrunk]
  end
 else
  checkprop: SpecialTrunk
   pasteprop:	SpecialTrunk
		part [SpecialTrunk]
   end
  else
		part TrunkDoor
  end
 end
		{
			model Default
			{
				file = VVA_Vehicles_[LABEL][Postfix]_Trunk,
			}		
 checkprop:	Customtrunk
			anim Close
			{
				anim = Trunk_closing,
			}

			anim Open
			{
				anim = Trunk_closing,
				reverse = TRUE,
			}

			anim Closed
			{
				anim = Trunk_closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = Trunk_closing,
				animate = FALSE,
			}
 end
		}
 checkprop:	!Customtrunk
  checkprop: SpecialTrunk
   pasteprop:	SpecialTrunk
		template! = VVA_[SpecialTrunk]_Common,
   end
  else
		template! = VVA_TrunkDoor_Common,
  end
 end
 checkprop: Window,BaseWIndow
		part WindshieldRear
		{
  checkprop:	Customtrunk
   pasteprop:	Customtrunk
			parent = [Customtrunk],
   end
  else
   checkprop: SpecialTrunk
    pasteprop:	SpecialTrunk
			parent = [SpecialTrunk],
    end
   else
			parent = TrunkDoor,
   end 	
  end 			
		}
  checkprop: BaseWIndow		
		template! = VVA_[LABEL]_RearWindow,
  else
		template! = VVA_[LABEL][Postfix]_RearWindow,
  end
 end
		
	}
	template vehicle VVA_[LABEL][Postfix]_Trunk_nr {
 checkprop:	Customtrunk
  pasteprop:	Customtrunk
		part [Customtrunk]
  end
 else
  checkprop: SpecialTrunk
   pasteprop:	SpecialTrunk
		part [SpecialTrunk]
   end
  else
		part TrunkDoor
  end
 end
		{
			model Default
			{
				file = VVA_Vehicles_[LABEL][Postfix]_Trunk_nr,
			}
 checkprop:	Customtrunk
			anim Close
			{
				anim = Trunk_closing,
			}

			anim Open
			{
				anim = Trunk_closing,
				reverse = TRUE,
			}

			anim Closed
			{
				anim = Trunk_closing,
				reverse = TRUE,
				animate = FALSE,
			}

			anim Opened
			{
				anim = Trunk_closing,
				animate = FALSE,
			}
 end
		}
 checkprop:	!Customtrunk		
  checkprop: SpecialTrunk
   pasteprop:	SpecialTrunk
		template! = VVA_[SpecialTrunk]_Common,
   end
  else
		template! = VVA_TrunkDoor_Common,
  end
 end
 checkprop: Window,BaseWIndow
 		part WindshieldRear
		{
  checkprop:	Customtrunk
   pasteprop:	Customtrunk
			parent = [Customtrunk],
   end
  else
   checkprop: SpecialTrunk
    pasteprop:	SpecialTrunk
			parent = [SpecialTrunk],
    end
   else
			parent = TrunkDoor,
   end 	
  end 			
		}
  checkprop: BaseWIndow		
		template! = VVA_[LABEL]_RearWindow,
  else
		template! = VVA_[LABEL][Postfix]_RearWindow,
  end
 setflag:	TrunkWindow
 end
	}
endrepeat
}