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

Commit

Permalink
Added basic Annoying Popup.
Browse files Browse the repository at this point in the history
Original code provided by Setapdede.
  • Loading branch information
BurningInfern0 authored Jan 3, 2022
1 parent 888a255 commit f27a9f2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion player.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ def pauseBeginMenu(systemName, systemPro):
else:
pauseBeginMenu(systemName, systemPro)

# original code by Setapdede, but i refined it a bit.
def spawnPopup(startLevel, systemLabel):
clear()
print('Level', startLevel)
if systemLevel > 0:
print('<', systemLabel, '>')
print("╔════════════════════╗\n║ :) Annoying popup! ║\n║ [OK] ║\n╚════════════════════╝")
popupinput = input()
if popupinput == "OK":
clear()
else:
spawnPopup(startLevel, systemLabel)

def startGame(systemName, startLevel, proLevel):
global progressbar # total progressbar progress
global progressbar2 # total orange segments in progressbar
Expand Down Expand Up @@ -123,6 +136,10 @@ def startGame(systemName, startLevel, proLevel):
sleep(3)
clear()

popupshow = random.randint(0, 6)
if popupshow == 6:
spawnPopup(startLevel, systemLabel)

# randomly chooses a segment and loads art
seg = random.randint(0, 5)
if seg == 0:
Expand Down Expand Up @@ -238,7 +255,7 @@ def startGame(systemName, startLevel, proLevel):

if catch == "credits":
clear()
print('ProgressCLI95 0.2.1 Development Build 4')
print('ProgressCLI95 0.2.1 Release')
print('Original code (0.1) by Setapdede')
print('Improved code (0.2+) by BurningInfern0')
print('Made for use with Sparrow Assistant by pivinx1')
Expand Down

0 comments on commit f27a9f2

Please sign in to comment.