Skip to content

Commit c0d09d5

Browse files
added support for omiZone
1 parent ad316ae commit c0d09d5

File tree

3 files changed

+114
-97
lines changed

3 files changed

+114
-97
lines changed

main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
import time
44
import programs
5-
65
#-----FUNCTIONS
76
def clearscreen():
87
os.system('cls')

omizone.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from ursina import *
2+
from ursina.prefabs.first_person_controller import FirstPersonController
3+
import os
4+
import time
5+
import programs
6+
os.system('cls')
7+
8+
print("You are now leaving omicronOS. Press Shift+Q to close the application.")
9+
app = Ursina()
10+
11+
stepper = True
12+
13+
player = FirstPersonController()
14+
player.position=(-8, 0.2, 8)
15+
player.cursor.color=(color.black)
16+
17+
def input(key):
18+
if key == 'escape':
19+
app.quit()
20+
21+
def makeText():
22+
global app
23+
global stepper
24+
text = Text('FUCK ME')
25+
stepper=False
26+
app.quit()
27+
28+
place = Entity(model='level', collider='mesh', texture='greyasphalt', scale=0.02, texture_scale=(2, 2))
29+
cube = Entity(model='cube', collider='box', scale=2, on_click=makeText, texture='grass')
30+
camera.clip_plane_far=20
31+
32+
app.run()

programs.py

Lines changed: 82 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
import turtle
55
import keyboard
6+
import subprocess
67

78
# -----FUNCTIONS
89

@@ -22,7 +23,10 @@ def write():
2223
filenamed = "files/" + namethefile + ".txt"
2324
clear()
2425
outfile = open(filenamed, 'a')
25-
outfile.write(input("Enter your text here: "))
26+
lines = int(input("Enter the number of lines needed: "))
27+
for i in range(lines):
28+
outfile.write(input("Enter your text here: "))
29+
outfile.write("\n")
2630
outfile.close()
2731
print('text successfully written to' + str(filenamed))
2832

@@ -74,6 +78,10 @@ def calculatoring(oper, x, y):
7478
time.sleep(1)
7579
calc()
7680

81+
def systemaccess():
82+
cmd = input("(" + os.name + ")cmd:")
83+
os.system(cmd)
84+
filler = input('Enter To Continue. . .')
7785

7886
def calc():
7987
# the worst calculator ever
@@ -95,16 +103,13 @@ def calc():
95103
def checkid():
96104
clear()
97105
print("""
98-
99-
_______ __ __ ___ _______ ______ _______ __ _
100-
| || |_| || | | || _ | | || | | |
101-
| _ || || | | || | || | _ || |_| |
102-
| | | || || | | || |_| \ | | | || |
103-
| |_| || || | | _|| __ || |_| || _ |
104-
| || ||_|| || | | |_ | | | || || | | |
105-
|_______||_| |_||___| |_______||___| |_||_______||_| |__|
106-
107-
106+
██████╗ ███╗ ███╗██╗ ██████╗██████╗ ██████╗ ███╗ ██╗ ██████╗ ███████╗
107+
██╔═══██╗████╗ ████║██║██╔════╝██╔══██╗██╔═══██╗████╗ ██║██╔═══██╗██╔════╝
108+
██║ ██║██╔████╔██║██║██║ ██████╔╝██║ ██║██╔██╗ ██║██║ ██║███████╗
109+
██║ ██║██║╚██╔╝██║██║██║ ██╔══██╗██║ ██║██║╚██╗██║██║ ██║╚════██║
110+
╚██████╔╝██║ ╚═╝ ██║██║╚██████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╔╝███████║
111+
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
112+
108113
""")
109114
# numeric id check the program runs on startup
110115
id = input("enter your six-digit numeric id: ")
@@ -125,30 +130,41 @@ def runprogram():
125130
# where the main filesystem browser goes. holds the executions for all the programs
126131
clear()
127132
print("""
128-
129-
_______ __ __ ___ _______ ______ _______ __ _
130-
| || |_| || | | || _ | | || | | |
131-
| _ || || | | || | || | _ || |_| |
132-
| | | || || | | || |_||_ | | | || |
133-
| |_| || || | | _|| __ || |_| || _ |
134-
| || ||_|| || | | |_ | | | || || | | |
135-
|_______||_| |_||___| |_______||___| |_||_______||_| |__|
136-
137-
133+
██████╗ ███╗ ███╗██╗ ██████╗██████╗ ██████╗ ███╗ ██╗ ██████╗ ███████╗
134+
██╔═══██╗████╗ ████║██║██╔════╝██╔══██╗██╔═══██╗████╗ ██║██╔═══██╗██╔════╝
135+
██║ ██║██╔████╔██║██║██║ ██████╔╝██║ ██║██╔██╗ ██║██║ ██║███████╗
136+
██║ ██║██║╚██╔╝██║██║██║ ██╔══██╗██║ ██║██║╚██╗██║██║ ██║╚════██║
137+
╚██████╔╝██║ ╚═╝ ██║██║╚██████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╔╝███████║
138+
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
139+
138140
""")
139-
print("""
141+
print("""omicronOSv0.2.1
142+
managed by L.Kaminski, 2023
143+
144+
Type 'help' for a list of commands.""")
145+
command = input("OMI:> ")
146+
# MAKE ABSOLUTE SURE THAT THE = are DOUBLED, like this: ==. otherwise it won't work
147+
if command == "calc":
148+
calc()
149+
clear()
150+
runprogram()
151+
elif command == "help":
152+
print("""
140153
calc - Runs basic calculator with addition, subtraction, multiplication and division.
141154
tencheck - Runs basic check for if a number is over ten, good for checking language version validity
142155
write - Write to a new or existing text file.
143156
read - Read from an existing text file.
144-
turtle - a small Python turtle demo.
157+
omizone - Activate the omiZone, a 3D interactive space within omicronOS
158+
sysacc - run a single system command on your operating system's default CMD.
145159
logout - Log out of the current user profile
146-
shutdown - Shut down the machine.
160+
exit - Shut down the machine.
147161
""")
148-
command = input("OMI:> ")
149-
# MAKE ABSOLUTE SURE THAT THE = are DOUBLED, like this: ==. otherwise it won't work
150-
if command == "calc":
151-
calc()
162+
moarfiller = input("Enter to Continue. . .")
163+
clear()
164+
runprogram()
165+
elif command == "sysacc":
166+
clear()
167+
systemaccess()
152168
clear()
153169
runprogram()
154170
elif command == "tencheck":
@@ -163,12 +179,15 @@ def runprogram():
163179
elif command == "read":
164180
read()
165181
runprogram()
166-
elif command == "turtle":
167-
turtlePower()
182+
elif command == "omizone":
183+
subprocess.run(["python", r"C:\Users\alota\OneDrive\Documents\OmicronOS-main\omizone.py"])
168184
clear()
169185
runprogram()
170-
elif command == "shutdown":
171-
print("Closing Dobel Filesystem...")
186+
elif command == "exit":
187+
clear()
188+
print("Closing OmicronOS Runtime. . .")
189+
time.sleep(0.2)
190+
print("Checking Save Validity. . .")
172191
time.sleep(1)
173192
print("Shutting Down...")
174193
time.sleep(0.5)
@@ -178,16 +197,13 @@ def runprogram():
178197
time.sleep(1)
179198
clear()
180199
print("""
181-
182-
_______ __ __ ___ _______ ______ _______ __ _
183-
| || |_| || | | || _ | | || | | |
184-
| _ || || | | || | || | _ || |_| |
185-
| | | || || | | || |_||_ | | | || |
186-
| |_| || || | | _|| __ || |_| || _ |
187-
| || ||_|| || | | |_ | | | || || | | |
188-
|_______||_| |_||___| |_______||___| |_||_______||_| |__|
189-
190-
200+
██████╗ ███╗ ███╗██╗ ██████╗██████╗ ██████╗ ███╗ ██╗ ██████╗ ███████╗
201+
██╔═══██╗████╗ ████║██║██╔════╝██╔══██╗██╔═══██╗████╗ ██║██╔═══██╗██╔════╝
202+
██║ ██║██╔████╔██║██║██║ ██████╔╝██║ ██║██╔██╗ ██║██║ ██║███████╗
203+
██║ ██║██║╚██╔╝██║██║██║ ██╔══██╗██║ ██║██║╚██╗██║██║ ██║╚════██║
204+
╚██████╔╝██║ ╚═╝ ██║██║╚██████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╔╝███████║
205+
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
206+
191207
""")
192208
checkid()
193209
else:
@@ -196,55 +212,42 @@ def runprogram():
196212
runprogram()
197213

198214

215+
216+
217+
218+
219+
220+
199221
def loadasset():
200222
# flashy loading screen
201223
clear()
202224
print("""
203-
204-
_______ __ __ ___ _______ ______ _______ __ _
205-
| || |_| || | | || _ | | || | | |
206-
| _ || || | | || | || | _ || |_| |
207-
| | | || || | | || |_||_ | | | || |
208-
| |_| || || | | _|| __ || |_| || _ |
209-
| || ||_|| || | | |_ | | | || || | | |
210-
|_______||_| |_||___| |_______||___| |_||_______||_| |__|
211-
212-
225+
██████╗ ███╗ ███╗██╗ ██████╗██████╗ ██████╗ ███╗ ██╗ ██████╗ ███████╗
226+
██╔═══██╗████╗ ████║██║██╔════╝██╔══██╗██╔═══██╗████╗ ██║██╔═══██╗██╔════╝
227+
██║ ██║██╔████╔██║██║██║ ██████╔╝██║ ██║██╔██╗ ██║██║ ██║███████╗
228+
██║ ██║██║╚██╔╝██║██║██║ ██╔══██╗██║ ██║██║╚██╗██║██║ ██║╚════██║
229+
╚██████╔╝██║ ╚═╝ ██║██║╚██████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╔╝███████║
230+
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
231+
213232
""")
214233
print("Welcome to OMICRON")
215-
time.sleep(2)
216234
print("Loading Assets...")
217235
time.sleep(1)
218236
var = 0
219237
while var < 101:
220-
print("""
221-
222-
_______ __ __ ___ _______ ______ _______ __ _
223-
| || |_| || | | || _ | | || | | |
224-
| _ || || | | || | || | _ || |_| |
225-
| | | || || | | || |_||_ | | | || |
226-
| |_| || || | | _|| __ || |_| || _ |
227-
| || ||_|| || | | |_ | | | || || | | |
228-
|_______||_| |_||___| |_______||___| |_||_______||_| |__|
229-
230-
231-
""")
232-
print(str(var) + "% Loaded")
233-
time.sleep(0.05)
238+
print(str(var) + "% Loaded \r"),
239+
time.sleep(0.01)
234240
var += 1
235241
clear()
236242
# i have to give some sort of visual fun to my eyeballs, python is already slow as balls let me have some fun
237243
print("""
238-
239-
_______ __ __ ___ _______ ______ _______ __ _
240-
| || |_| || | | || _ | | || | | |
241-
| _ || || | | || | || | _ || |_| |
242-
| | | || || | | || |_||_ | | | || |
243-
| |_| || || | | _|| __ || |_| || _ |
244-
| || ||_|| || | | |_ | | | || || | | |
245-
|_______||_| |_||___| |_______||___| |_||_______||_| |__|
246-
247-
244+
██████╗ ███╗ ███╗██╗ ██████╗██████╗ ██████╗ ███╗ ██╗ ██████╗ ███████╗
245+
██╔═══██╗████╗ ████║██║██╔════╝██╔══██╗██╔═══██╗████╗ ██║██╔═══██╗██╔════╝
246+
██║ ██║██╔████╔██║██║██║ ██████╔╝██║ ██║██╔██╗ ██║██║ ██║███████╗
247+
██║ ██║██║╚██╔╝██║██║██║ ██╔══██╗██║ ██║██║╚██╗██║██║ ██║╚════██║
248+
╚██████╔╝██║ ╚═╝ ██║██║╚██████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╔╝███████║
249+
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
250+
248251
""")
249252
print("Assets Loaded.")
250253
# i want a fullscreen function here someone figure that out please
@@ -270,23 +273,6 @@ def tencheck():
270273
print("exactly 10")
271274
time.sleep(1.5)
272275
runprogram()
276+
# don't run any other functions here
273277

274-
275-
def turtlePower():
276-
clear()
277-
win = turtle.Screen()
278-
man = turtle.Turtle()
279-
man.penup()
280-
while True:
281-
if keyboard.is_pressed("w"):
282-
man.forward(2)
283-
if keyboard.is_pressed("a"):
284-
man.left(2)
285-
if keyboard.is_pressed("s"):
286-
man.backward(2)
287-
if keyboard.is_pressed("d"):
288-
man.right(2)
289-
if keyboard.is_pressed("e"):
290-
win.bye()
291-
break
292-
# don't run any other functions here
278+
#VARIABLES

0 commit comments

Comments
 (0)