--[[
	AttacherJointsFix
	Specialization to load the invertX vaule to the attacherJoints!
	
	@author:    Ifko[nator]
	@date:      13.09.2020
	@version:	1.0
]]

AttacherJointsFix = {};

--## AttacherJointsFix

function AttacherJointsFix.prerequisitesPresent(specializations)
	return true;
end;

function AttacherJointsFix:loadAttacherJointFromXML(superFunc, attacherJoint, xmlFile, baseName, index)
	local attacherJoints = superFunc(self, attacherJoint, xmlFile, baseName, index);

	if attacherJoints ~= nil then
		local schemaKey = baseName .. ".schema";
		
		attacherJoint.invertX = Utils.getNoNil(getXMLBool(xmlFile, schemaKey .. "#invertX"), false);
	end;

	return attacherJoints;
end;

AttacherJoints.loadAttacherJointFromXML = Utils.overwrittenFunction(AttacherJoints.loadAttacherJointFromXML, AttacherJointsFix.loadAttacherJointFromXML);