Commit optimització
This commit is contained in:
parent
7489edb233
commit
a3d659e10c
@ -43,6 +43,7 @@ function fetch_pollution_data(location)
|
|||||||
return 0 -- Return 0 if the request fails
|
return 0 -- Return 0 if the request fails
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function setup()
|
function setup()
|
||||||
@ -195,6 +196,9 @@ function process_node(profile, node, result)
|
|||||||
end
|
end
|
||||||
local location = node:location()
|
local location = node:location()
|
||||||
pollution = fetch_pollution_data(location)
|
pollution = fetch_pollution_data(location)
|
||||||
|
if pollution > 50 then
|
||||||
|
result.barrier = true
|
||||||
|
end
|
||||||
--print(pollution)
|
--print(pollution)
|
||||||
--result.weight = result.weight + pollution
|
--result.weight = result.weight + pollution
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user