Commit da25ab06 authored by Danny SMc's avatar Danny SMc

Updated most files for fixes, finished snippets, apps, and profiles so far.

parent 67a46224
ewogIFBhc3N3b3JkID0gImFkNGZhYTI1NjM2N2NhM2U3OWRmYjQwMDBkMjFkN2UyODM0MDBiYmYyOGNmMzI4YTcwNTFkYmJmYTQ1OGI3ZDgiLAogIFVzZXJuYW1lID0gImRhbm55c21jOTUiLAp9
\ No newline at end of file
--[[
Name: Example Plugin
Desc: A basic example plugin
Auth: DannySMc
]]
-- @base example
-- @func entry
--// Create plugin namespace
Plugin.example = {};
--// Create init function
function Plugin.example.entry()
--// Sets screen colour
--base.screen.colour("lightBlue")
--// Center text and write
--base.draw.textc("Initialising Example Plugin", 9, false, "white", "lightBlue")
--// Wait one second
--sleep(1)
--// This is the logo for the home menu
local exampleicon = {
{"c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: "};
{"c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: "};
{"c:c: ","c:c: ","f:3:M","c:c: ","f:3:n","c:c: ","f:3:g","f:3:e","f:3:m","f:3:e","f:3:n","f:3:t","c:c: ","c:c: "};
{"c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: ","c:c: "};
};
--// Will add the menu icon into the existing icon library
--DiscoverApp.Register.MenuIcon("ExamplePlugin", exampleicon);
--// Will register a menu entry
--DiscoverApp.Register.MenuEntry("ExamplePlugin", "example", "new", "NewEx", false);
end
--// Create actual function
function program.example.new()
--// Set screen colour before drawing menu
base.screen.colour("lightBlue")
--// Set base scroll value
local scroll = 0;
local exampleData = {"Data1";"Data2";"Data3";"Data4";"Data5";"Data6";"Data7";"Data8";"Data9";"Data10";"Data11";"Data12";"Data13";"Data14";"Data15";"Data16";"Data17";"Data18";"Data19";}
--// Draw menubar with title
program.draw.menubar("Example")
--// Render function for on screen drawing, useful when you want to do scrolling etc
local function render(scroll)
base.draw.textc("Nice one! Example plugin is now usable", 19, false, "white", "lightBlue");
for i=1, 14 do
base.draw.texta(tostring(i+scroll) .. " -> " .. tostring(exampleData[i+scroll]), 3, i+3, false, "grey", "lightBlue")
end
end
--// Run render with scroll first to draw screen
render(scroll)
--// Create event loop
while true do
--// Wait/Catch for events
local args = { os.pullEvent() }
--// If the timer event fires redraw menu so the clock works
if args[1] == "timer" then
--// Re-draw menu for clock
program.draw.menubar("Example")
--// On mouse click
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Example", args[3], args[4])
end
--// On mouse scroll
elseif args[1] == "mouse_scroll" then
--// On scroll up
if args[2] == -1 then
--// Check scroll is bigger than 0 otherwise do nothing
if scroll > 0 then
--// Increment scroll value
scroll = scroll -1
--// Redraw screen with scroll
render(scroll)
end
--// On scroll down
elseif args[2] == 1 then
--// If scroll + screensize (usually 14) is smaller than the length of the exampleData count then scroll down
if scroll + 14 < #exampleData then
--// Increment scroll
scroll = scroll + 1
--// Redraw screen with scroll
render(scroll)
end
end
end
end
end
\ No newline at end of file
......@@ -18,6 +18,7 @@ function program.account.login()
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" Cancel", 19, false, "red", "grey")
base.draw.textr("Login ", 19, false, "cyan", "grey")
base.draw.textc("Register", 19, false, "orange", "grey")
local function drawStatus()
if status then
......@@ -55,8 +56,10 @@ function program.account.login()
write(": ")
password = tostring(base.io.limitRead(32, "*"))
elseif (args[3] >= 2 and args[3] <= 7) and (args[4] == 19) then
base.thread.remove("Login")
base.thread.remove("Account")
base.thread.switch("Home")
elseif (args[3] >= 19 and args[3] <= 30) and (args[4] == 19) then
program.account.register()
elseif (args[3] >= 46 and args[3] <= 50) and (args[4] == 19) then
local status = Discover.User:Login(username, password)
if status then
......@@ -71,7 +74,7 @@ function program.account.login()
base.gui.alert("You have been logged in!")
sleep(0.5)
os.startTimer(1)
base.thread.remove("Login")
base.thread.remove("Account")
base.thread.switch("Home")
else
base.gui.alert("We could not log you in!")
......
--[[
Name: Account -> Register
Description: Register Function
--]]
function program.account.register()
base.screen.colour("white")
program.draw.menubar("Register")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" Cancel", 19, false, "orange", "grey")
base.draw.textr("Register ", 19, false, "cyan", "grey")
local function run()
base.draw.textc("Discover API Registration", 4, false, "grey", "white")
base.draw.texta("Username:", 8, 7, false, "lightGrey", "white")
base.draw.box(8, 36, 8, 1, " ", "cyan", "cyan")
base.draw.texta("Password:", 8, 10, false, "lightGrey", "white")
base.draw.box(8, 36, 11, 1, " ", "cyan", "cyan")
base.draw.texta("Email:", 8, 13, false, "lightGrey", "white")
base.draw.box(8, 36, 14, 1, " ", "cyan", "cyan")
base.draw.textc("Have an account? Login here!", 17, false, "grey", "white")
end
run()
while not Discover.User:LoggedIn() do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Register")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Register", args[3], args[4])
elseif (args[3] >= 8 and args[3] <= 43) and (args[4] == 8) then
base.draw.box(8, 36, 8, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 8)
write(": ")
username = tostring(base.io.limitRead(34))
elseif (args[3] >= 8 and args[3] <= 43) and (args[4] == 11) then
base.draw.box(8, 36, 11, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 11)
write(": ")
password = tostring(base.io.limitRead(34, "*"))
elseif (args[3] >= 8 and args[3] <= 43) and (args[4] == 14) then
base.draw.box(8, 36, 14, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 14)
write(": ")
email = tostring(base.io.limitRead(34))
elseif (args[3] >= 9 and args[3] <= 42) and (args[4] == 17) then
program.account.login()
elseif (args[3] >= 2 and args[3] <= 10) and (args[4] == 19) then
break
elseif (args[3] >= 43 and args[3] <= 50) and (args[4] == 19) then
if username and password and email then
base.draw.textc("Requesting Authentication, Please Wait", 17, false, "lightGrey", "white")
if Discover.User:Register(username, password, email) then
base.gui.alert("Registered. Obtaining authkey, please wait")
sleep(0.5)
local status = Discover.User:Login(username, password)
if status then
base.gui.alert("Logged in!")
sleep(0.8)
base.thread.remove("Account")
base.thread.switch("Home")
else
base.gui.alert(Discover.User:GetField("ErrorMsg"))
sleep(1.5)
base.thread.remove("Account")
base.thread.switch("Home")
end
else
base.draw.box(1, 51, 17, 1, " ", "white", "white")
base.draw.textc(tostring(discover.data.errormsg), 17, false, "lightGrey", "white")
sleep(1)
base.thread.remove("Account")
base.thread.switch("Home")
end
else
base.draw.textc("Please fill in the fields", 17, false, "lightGrey", "white")
end
end
end
end
end
--[[
Name: apps.edit
Desc: Edit apps screen function
--]]
function program.apps.edit()
local appid = Internal.Swap.Edit
if not appid then
base.gui.alert("No App ID Supplied")
sleep(1.5)
base.thread.remove("App:Edit")
if not base.thread.find("Apps") then
base.thread.create("Apps", program.apps.main)
end
base.thread.switch("Apps")
end
base.screen.colour("white")
program.draw.menubar("App: Edit")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" Cancel ", 19, false, "orange", "grey")
base.draw.textr("Edit ", 19, false, "lightBlue", "grey")
base.draw.textc("Setting up auto-fill settings...", 10, false, "red", "white")
local ok, autofill_categories = Discover.Apps:List("categories");
base.draw.box(1, 51, 10, 1, " ", "white", "white")
local function run(scroll)
base.draw.texta("App ID:", 8, 4, false, "lightGrey", "white")
base.draw.texta("> "..Internal.Swap.Edit, 8, 5, false, "red", "white")
base.draw.texta("Name:", 8, 7, false, "lightGrey", "white")
base.draw.box(8, 36, 8, 1, " ", "cyan", "cyan")
base.draw.texta("Description:", 8, 10, false, "lightGrey", "white")
base.draw.box(8, 36, 11, 1, " ", "cyan", "cyan")
base.draw.texta("Category:", 8, 13, false, "lightGrey", "white")
base.draw.box(8, 36, 14, 1, " ", "cyan", "cyan")
base.draw.texta("Status:", 8, 16, false, "lightGrey", "white")
base.draw.box(8, 36, 17, 1, " ", "cyan", "cyan")
end
run(scroll)
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("App: Edit")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("App: Edit", args[3], args[4])
elseif (args[3] >= 2 and args[3] <= 7) and (args[4] == 19) then
if not base.thread.find("Apps") then
base.thread.create("Apps", program.apps.main)
end
Internal.Swap.Edit = nil;
base.thread.remove("App:Edit")
base.thread.switch("Apps")
elseif (args[3] >= 47 and args[3] <= 50) and (args[4] == 19) then
local status = Discover.Apps:Edit( appid, edit_name,edit_desc,edit_cate, edit_stat )
if status then
base.gui.alert("Edited!")
sleep(0.5)
if not base.thread.find("Apps") then
base.thread.create("Apps", program.apps.main)
end
base.thread.remove("App:Edit")
base.thread.switch("Apps")
else
base.gui.alert(Discover.User:GetField("ErrorMsg"))
sleep(1.2)
if not base.thread.find("Apps") then
base.thread.create("Apps", program.apps.main)
end
base.thread.remove("App:Edit")
base.thread.switch("Apps")
end
elseif (args[3] >= 8 and args[3] <= 47) and (args[4] == 8) then
base.draw.box(8, 36, 8, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 8)
write(": ")
edit_name = tostring(base.io.limitRead(34))
elseif (args[3] >= 8 and args[3] <= 47) and (args[4] == 11) then
base.draw.box(8, 36, 11, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 11)
write(": ")
edit_desc = tostring(base.io.limitRead(34))
elseif (args[3] >= 8 and args[3] <= 47) and (args[4] == 14) then
base.draw.box(8, 36, 14, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 14)
write(": ")
edit_cate = tostring(read(_, autofill_categories))
elseif (args[3] >= 8 and args[3] <= 47) and (args[4] == 17) then
base.draw.box(8, 36, 17, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 17)
write(": ")
edit_stat = tostring(read(_, {"public", "private"}))
end
end
end
end
\ No newline at end of file
--[[
Name: apps.main
Desc: App main menu function
--]]
function program.apps.main()
base.screen.colour("white")
program.draw.menubar("Apps: Main")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" Exit", 19, false, "orange", "grey")
base.draw.textr("Search ", 19, false, "lightBlue", "grey")
base.draw.box(2, 24, 11, 1, false, "cyan", "cyan")
base.draw.box(2, 24, 13, 1, false, "cyan", "cyan")
base.draw.box(2, 24, 15, 1, false, "cyan", "cyan")
base.draw.box(2, 24, 17, 1, false, "cyan", "cyan")
base.draw.box(27, 24, 11, 1, false, "cyan", "cyan")
base.draw.box(27, 24, 13, 1, false, "red", "red")
base.draw.box(27, 24, 15, 1, false, "red", "red")
base.draw.box(27, 24, 17, 1, false, "orange", "orange")
base.draw.texta("Apps: Newest", 3, 11, false, "white", "cyan")
base.draw.texta("Apps: Categories", 3, 13, false, "white", "cyan")
base.draw.texta("Apps: Versions", 3, 15, false, "white", "cyan")
base.draw.texta("Apps: Packages", 3, 17, false, "white", "cyan")
base.draw.texta("Apps: Downloads", 28, 11, false, "white", "cyan")
base.draw.texta("Apps: Owned", 28, 13, false, "white", "red")
base.draw.texta("Apps: Upload", 28, 15, false, "white", "red")
base.draw.texta("Apps: Moderation", 28, 17, false, "white", "orange")
local text = "Main app store menu, items in cyan are generic, items in red are for being logged in! All account management for apps is found in red. Orange items are for moderators to check apps. To search all the apps, click thes search button in the bottom right corner.";
for k,v in ipairs(base.data.wordwrap(text, 49)) do base.draw.textl(" " .. tostring(v), k+3, false, "lightGrey", "white"); end
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Apps: Main")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Apps: Main", args[3], args[4])
elseif (args[3] >= 2 and args[3] <= 5) and args[4] == 19 then
base.thread.remove("Apps")
base.thread.switch("Home")
elseif (args[3] >= 45 and args[3] <= 50) and args[4] == 19 then
if not base.thread.find("App:Search") then
base.thread.create("App:Search", program.apps.search)
end
base.thread.switch("App:Search")
elseif (args[3] >= 2 and args[3] <= 24) and (args[4] == 11) then
program.apps.all()
program.apps.main()
elseif (args[3] >= 2 and args[3] <= 24) and (args[4] == 13) then
program.apps.categories()
program.apps.main()
elseif (args[3] >= 2 and args[3] <= 24) and (args[4] == 15) then
program.apps.versions()
program.apps.main()
elseif (args[3] >= 2 and args[3] <= 24) and (args[4] == 17) then
program.apps.packages()
program.apps.main()
elseif (args[3] >= 27 and args[3] <= 50) and (args[4] == 11) then
program.apps.downloads()
program.apps.main()
elseif (args[3] >= 27 and args[3] <= 50) and (args[4] == 13) then
if not Discover.User:LoggedIn() then
base.gui.alert("You need to be logged in to view this!");
sleep(1);
program.apps.main();
end
program.apps.owned()
program.apps.main()
elseif (args[3] >= 27 and args[3] <= 50) and (args[4] == 15) then
if not Discover.User:LoggedIn() then
base.gui.alert("You need to be logged in to view this!");
sleep(1);
program.apps.main();
end
program.apps.upload()
program.apps.main()
elseif (args[3] >= 27 and args[3] <= 50) and (args[4] == 17) then
if not Discover.User:LoggedIn() then
base.gui.alert("You need to be logged in to view this!");
sleep(1);
program.apps.main();
end
if Discover.User:GetRank() == "Moderator" then
--program.apps.moderate()
base.gui.alert("This feature is still being developed!");
sleep(1);
program.apps.main()
else
base.gui.alert("You need to be a moderator to view this!");
sleep(1);
program.apps.main();
end
end
end
end
end
\ No newline at end of file
......@@ -13,7 +13,7 @@ function program.apps.owned()
if not base.thread.find("Apps") then
base.thread.create("Apps", program.apps.all)
end
base.thread.remove("Owned")
base.thread.remove("Apps:Owned")
base.thread.switch("Apps")
end
......@@ -56,14 +56,14 @@ function program.apps.owned()
-- Do update
local appid = appslist[args[4] - 3 + scroll].id
Internal.Swap.Edit = appid
base.thread.create("Update", program.apps.update)
base.thread.switch("Update")
base.thread.create("App:Update", program.apps.update)
base.thread.switch("App:Update")
elseif (args[3] >= 44 and args[3] <= 47) and (args[4] >= 4 and args[4] <= 17) then
-- Do Edit
local appid = appslist[args[4] - 3 + scroll].id
Internal.Swap.Edit = appid
base.thread.create("Edit", program.apps.edit)
base.thread.switch("Edit")
base.thread.create("App:Edit", program.apps.edit)
base.thread.switch("App:Edit")
elseif (args[3] == 50) and (args[4] >= 4 and args[4] <= 17) then
-- Do Delete
local appid = appslist[args[4] - 3 + scroll].id
......
--[[
Name: apps.downloads
Name: apps.search
Desc: App search screen function
--]]
\ No newline at end of file
--]]
function program.apps.search(searchterm)
if searchterm == "mouse_up" then
searchterm = nil
end
base.screen.colour("white")
program.draw.menubar("Apps: Search")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.box(3, 47, 19, 1, " ", "lightGrey", "lightGrey")
base.draw.textc("Click here to search", 19, false, "white", "lightGrey")
local ok, appslist = Discover.Apps:List("apps")
local apps = appslist
local scroll = 0
if searchterm then
apps = {}
for k,v in ipairs(appslist) do
if string.lower(v.name):match(searchterm:lower()) then
table.insert(apps, v)
end
end
end
local function run(scroll)
if #apps > 0 then
for i=1, 14 do
if (scroll + i) <= #apps then
base.draw.box(1, 51, i+3, 1, " ", "white", "white")
base.draw.texta(tostring(i+scroll) .. ": " .. apps[i+scroll].name, 1, i+3, false, "grey", "white")
end
end
else
base.draw.textc("No apps match your search term", 10, false, "red", "white")
end
end
run(scroll)
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Apps: Search")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Apps: Search", args[3], args[4])
elseif (args[3] >= 3 and args[3] <= 49) and (args[4] == 19) then
base.draw.box(3, 47, 19, 1, " ", "lightGrey", "lightGrey")
base.colour.set("orange", "lightGrey")
term.setCursorPos(3, 19)
write(": ")
local keyterm = tostring(base.io.limitRead(45))
term.setCursorPos(1,4)
program.apps.search(keyterm)
elseif (args[3] >= 1 and args[3] <= 51) and (args[4] >= 4 and args[4] <= 17) then
local curid = args[4] - 3 + scroll
if curid > 0 and curid <= #apps then
local tname = "View"..tostring(apps[curid].id)
base.thread.create(tname, program.apps.view)
Internal.Swap.Viewer[1] = apps[curid].id
Internal.Swap.Viewer[2] = appslist
base.thread.switch(tname)
end
end
elseif args[1] == "mouse_scroll" then
if args[2] == -1 then
if scroll > 0 then
scroll = scroll - 1
run(scroll)
end
elseif args[2] == 1 then
if scroll + 14 < #apps then
scroll = scroll + 1
run(scroll)
end
end
end
end
end
\ No newline at end of file
--[[
Name: apps.update
Desc: Update screen function
--]]
function program.apps.update()
if not Internal.Swap.Edit then
upd_stat = nil
upd_path = nil
upd_vers = nil
upd_path_content = nil
Internal.Swap.Edit = nil
base.gui.alert("No update ID given!")
base.thread.remove("Update")
if not base.thread.find("Apps") then
base.thread.create("Apps", program.apps.main)
end
base.thread.switch("Apps")
end
base.screen.colour("white")
program.draw.menubar("Update")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" Cancel", 19, false, "orange", "grey")
base.draw.textr("Update ", 19, false, "cyan", "grey")
base.draw.textc("Setting up auto-fill settings...", 10, false, "red", "white")
local ok, autofill_versions = Discover.Apps:List("versions");
local ok, autofill_categories = Discover.Apps:List("categories");
base.draw.box(1, 51, 10, 1, " ", "white", "white")
local function exit()
upd_stat = nil
upd_path = nil
upd_vers = nil
upd_path_content = nil
Internal.Swap.Edit = nil
base.thread.remove("Update")
if not base.thread.find("Apps") then
base.thread.create("Apps", program.apps.main)
end
base.thread.switch("Apps")
end
local use_file = true
local use_paste = false;
local function input_type()
if use_file then
base.draw.box(8, 27, 15, 1, " ", "white", "white")
base.draw.texta("File Path:", 8, 15, false, "lightGrey", "white")
base.draw.box(8, 27, 16, 1, " ", "cyan", "cyan")
base.draw.texta(" Toggle ", 36, 16, false, "white", "orange")
elseif use_paste then
base.draw.box(8, 27, 15, 1, " ", "white", "white")
base.draw.texta("Pastebin ID:", 8, 15, false, "lightGrey", "white")
base.draw.box(8, 27, 16, 1, " ", "cyan", "cyan")
base.draw.texta(" Toggle ", 36, 16, false, "white", "orange")
end
end
input_type()
local function run()
base.draw.textc("Please follow on-screen instructions!", 4, false, "cyan", "white")
base.draw.texta("App ID:", 8, 6, false, "lightGrey", "white")
if Internal.Swap.Edit then
base.draw.texta("> "..Internal.Swap.Edit, 8, 7, false, "red", "white")
else
base.draw.box(8, 36, 7, 1, " ", "cyan", "cyan")
end
base.draw.texta("Version:", 8, 9, false, "lightGrey", "white")
base.draw.box(8, 36, 10, 1, " ", "cyan", "cyan")
base.draw.texta("Status:", 8, 12, false, "lightGrey", "white")
base.draw.box(8, 36, 13, 1, " ", "cyan", "cyan")
end
run()
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Update")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Update", args[3], args[4])
elseif (args[3] >= 36 and args[3] <= 43) and (args[4] == 16) then
if use_file then
use_paste = true
use_file = false
elseif use_paste then
use_file = true
use_paste = false
end
input_type()
elseif (args[3] >= 8 and args[3] <= 43) and (args[4] == 7) then
base.draw.box(1, 51, 7, 1, " ", "white", "white")
base.draw.box(8, 36, 7, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 7)
write(": ")
Internal.Swap.Edit = tostring(base.io.limitRead(34))
elseif (args[3] >= 8 and args[3] <= 43) and (args[4] == 10) then
base.draw.box(1, 51, 10, 1, " ", "white", "white")
base.draw.box(8, 36, 10, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 10)
write(": ")
upd_vers = tostring(read(_, autofill_versions))
elseif (args[3] >= 8 and args[3] <= 43) and (args[4] == 13) then
base.draw.box(1, 51, 13, 1, " ", "white", "white")
base.draw.box(8, 36, 13, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 13)
write(": ")
upd_stat = tostring(read(_, {"public", "private"}))
elseif (args[3] >= 8 and args[3] <= 43) and (args[4] == 16) then
base.draw.box(8, 27, 16, 1, " ", "white", "white")
base.draw.box(8, 27, 16, 1, " ", "cyan", "cyan")
base.colour.set("white", "cyan")
term.setCursorPos(8, 16)
write(": ")
upd_path = tostring(read(_, autofill_categories))
elseif (args[3] >= 45 and args[3] <= 50) and (args[4] == 19) then
if Internal.Swap.Edit and upd_vers and upd_stat and upd_path then
if use_paste then
shell.run("pastebin get " .. upd_path .. " .temp")
local d = fs.open(".temp", "r")
upd_path_content = d.readAll()
d.close()
fs.delete(".temp")
elseif use_file then
if not fs.exists(upd_path) then
base.draw.box(1, 51, 18, 1, " ", "white", "white")
base.draw.textc("No file found in the given path", 18, false, "red", "white")