-- Lampovo Project ^ω^ Average Enjoyer

local modDir = g_currentModDirectory
local modName = g_currentModName

MotionPathEffectManager.loadMapData = Utils.prependedFunction(MotionPathEffectManager.loadMapData, function (self, xmlFile, missionInfo, baseDirectory)
    MotionPathEffectManager.createMotionPathEffectXMLSchema()

    local motionPathEffectsFilename = Utils.getFilename('xml/motionPathEffects.xml', modDir)

    if motionPathEffectsFilename == nil then
        Logging.xmlInfo(xmlFile, "Unable to found motionPathEffects xml")

        return false
    end

    local externalXMLFile = XMLFile.load("motionPathXML", motionPathEffectsFilename)

    if externalXMLFile ~= nil then
        self:loadMotionPathEffects(externalXMLFile.handle, "motionPathEffects.motionPathEffect", modDir, modName)
        externalXMLFile:delete()
    end

    return true
end)