From cad7132e5b28daa8b7923a41312e9702b265a5fe Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Tue, 4 Feb 2020 01:18:54 -0500 Subject: [PATCH] Added automatic windon't download --- windont/windont-shell.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/windont/windont-shell.lua b/windont/windont-shell.lua index 1072b5d..4c5a858 100644 --- a/windont/windont-shell.lua +++ b/windont/windont-shell.lua @@ -1,4 +1,17 @@ +if not fs.exists("windont.lua") then + print("'windont.lua' not found! Downloading...") + local net = http.get("https://github.com/LDDestroier/CC/raw/master/windont/windont.lua") + if net then + local file = fs.open("windont.lua", "w") + file.write(net.readAll()) + file.close() + net.close() + else + error("Could not download Windon't.", 0) + end +end local windont = require "windont" + windont.default.alwaysRender = false local scr_x, scr_y = term.getSize() @@ -191,8 +204,8 @@ end local main = function() - newInstance(3, 3, 20, 10, "rom/programs/shell.lua", nil) - newInstance(8, 5, 20, 10, "rom/programs/shell.lua", nil) + newInstance(3, 3, 30, 12, "rom/programs/shell.lua", nil) + newInstance(8, 5, 30, 12, "rom/programs/shell.lua", nil) local evt, success, result, oldTerm local cx, cy