---
-- register
--
-- @author      nilBrain @VertexDezign
-- @date        2021-01-26
--
-- Copyright (C) nilBrain, Confidential, All Rights Reserved.

local modName = g_currentModName
local modDir = g_currentModDirectory
g_fapModName = modName

TypeManager.validateTypes = Utils.appendedFunction(TypeManager.validateTypes, function(typeManager)
    if typeManager.typeName ~= "vehicle" then
        return
    end

    g_specializationManager:addSpecialization("createNodes", "CreateNodes", Utils.getFilename("scripts/specializations/CreateNodes.lua", modDir), nil)

    for typeName, typeEntry in pairs(g_vehicleTypeManager:getTypes()) do
        if not SpecializationUtil.hasSpecialization(modName .. ".createNodes", typeEntry.specializations) then
            g_vehicleTypeManager:addSpecialization(typeName, modName .. ".createNodes")
        end
    end
end)
