Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --white 1
- --lightGray 256
- --gray 128
- --black 32768
- --brown 4096
- --red 16384
- --orange 2
- --yellow 16
- --lime 32
- --green 8192
- --cyan 512
- --lightBlue 8
- --blue 2048
- --purple 1024
- --magenta 4
- --pink 64
- local name = "Terminal" --The display name of this terminal
- local port = 1 --The port to this terminal
- local serverPort = 0 --The port to the server for this terminal
- local side = "top" --The location of the modem
- local guiColor = colors.green
- local logs = {
- {
- "log1",
- "04.08.2020",
- "Updated the firmware of the terminal.",
- "This should allow me to log the happenings of the vault from here on out."
- },
- {
- "log2",
- "04.10.2020",
- "Rewrote a lot of the software to allow the terminals to connect to a server."
- },
- {
- "log3",
- "11.12.2025",
- "Working on updating some features to allow the server to send a signal to a connected terminal",
- }
- }
- local menu = require("menu")
- local client = require("client")
- if not menu.loadMenus() then
- print("Failed to load menus, creating defaults")
- local logMenu = {}
- for index = 1, #logs do
- local value = logs[index]
- local key = ""
- local v1 = ""
- local v2 = ""
- for nameCount = 1, #value do
- if nameCount == 1 then key = value[nameCount]
- elseif nameCount == 2 then v1 = value[nameCount]
- else v2 = v2..value[nameCount].." " end
- end
- menu.newText(key, v1, v2)
- logMenu[#logMenu +1] = {"read "..key, v1}
- end
- logMenu[#logMenu +1] = {"open start", "Back"}
- -- All toggle and trigger options need a target port for the second argument
- menu.newMenu("start", "Overseer's Terminal", {
- --To add a bundled option: {colors.color, "Label", inverted}
- {"open ".."tools", "Management"},
- {"open ".."people", "Residents"},
- {"open ".."log", "Logs"}
- })
- menu.newMenu("tools", "Vault Management", {
- {"toggle 1 "..colors.white, "Lights", true},
- {"trigger 1 "..colors.red, "Overseer's Tunnel", false},
- {"open ".."start", "Back"}
- })
- menu.newMenu("people", "Residents", {
- {"read ".."resElrol", "Elrol_Arrowsend"},
- {"read ".."resMage", "_BlackMage_"},
- {"read ".."resToby", "BaconEater_Toby"},
- {"open ".."start", "Back"}
- })
- menu.newMenu("log", "Logs", logMenu)
- menu.newText("resElrol", "Elrol_Arrowsend", "Overseer of Vault 404")
- menu.newText("resMage", "_BlackMage_", "Manipulator of worlds")
- menu.newText("resToby", "BaconEater_Toby", "Apprentice to _BlackMage_")
- menu.saveMenus()
- else
- print("Menus Loadded")
- end
- client.init(name, port, serverPort, side, guiColor)
Advertisement
Add Comment
Please, Sign In to add comment