----------------------------------------------------------------------------------------------------
-- ManureSystemKotteTSA
----------------------------------------------------------------------------------------------------
-- Purpose: Insert Manure System function into the Kotte TSA.
--
-- Copyright (c) Wopster, 2019
----------------------------------------------------------------------------------------------------

---@class ManureSystemKotteTSA
ManureSystemKotteTSA = {}

function ManureSystemKotteTSA.prerequisitesPresent(specializations)
    return true
end

function ManureSystemKotteTSA.registerEventListeners(vehicleType)
    SpecializationUtil.registerEventListener(vehicleType, "onPreLoad", ManureSystemKotteTSA)
end

function ManureSystemKotteTSA:onPreLoad(savegame)
    setXMLString(self.xmlFile, ("vehicle.manureSystemConnectors.connector(%d)#type"):format(2), "COUPLING")
    setXMLBool(self.xmlFile, ("vehicle.manureSystemConnectors.connector(%d)#isParkPlace"):format(2), true)
    setXMLBool(self.xmlFile, ("vehicle.manureSystemConnectors.connector(%d)#createNode"):format(2), true)
    setXMLString(self.xmlFile, ("vehicle.manureSystemConnectors.connector(%d)#position"):format(2), "-1.101 1.646 -2.229")


end
