diff --git a/scripts/Modules/StateModule.lua b/scripts/Modules/StateModule.lua index 5d03031..b816f43 100644 --- a/scripts/Modules/StateModule.lua +++ b/scripts/Modules/StateModule.lua @@ -60,12 +60,12 @@ function ADStateModule:reset() self.startHelper = false - if self.vehicle.getLastJob then - self.usedHelper = ADStateModule.HELPER_AI - elseif self.vehicle.cpStartStopDriver then + if self.vehicle.cpStartStopDriver then self.usedHelper = ADStateModule.HELPER_CP elseif self.vehicle.acParameters then self.usedHelper = ADStateModule.HELPER_AIVE + elseif self.vehicle.getLastJob then + self.usedHelper = ADStateModule.HELPER_AI else self.usedHelper = ADStateModule.HELPER_NONE end @@ -172,12 +172,6 @@ function ADStateModule:readFromXMLFile(xmlFile, key) self.bunkerUnloadType = bunkerUnloadType end - local usedHelper = xmlFile:getValue(key .. "#usedHelper") - if usedHelper ~= nil and self:isHelperTypeValid(usedHelper) then - self.usedHelper = usedHelper - end - - -- local automaticUnloadTarget = xmlFile:getValue(key .. "#automaticUnloadTarget") -- if automaticUnloadTarget ~= nil then -- self.automaticUnloadTarget = automaticUnloadTarget @@ -206,7 +200,6 @@ function ADStateModule:saveToXMLFile(xmlFile, key) xmlFile:setValue(key .. "#driverName", self.driverName) xmlFile:setValue(key .. "#lastActive", self.active) xmlFile:setValue(key .. "#AIVElastActive", false) - xmlFile:setValue(key .. "#usedHelper", self.usedHelper) xmlFile:setValue(key .. "#bunkerUnloadType", self.bunkerUnloadType) -- xmlFile:setValue(key .. "#automaticUnloadTarget", self.automaticUnloadTarget) -- xmlFile:setValue(key .. "#automaticPickupTarget", self.automaticPickupTarget) diff --git a/scripts/Specialization.lua b/scripts/Specialization.lua index 76f13f1..803e42d 100644 --- a/scripts/Specialization.lua +++ b/scripts/Specialization.lua @@ -152,7 +152,6 @@ function AutoDrive.initSpecialization() schemaSavegame:register(XMLValueType.STRING, "vehicles.vehicle(?).AutoDrive#driverName", "driverName") schemaSavegame:register(XMLValueType.BOOL, "vehicles.vehicle(?).AutoDrive#lastActive", "lastActive") schemaSavegame:register(XMLValueType.BOOL, "vehicles.vehicle(?).AutoDrive#AIVElastActive", "AIVElastActive") - schemaSavegame:register(XMLValueType.INT, "vehicles.vehicle(?).AutoDrive#usedHelper", "usedHelper") schemaSavegame:register(XMLValueType.INT, "vehicles.vehicle(?).AutoDrive#parkDestination", "parkDestination") schemaSavegame:register(XMLValueType.INT, "vehicles.vehicle(?).AutoDrive#bunkerUnloadType", "bunkerUnloadType") if AutoDrive.automaticUnloadTarget then