SHOW:
|
|
- or go back to the newest paste.
1 | - | -- Plastic Beta v0.12 |
1 | + | |
2 | - | -- [0.12] Bug fixes |
2 | + | |
3 | - | -- [0.11] Support for latest version of OpenPeripheral |
3 | + | |
4 | - | -- A Google Glass like OS/Programs/Whatever you want to call it |
4 | + | |
5 | - | -- That runs on Terminal Glasses in OpenPeripheral |
5 | + | |
6 | - | -- Just stick in a computer with a Terminal Glass Peripheral and run it! |
6 | + | |
7 | - | -- Have fun using it! |
7 | + | |
8 | - | -- Feel free to use my code in anyway you want! |
8 | + | |
9 | - | -- HOWEVER as stated by the policies of the APIs I used |
9 | + | if (peripheral.getType(v) == "openperipheral_bridge") then |
10 | - | -- Please do not use my API keys. Just register for them |
10 | + | |
11 | - | -- Yourself! It's free and World Weather Online is instant! |
11 | + | |
12 | elseif (peripheral.getType(v) == "sensor") and (not worldSensor) then | |
13 | - | local tArgs = {...} |
13 | + | |
14 | if not (worldSensor.getSensorName() == "worldCard") then | |
15 | - | local function searchArgs(text) |
15 | + | |
16 | - | for k,v in pairs(tArgs) do |
16 | + | |
17 | - | if v == text then return true end |
17 | + | |
18 | end | |
19 | - | return false |
19 | + | |
20 | if not plastic then print("Could not find Glass Bridge!") error() end | |
21 | ||
22 | - | if not http then print("Sorry, Plastic requires HTTP to run!") return end |
22 | + | |
23 | local function reliableSleep(time) | |
24 | - | local plasticInstallation = shell.getRunningProgram() |
24 | + | |
25 | end | |
26 | - | -- Find glass bridge |
26 | + | |
27 | local gColors = {} | |
28 | gColors.red = 0xff3333 | |
29 | gColors.blue = 0x7dd2e4 | |
30 | gColors.yellow = 0xffff4d | |
31 | gColors.green = 0x4dff4d | |
32 | gColors.gray = 0xe0e0e0 | |
33 | gColors.textGray = 0x818181 | |
34 | gColors.text = 0x5a5a5a | |
35 | - | if (peripheral.getType(v) == "openperipheral_glassesbridge") then |
35 | + | |
36 | ||
37 | while true do | |
38 | ||
39 | plastic.clear() | |
40 | local mainBox = plastic.addBox(20, 20, 1, 48, gColors.gray, 0.7) | |
41 | local outlineT = plastic.addBox(18,18,2,2,gColors.blue,0.7) | |
42 | local outlineB = plastic.addBox(18,68,2,2,gColors.blue,0.7) | |
43 | ||
44 | mainBox.setWidth(136) | |
45 | outlineT.setWidth(140) | |
46 | outlineB.setWidth(140) | |
47 | mainBox.setHeight(48) | |
48 | - | local rootApps = nil |
48 | + | |
49 | local header = plastic.addText(75, 25, "Wiadomosc", gColors.textGray) | |
50 | - | if searchArgs("root") then |
50 | + | local secondText = plastic.addText(50, 40, "Szybko do domu!", gColors.blue) |
51 | - | rootApps = {} |
51 | + | local forthText = plastic.addText(40, 55, "Bo bedzie zle", gColors.text) |
52 | - | if term.isColor() then |
52 | + | |
53 | - | term.setTextColor(colors.red) |
53 | + | |
54 | secondText.setZ(5) | |
55 | - | print("-- [[ ROOT MODE ENABLED ]] --") |
55 | + | |
56 | - | print("PLASTIC MAY BECOME UNSTABLE AND") |
56 | + | plastic.sync() |
57 | - | print("MAY CRASH. USE AT YOUR OWN RISK!") |
57 | + | sleep(2) |
58 | - | if fs.isDir("/plasticApps") then |
58 | + | |
59 | end |