require "SVUC_Stuffs"

local DoVehicleParam = function(vehicle, param, module)
	module = module or "Base"
	local vehicleScript = ScriptManager.instance:getVehicle(module .. "." .. vehicle)
	if not vehicleScript then return end
	vehicleScript:Load(vehicle, "{" .. param .. "}")
end

local SetArmor = function(vehicle, armor, module)
	module = module or "Base"
	DoVehicleParam(vehicle, "template! = " .. armor .. ",")
end

if not getActivatedMods():contains("VVehicleEnhancer") and not getActivatedMods():contains("SCKCO") and not getActivatedMods():contains("VVSR_Continued") then
	SetArmor("fhqPorsche918","SVU_Armor_fhqPor918");
	SetArmor("fhqPorsche918Sil","SVU_Armor_fhqPor918");
	SetArmor("fhqPorsche918Livery","SVU_Armor_fhqPor918");
	SetArmor("fhqPorsche918WeissachLivery","SVU_Armor_fhqPor918");
	SetArmor("fhqPorsche918Livery2","SVU_Armor_fhqPor918");
	SetArmor("fhqPorsche918WeissachLivery2","SVU_Armor_fhqPor918");
	SetArmor("fhqPorsche918Offroad","SVU_Armor_fhqPor918_OR");
end
