From a4899c985460735d3b70a7d991537e099547206b Mon Sep 17 00:00:00 2001 From: Izaya Date: Sun, 18 Mar 2018 13:44:52 +1100 Subject: [PATCH] more minification --- Embedded/microtel-3-mini.lua | 6 +++--- Embedded/microtel-3.lua | 2 +- Embedded/minify.sh | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Embedded/microtel-3-mini.lua b/Embedded/microtel-3-mini.lua index 8c46b99..2235f0f 100644 --- a/Embedded/microtel-3-mini.lua +++ b/Embedded/microtel-3-mini.lua @@ -1,6 +1,6 @@ _G.net={} do -local M,pQ,pC,rC,C={},{},{},{},computer +local M,pQ,pC,rC,C,Y={},{},{},{},computer,table.unpack net.port,net.hostname,net.route,U=4096,C.address():sub(1,8),true,C.uptime for a in component.list("modem") do M[a]=component.proxy(a) @@ -67,10 +67,10 @@ pC[Z[6]]=U() end for k,v in pairs(pQ) do if U()>v[5] then -sP(k,table.unpack(v)) +sP(k,Y(v)) v[5]=U()+30 end end -return table.unpack(Z) +return Y(Z) end end diff --git a/Embedded/microtel-3.lua b/Embedded/microtel-3.lua index 29a495c..26927cb 100644 --- a/Embedded/microtel-3.lua +++ b/Embedded/microtel-3.lua @@ -1,7 +1,7 @@ _G.net={} do -local modems,packetQueue,packetCache,routeCache,C = {},{},{},{},COMPUTER +local modems,packetQueue,packetCache,routeCache,C,Y = {},{},{},{},COMPUTER,UNPACK net.port,net.hostname,net.route,U=4096,computer.address():sub(1,8),true,UPTIME for a in component.list("modem") do diff --git a/Embedded/minify.sh b/Embedded/minify.sh index 2800b3f..9fbb805 100755 --- a/Embedded/minify.sh +++ b/Embedded/minify.sh @@ -18,8 +18,10 @@ sed -i -e 's/realComputerPullSignal/rCPE/g' microtel-3-mini.lua sed -i -e 's/packetQueue/pQ/g' microtel-3-mini.lua sed -i -e 's/computer/C/g' microtel-3-mini.lua sed -i -e 's/C.uptime/U/g' microtel-3-mini.lua +sed -i -e 's/table.unpack/Y/g' microtel-3-mini.lua sed -i -e 's/COMPUTER/computer/g' microtel-3-mini.lua sed -i -e 's/UPTIME/C.uptime/g' microtel-3-mini.lua +sed -i -e 's/UNPACK/table.unpack/g' microtel-3-mini.lua lua strip.lua microtel-3-mini.lua microtel-3-mini.lua #microtel-4.lua