Browse Source

Fixes bug where get_entity_count never returned an API error..

main
chksm 2 years ago
parent
commit
25b8ae1f1f
  1. 12
      script/fetcher.lua

12
script/fetcher.lua

@ -17,7 +17,9 @@ this.overlays.get_entity_count = function(parent, entity)
return parent.get_entity_count(entity)
end)
return data
if res then return data end
return nil
end
@ -45,9 +47,13 @@ this.callOverlayFunction = function(functionName, callback, name, parent, args)
--data = parent.get_entity_count(args[1])
data = this.overlays.get_entity_count(parent, args[1])
this.doCallback(callback, name, data)
return true
if data == nil then
return false
else
this.doCallback(callback, name, data)
return true
end
-- flow statistics
elseif functionName == "get_flow_count" and parent.object_name == "LuaFlowStatistics" then

Loading…
Cancel
Save