From fe094f1dfe3e1db84c2feeb7bf67515b4af46c52 Mon Sep 17 00:00:00 2001 From: Rivulet Date: Fri, 2 Jan 2026 11:48:15 -0800 Subject: [PATCH] moar updates --- startup/00_entrypointclient.lua | 2 +- startup/01_repo.lua | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/startup/00_entrypointclient.lua b/startup/00_entrypointclient.lua index a3f87ff..6454986 100644 --- a/startup/00_entrypointclient.lua +++ b/startup/00_entrypointclient.lua @@ -47,7 +47,7 @@ local function receive() end end elseif msg.protocol == "packet" then - if msg.hops >= 1 then + if msg.hops >= 1 and msg.destination == os.getComputerID() then os.queueEvent("network_packet",msg.content,msg.sender,msg.hops) end end diff --git a/startup/01_repo.lua b/startup/01_repo.lua index e8622b9..6a7e9f4 100644 --- a/startup/01_repo.lua +++ b/startup/01_repo.lua @@ -46,6 +46,7 @@ function lib.listPackages(type) recorded_packages[name] = data end end + queued_requests[event[3]] = nil end end until next(queued_requests) == nil or os.clock() >= next_timestamp @@ -53,6 +54,7 @@ function lib.listPackages(type) end function lib.getPackageData(type,id) + print(type,id) local queued_requests = {} local package = nil for k,v in pairs(repos) do @@ -70,7 +72,8 @@ function lib.getPackageData(type,id) package = event[2].data package.repos = {[event[3]] = event[4]} end - package.repos[event[3]] = event[4] + package.repos[event[3]] = event[4] + queued_requests[event[3]] = nil end end until next(queued_requests) == nil or os.clock() >= next_timestamp @@ -89,7 +92,7 @@ local function add_app_to_reg(appid) end end -local function app_in_reg(appid) +function lib.appInstalled(appid) local file = fs.open(appregloc,"r") local data = {} if file then data = textutils.unserialise(file.readAll() or "") or {} file.close() end @@ -123,7 +126,7 @@ local function install_app_from_data(data) return false, "failed to open file" end function lib.uninstallApp(id) - if app_in_reg(id) then + if lib.appInsalled(id) then remove_app_from_reg(id) fs.delete(fs.combine("/apps-meta",id..".meta")) fs.delete(fs.combine("/appears",id))