26 lines
836 B
Lua
26 lines
836 B
Lua
local stratumDBlib = require("stratumDBlib")
|
|
local meshnetBackend = require("meshnetBackend")
|
|
meshnetBackend.setTarget(10)
|
|
stratumDBlib.setBackend(meshnetBackend)
|
|
print("connecting to database...")
|
|
local trans = stratumDBlib.loadTransforms("transforms","stratumDBlib")
|
|
|
|
local overlay = link.getUpgradeFunctions().overlay
|
|
if not overlay then error("failed to find overlay goggles do you have them installed?") end
|
|
|
|
local function receive()
|
|
while true do
|
|
local count = trans.getOrderCount()
|
|
if count > 0 then
|
|
overlay.addOrUpdateTextElement("orderCount","Current Orders: "..tostring(count),1,1,0xFFFFFF,2)
|
|
else
|
|
overlay.addOrUpdateTextElement("orderCount",""..tostring(count),1,1,0xFFFFFF,2)
|
|
end
|
|
overlay.send()
|
|
sleep(10)
|
|
end
|
|
end
|
|
|
|
parallel.waitForAny(receive)
|
|
|