diff --git a/react b/react index c0d9a58..d81a9a3 100644 --- a/react +++ b/react @@ -1,5 +1,5 @@ --import utils for lamp rednet stuffs -dofile("/git-scripts/utils") +require("git-scripts.utils") --regulate in between these in normal operation NORMAL_THRESHOLD_U = 8000000 diff --git a/reactLamp b/reactLamp index 26639da..f454b58 100644 --- a/reactLamp +++ b/reactLamp @@ -1,6 +1,6 @@ -LAMP_SIDE = "bottom" +dofile("git-scripts.utils") -dofile("/git-scripts/utils") +LAMP_SIDE = "bottom" local modemSide = utils.getSideOf("modem") rednet.open(modemSide) diff --git a/recv_file b/recv_file index 8c76b9a..7ac0f7e 100644 --- a/recv_file +++ b/recv_file @@ -1,4 +1,4 @@ -dofile("/git-scripts/utils") +require("git-scripts.utils") modemSide = utils.getSideOf("modem") --get side the modem is on if modemSide == nil then diff --git a/send_file b/send_file index 6a6c340..06ff87f 100644 --- a/send_file +++ b/send_file @@ -1,5 +1,4 @@ ---import module -dofile("/git-scripts/utils") +require("git-scripts.utils") local function printUsage() print("Usage:") diff --git a/utils b/utils index 0cf1b7e..892a751 100644 --- a/utils +++ b/utils @@ -18,4 +18,12 @@ function utils.printToMon(mon, text) mon.setCursorPos(x, y+1) end +function utils.setupMonitor(side, textScale) + local mon = peripheral.wrap(side) + mon.clear() + mon.setTextScale(textScale) + mon.setCursor(1, 1) + return mon +end + return utils