Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
0.2.1 Development Build 3 Upload
Browse files Browse the repository at this point in the history
- Split the main.py file into separate files, OSes now have their own folder and files.
- Added PB95 Plus.
- Added abilities to save your data.
  • Loading branch information
BurningInfern0 authored Jan 1, 2022
1 parent 5e3cd3f commit c10a1e8
Show file tree
Hide file tree
Showing 7 changed files with 452 additions and 0 deletions.
59 changes: 59 additions & 0 deletions boot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from saveloader import detectSave, loadSystemSave
from termcolor import colored
from clear import clear
from checkbadge import calculateBadge
import sys

# system pros
global pro95
global pro95plus

pro95 = 10
pro95plus = 20

# systems
sys.path.insert(0, './oses/')

def startup(system):
from system95 import launch95
from system95plus import launch95plus
if system == "1":
level95 = loadSystemSave("95")
badge95 = calculateBadge(level95, pro95)
launch95(level95, badge95, pro95)
elif system == "2":
plus95check = loadSystemSave("95plus")
badge95plus = calculateBadge(plus95check, pro95plus)
if plus95check == False:
boot()
else:
launch95plus(plus95check, badge95plus, pro95plus)

def boot():

detectSave()

global currentSystem

# fancy bios text
energyStar = colored('Energy Star Powered', "yellow")

clear()
print('Sparrow Assistant Enhanced Text BIOS.80.1 -', energyStar)
print('Ver. 12-30-2021\n\n')

ninefive = loadSystemSave("95")
ninefivebadge = calculateBadge(ninefive, pro95)
print('1. Progressbar 95', ninefivebadge)

ninefiveplus = loadSystemSave("95plus")
if ninefiveplus == False:
print(colored('2. Progressbar 95 Plus - Get to level 15 in PB95 to unlock this!', "red"))
else:
ninefiveplusbadge = calculateBadge(ninefiveplus, pro95plus)
print('2. Progressbar 95 Plus', ninefiveplusbadge)

choice = input()
startup(choice)

boot()
16 changes: 16 additions & 0 deletions checkbadge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def calculateBadge(level, proLevel):
# i know you can probably use case statements here but i'm using if statements because it's easier. -Inferno
if level >= 1000:
return "Grand"
elif level >= 500:
return "Adept"
elif level >= 250:
return "Master"
elif level >= 100:
return "Expert"
elif level >= proLevel:
return "Pro"
elif level < proLevel:
return ""
else:
return "Calculation error."
7 changes: 7 additions & 0 deletions clear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from os import name, system

def clear():
if name == "nt":
_ = system('cls')
else:
_ = system('clear')
13 changes: 13 additions & 0 deletions oses/system95.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import sys
sys.path.insert(0, '../')
from clear import clear
from time import sleep
from player import startGame, beginMenu, pauseBeginMenu

def launch95(systemlevel, systembadge, systempro):
clear()
print('P r o g r e s s b a r 9 5')
print(systembadge)
print('\n\n\nNow Loading...')
sleep(4)
beginMenu("95", systemlevel, systempro)
13 changes: 13 additions & 0 deletions oses/system95plus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import sys
sys.path.insert(0, '../')
from clear import clear
from time import sleep
from player import startGame, beginMenu, pauseBeginMenu

def launch95plus(systemlevel, systembadge, systempro):
clear()
print('P r o g r e s s b a r 9 5 p l u s')
print(systembadge)
print('\n\n\nNow Loading...')
sleep(4)
beginMenu("95plus", systemlevel, systempro)
Loading

0 comments on commit c10a1e8

Please sign in to comment.