// Script para chamar o distintivo de posto/graduação nas fardas do exército
// Autor: Valmo Trindade

params["_unit", "_rank"];

switch (_rank) do {
	case "soldado": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\soldado_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\soldado.rvmat"];
	};
	case "cabo": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\cabo_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\cabo.rvmat"];
	};
	case "3sarg": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\3sarg_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\3sarg.rvmat"];
	};
	case "2sarg": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\2sarg_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\2sarg.rvmat"];
	};
	case "1sarg": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\1sarg_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\1sarg.rvmat"];
	};
	case "sub": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\sub_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\sub.rvmat"];
	};
	case "2ten": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\2ten_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\2ten.rvmat"];
	};
	case "1ten": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\1ten_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\1ten.rvmat"];
	};
	case "cap": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\cap_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\cap.rvmat"];
	};
	case "maj": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\maj_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\maj.rvmat"];
	};
	case "tencel": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\tencel_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\tencel.rvmat"];
	};
	case "cel": {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\cel_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\cel.rvmat"];
	};
	default {
		_unit setObjectTextureGlobal [12, "braf\braf_insignia\uniform\rank\soldado_CO.paa"];
		_unit setObjectMaterialGlobal [12, "braf\braf_insignia\uniform\rank\soldado.rvmat"];
	};
};