im doing the program again, its like a encyclophedia, as you guys can see on the code below, each planet takes a lot of lines, we have like 15 bodies on the solar system and 4-space mod now :D/> i was wandering if there is a 'shorter' way to code this:
monitor = peripheral.wrap("top")
monitor.setTextScale(0.5)
while true do
term.clear()
term.setCursorPos(1,1)
print("REAL LIFE SOLAR PLANET INFO - by Wizard")
print("")
print("Type the celestial body name (no Caps):")
local input = read()
if input == "earth" then
term.redirect(monitor)
monitor.clear()
monitor.setCursorPos(10,20)
monitor.write("EARHT")
monitor.setCursorPos(4,21)
monitor.write("(Terrestrial Planet)")
monitor.setTextColor(colors.cyan)
monitor.setCursorPos(30,3)
monitor.write("ORBITAL CHARACTERISTICS")
monitor.setCursorPos(30,9)
monitor.write("PHYSICAL CHARACTERISTICS")
monitor.setCursorPos(30,15)
monitor.write("ATMOSPHERE")
monitor.setTextColor(colors.white)
monitor.setCursorPos(30,4)
monitor.write("Aphelion: 152.098.232 Km")
monitor.setCursorPos(30,5)
monitor.write("Perihelion: 147.098.290 Km")
monitor.setCursorPos(30,6)
monitor.write("Orbital Period: 365 days")
monitor.setCursorPos(30,7)
monitor.write("Satellite: YES (1)")
monitor.setCursorPos(30,10)
monitor.write("Mean Radius: 6.371 Km")
monitor.setCursorPos(30,11)
monitor.write("Surface Gravity: 1g (100%)")
monitor.setCursorPos(30,12)
monitor.write("Rotation Period: 24h")
monitor.setCursorPos(30,13)
monitor.write("Mean Temperature: 15 C")
monitor.setCursorPos(30,16)
monitor.write("Nitrogen 78%, Oxygen 21%")
monitor.setCursorPos(30,17)
monitor.write("Water Vapor 1%")
monitor.setCursorPos(30,18)
monitor.write("Traces of Argon and CO2")
image = paintutils.loadImage("earth.nfp")
paintutils.drawImage(image,2,5)
term.redirect(term.native())
else
end
end
http://pastebin.com/mL7ugEt5