-- init IvecoStralis Autoload Truck

local modDirectory = g_currentModDirectory

StoreManager.loadItem = Utils.overwrittenFunction(StoreManager.loadItem, function(self, superFunc, xmlFilename, baseDir, ...)
	if g_modIsLoaded["FS19_Truck_Bale_trailer"] and not g_modIsLoaded["FS19_EasyAutoLoad"] and baseDir == modDirectory and xmlFilename == "Scaniabaletrailer.xml" then
        log("Warning: \"FS19_Truck_Bale_trailer\" requires standalone EasyAutoLoad specialization - \"FS19_Truck_Bale_trailer\" will not be loaded")
        return nil
    end
    return superFunc(self, xmlFilename, baseDir, ...)
end)

if g_modIsLoaded["FS19_EasyAutoLoad"] then
	source(modDirectory .."scripts/categorizer.lua")
end