chore: stuck-diag fillLevel type-guard (review)
This commit is contained in:
@@ -74,7 +74,7 @@ function ADStuckDiag.describe(vehicle)
|
||||
tostring(tm.isLoading), tostring(tm.isUnloading),
|
||||
tostring(tm.isActiveAtTrigger ~= nil and tm:isActiveAtTrigger()),
|
||||
tostring(tm.isUnloadingToBunkerSilo ~= nil and tm:isUnloadingToBunkerSilo()),
|
||||
tostring(task ~= nil and task.waitForALUnload), tostring(tm.fillLevel ~= nil and math.floor(tm.fillLevel) or "?")))
|
||||
tostring(task ~= nil and task.waitForALUnload), tostring(type(tm.fillLevel) == "number" and math.floor(tm.fillLevel) or "?")))
|
||||
end
|
||||
local wait = ADUnloadWait ~= nil and ADUnloadWait.getWaitFor ~= nil and ADUnloadWait.getWaitFor(vehicle) or nil
|
||||
local hold = ADOutbound ~= nil and ADOutbound.getHoldFor ~= nil and ADOutbound.getHoldFor(vehicle) or nil
|
||||
|
||||
Reference in New Issue
Block a user