Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Bee-Dex Uncolored Computer version
- -- Other versions, along with other projects, found at pastebin.com/u/NickM13
- beeList = {} -- {Name, {{Path1}, {Path2}}, Available{Princesses, Drones}, Description}
- beeCount = 0
- version = "NC 1.0"
- width, height = term.getSize()
- local function addBee(name, path, description)
- beeCount = beeCount + 1
- beeList[beeCount] = {}
- beeList[beeCount].name = name
- beeList[beeCount].path = path
- beeList[beeCount].available = {}
- beeList[beeCount].available.princess = 0
- beeList[beeCount].available.drone = 0
- if description then
- beeList[beeCount].description = description
- else
- beeList[beeCount].description = ""
- end
- end
- -- Mundane Bees
- addBee("Water", {{"Mundane"}})
- addBee("Rocky", {{"Mundane"}})
- addBee("Embittered", {{"Mundane"}})
- addBee("Marbled", {{"Mundane"}})
- -- Forestry Bees
- -- Common Branch
- addBee("Forest", {{"Mundane"}})
- addBee("Meadows", {{"Mundane"}})
- addBee("Common", {{"Forest", "Meadows", "Modest", "Tropical", "Wintry", "Marshy", "Water", "Rocky", "Embittered", "Marbled", "Valiant"}, {"Forest", "Meadows", "Modest", "Tropical", "Wintry", "Marshy", "Water", "Rocky", "Embittered", "Marbled", "Valiant"}, 0.15})
- addBee("Cultivated", {{"Common"}, {"Forest", "Meadows", "Modest", "Tropical", "Wintry", "Marshy", "Water", "Rocky", "Embittered", "Marbled", "Valiant"}, 0.12})
- -- Noble Branch
- addBee("Noble", {{"Common"}, {"Cultivated"}, 0.10})
- addBee("Majestic", {{"Noble"}, {"Cultivated"}, 0.08})
- addBee("Imperial", {{"Noble"}, {"Majestic"}, 0.08})
- -- Industrious Branch
- addBee("Diligent", {{"Common"}, {"Cultivated"}, 0.10})
- addBee("Unweary", {{"Diligent"}, {"Cultivated"}, 0.08})
- addBee("Industrious", {{"Diligent"}, {"Unweary"}, 0.08})
- -- Heroic Branch
- addBee("Steadfast", {{"Mundane"}})
- addBee("Valiant", {{"Mundane"}})
- addBee("Heroic", {{"Steadfast"}, {"Valiant"}, 0.06})
- -- Infernal Branch
- addBee("Sinister", {{"Modest", "Tropical"}, {"Cultivated"}, 0.60})
- addBee("Fiendish", {{"Sinister"}, {"Cultivated", "Modest", "Tropical"}, 0.40})
- addBee("Demonic", {{"Sinister"}, {"Fiendish"}, 0.25})
- -- Austere Branch
- addBee("Modest", {{"Mundane"}})
- addBee("Frugal", {{"Modest"}, {"Sinister", "Fiendish"}, 0.13}, "Sinister=16%, Fiendish=10%") -- Sinister=16%, Fiendish=10%
- addBee("Austere", {{"Modest"}, {"Frugal"}, 0.08})
- -- End Branch
- addBee("Ender", {{"Mundane"}})
- -- Tropical Branch
- addBee("Tropical", {{"Mundane"}})
- addBee("Exotic", {{"Austere"}, {"Tropical"}, 0.12})
- addBee("Edenic", {{"Exotic"}, {"Tropical"}, 0.08})
- -- Frozen Branch
- addBee("Wintry", {{"Mundane"}})
- addBee("Icy", {{"Industrious"}, {"Wintry"}, 0.12}, "Also Known As Froffy")
- addBee("Glacial", {{"Icy"}, {"Wintry"}, 0.08})
- addBee("Frigid", {{"Wintry"}, {"Diligent"}, 0.10}, "Extra Bees Mod")
- addBee("Absolute", {{"Ocean"}, {"Frigid"}, 0.08}, "Extra Bees Mod")
- -- Festive Branch
- addBee("Leporine", {{"Meadows"}, {"Forest"}, 0.10}, "Only around Easter (April 6-15)")
- addBee("Merry", {{"Wintry"}, {"Forest"}, 0.10}, "Only around Christmas (December 21-27)")
- addBee("Tipsy", {{"Wintry"}, {"Meadows"}, 0.10}, "Only around New Year's Even (Dec 27 - Jan 2)")
- addBee("Celebratory", {{"Austere"}, {"Excited"}, 0.05}, "Extra Bees Mod")
- -- Agrarian Branch
- addBee("Rural", {{"Meadows"}, {"Diligent"}, 0.12})
- addBee("Farmed", {{"Cultivated"}, {"Rural"}, 0.10}, "Extra Bees Mod")
- -- Boggy Branch
- addBee("Marshy", {{"Mundane"}})
- addBee("Swamp", {{"Common"}, {"Marshy"}, 0.10}, "Extra Bees Mod")
- addBee("Boggy", {{"Swamp"}, {"Marshy"}, 0.08}, "Extra Bees Mod")
- addBee("Fungal", {{"Boggy"}, {"Swamp"}, 0.08}, "Extra Bees Mod")
- local function say(msg)
- io.write(msg)
- end
- local function sayln(msg)
- say(msg)
- x, y = term.getCursorPos()
- term.setCursorPos(1, y + 1)
- end
- local function clear()
- term.clear()
- term.setCursorPos(1, 1)
- end
- commandList = {}
- commandCount = 0
- local function addCommand(command, action, description)
- commandCount = commandCount + 1
- commandList[commandCount] = {}
- commandList[commandCount].command = command
- commandList[commandCount].action = action
- commandList[commandCount].description = description
- end
- local function printHelp()
- sayln("Available commands:\n")
- for i=1, commandCount do
- sayln(commandList[i].command..": "..commandList[i].description)
- end
- end
- local function showBees(bee)
- for i=1, beeCount do
- if beeList[i].name == bee then
- sayln("Name: "..beeList[i].name)
- say("Partner 1: ")
- for j=1, table.getn(beeList[i].path[1]) do
- say(beeList[i].path[1][j])
- if j < table.getn(beeList[i].path[1]) then
- say(",")
- end
- end
- sayln("")
- if table.getn(beeList[i].path) >= 3 then
- say("Partner 2: ")
- for j=1, table.getn(beeList[i].path[2]) do
- say(beeList[i].path[2][j])
- if j < table.getn(beeList[i].path[2]) then
- say(",")
- end
- end
- sayln("")
- end
- if table.getn(beeList[i].path) >= 3 then
- say("Chance: ")
- say((beeList[i].path[3]*100))
- sayln("%")
- end
- sayln("Princesses: "..beeList[i].available.princess)
- sayln("Drones: "..beeList[i].available.drone)
- sayln("Description: "..beeList[i].description)
- end
- end
- end
- local function pathBees(bee)
- for i=1, beeCount do
- if beeList[i].name == bee then
- say("Partner 1: ")
- for j=1, table.getn(beeList[i].path[1]) do
- say(beeList[i].path[1][j])
- if j < table.getn(beeList[i].path[1]) then
- say(",")
- end
- end
- sayln("")
- if table.getn(beeList[i].path) >= 3 then
- say("Partner 2: ")
- for j=1, table.getn(beeList[i].path[2]) do
- say(beeList[i].path[2][j])
- if j < table.getn(beeList[i].path[2]) then
- say(",")
- end
- end
- sayln("")
- end
- if table.getn(beeList[i].path) >= 3 then
- say("Chance: ")
- say((beeList[i].path[3]*100))
- sayln("%")
- end
- end
- end
- end
- running = true
- addCommand("help", printHelp, "Displays functions and what they do.")
- addCommand("info", showBees, "Shows info on bee.")
- addCommand("path", pathBees, "Shows only geneology of bee.")
- addCommand("exit", function() running = false end, "Exits program.")
- clear()
- sayln("Welcome to Bee-Dex OS")
- sayln("Loaded version: "..version)
- sayln("Written by NickM13")
- while running do
- term.setCursorPos(1, height)
- say("BD>")
- local command = io.read()
- args = {}
- for arg in command:gmatch("%S+") do
- table.insert(args, arg)
- end
- clear()
- local used = false
- for i=1, table.getn(commandList) do
- if args[1] == commandList[i].command then
- commandList[i].action(args[2], args[3], args[4], args[5])
- used = true
- break
- end
- end
- if used == false then
- sayln("Unknown command entered.")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement