Skip to content

Commit

Permalink
Fixes class check function
Browse files Browse the repository at this point in the history
  • Loading branch information
schwiti6190 committed Dec 25, 2024
1 parent 3a8dffa commit f60358f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/ai/controllers/LevelerController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function LevelerController.actionEventAttacherJointControl(object, superFunc, ..
local rootVehicle = object:getRootVehicle()
if rootVehicle and rootVehicle.getJob then
local job = rootVehicle:getJob()
if job and job:isa(CpAIJobBunkerSilo) then
if job and job.is_a and job:is_a(CpAIJobBunkerSilo) then
return
end
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/gui/pages/CpCourseGeneratorFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ function CpCourseGeneratorFrame:setActiveJobTypeSelection(jobTypeIndex)
self:validateParameters()
self.jobMenuLayout:invalidateLayout()
FocusManager:setFocus(self.jobTypeElement)
self:updateCourseGenerator(self.currentJob:isa(CpAIJobFieldWork), self.currentJobVehicle)
self:updateCourseGenerator(self.currentJob.is_a and self.currentJob:is_a(CpAIJobFieldWork), self.currentJobVehicle)
end
self:updateContextActions()
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/specializations/CpAICombineUnloader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,5 @@ function CpAICombineUnloader:getCpCombineUnloaderJob()
end

function CpAICombineUnloader:getIsCpCombineUnloaderActive()
return self:getIsAIActive() and self:getJob() and self:getJob():isa(CpAIJobCombineUnloader)
return self:getIsAIActive() and self:getJob() and self:getJob().is_a and self:getJob():is_a(CpAIJobCombineUnloader)
end
2 changes: 1 addition & 1 deletion scripts/specializations/CpAIFieldWorker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ end

--- Is a cp fieldwork job active ?
function CpAIFieldWorker:getIsCpFieldWorkActive()
return self:getIsAIActive() and self:getJob() and self:getJob():isa(CpAIJobFieldWork)
return self:getIsAIActive() and self:getJob() and self:getJob().is_a and self:getJob():is_a(CpAIJobFieldWork)
end

function CpAIFieldWorker:getCpFieldWorkProgress()
Expand Down
2 changes: 1 addition & 1 deletion scripts/specializations/CpAIWorker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ end
--- Is a cp worker active ?
--- Every cp job should be an instance of type CpAIJob.
function CpAIWorker:getIsCpActive()
return self:getIsAIActive() and self:getJob() and self:getJob():isa(CpAIJob)
return self:getIsAIActive() and self:getJob() and self:getJob().is_a and self:getJob():is_a(CpAIJob)
end

--- Is cp drive to field work active
Expand Down

0 comments on commit f60358f

Please sign in to comment.