Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Disable send event from client on AIDriver init (#6941)
Browse files Browse the repository at this point in the history
Apparently the noEventSend was not passed all the way down to all the
SiloeSelectedFillTypeSetting functions
  • Loading branch information
pvaiko committed Mar 4, 2021
1 parent af2f28a commit 48f325d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,7 @@ end
function SiloSelectedFillTypeSetting:cleanUpOldFillTypes(noEventSend)
local supportedFillTypes = {}
self:getSupportedFillTypes(self.vehicle,supportedFillTypes)
self:checkSelectedFillTypes(supportedFillTypes,true)
self:checkSelectedFillTypes(supportedFillTypes,true, noEventSend)
if not noEventSend then
self:sendEvent(self.NetworkTypes.CLEANUP_OLD_FILLTYPES)
end
Expand All @@ -2767,14 +2767,14 @@ function SiloSelectedFillTypeSetting:validateCurrentValue()
end


function SiloSelectedFillTypeSetting:checkSelectedFillTypes(supportedFillTypes,cleanUp)
function SiloSelectedFillTypeSetting:checkSelectedFillTypes(supportedFillTypes, cleanUp, noEventSend)
totalData = self:getData()
for index,data in ipairs(totalData) do
if supportedFillTypes[data.fillType] then --already selected fillTypes disable multi select
supportedFillTypes[data.fillType]=0
elseif cleanUp then --delete not supported fillTypes
self:deleteByIndex(index)
return self:checkSelectedFillTypes(supportedFillTypes,cleanUp)
self:deleteByIndex(index, noEventSend)
return self:checkSelectedFillTypes(supportedFillTypes, cleanUp, noEventSend)
end
end
end
Expand Down Expand Up @@ -2993,7 +2993,7 @@ function SiloSelectedFillTypeSetting:moveDownByIndex(index,noEventSend)
end
end

function SiloSelectedFillTypeSetting:deleteByIndex(index,noEventSend)
function SiloSelectedFillTypeSetting:deleteByIndex(index, noEventSend)
LinkedListSetting.deleteByIndex(self,index)
if not noEventSend then
self:sendEvent(self.NetworkTypes.DELETE_X,index)
Expand Down

0 comments on commit 48f325d

Please sign in to comment.