Skip to content

Commit ddc4e35

Browse files
v1.2 upload
1 parent 3b7b4fe commit ddc4e35

File tree

13 files changed

+780
-0
lines changed

13 files changed

+780
-0
lines changed

v1.2/clicker/gui.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

v1.2/clicker/keypress_detector.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

v1.2/clicker/main_script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

v1.2/launcher.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import time, os, random
2+
from mrmine.main_script import mrmine_start_game
3+
from colorama import Fore as color
4+
os.system('clear')
5+
print("""
6+
Enter the ID for the game you would like to play.
7+
1. Mr. Mine [WIP]""")
8+
game=input(" > ")
9+
try:
10+
game=int(game)
11+
except Exception:
12+
print("Invalid ID.")
13+
exit()
14+
if game==1:
15+
print("Starting Mr. Mine...")
16+
time.sleep(0.5)
17+
print("Loading Game...")
18+
time.sleep(random.uniform(0.5, 1.5))
19+
os.system('clear')
20+
i=0
21+
d1=random.randint(-3, 3)
22+
d2=random.randint(-3, 3)
23+
d3=random.randint(-3, 3)
24+
while i<100:
25+
os.system('clear')
26+
print("="*102)
27+
print("|"+color.GREEN+("█"*i)+color.WHITE+("█"*(100-i))+"|")
28+
print("|"+color.GREEN+("█"*i)+color.WHITE+("█"*(100-i))+"| ("+str(i)+"%)")
29+
print("="*102)
30+
if i<=15+d1:
31+
print(color.WHITE+"Loading Launcher...")
32+
elif i<=50+d2:
33+
print(color.WHITE+"Initializing Game...")
34+
elif i<=80+d3:
35+
print(color.WHITE+"Loading GUI...")
36+
elif i<100:
37+
print("Loading Scripts...")
38+
elif i==100:
39+
break
40+
i+=1
41+
time.sleep(random.uniform(0.05, 0.2))
42+
os.system('clear')
43+
print("="*102)
44+
print("|"+color.GREEN+("█"*100)+color.WHITE+"|")
45+
print("|"+color.GREEN+("█"*100)+color.WHITE+"| (100%)")
46+
print("="*102)
47+
print(color.WHITE+"Loading Complete!")
48+
time.sleep(1)
49+
print(color.WHITE+"Welcome to Mr. Mine!")
50+
time.sleep(0.5)
51+
os.system('clear')
52+
mrmine_start_game()
27.8 KB
Binary file not shown.
2.1 KB
Binary file not shown.
10.7 KB
Binary file not shown.

v1.2/mrmine/gui.py

Lines changed: 334 additions & 0 deletions
Large diffs are not rendered by default.

v1.2/mrmine/keypress_detector.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import sys
2+
import termios
3+
import tty
4+
import select
5+
from contextlib import contextmanager
6+
7+
@contextmanager
8+
def raw_mode(file):
9+
old_attrs = termios.tcgetattr(file.fileno())
10+
try:
11+
tty.setraw(file.fileno())
12+
yield
13+
finally:
14+
termios.tcsetattr(file.fileno(), termios.TCSADRAIN, old_attrs)
15+
16+
SPECIAL_KEYS = {
17+
'\x1b[A': 'UP',
18+
'\x1b[B': 'DOWN',
19+
'\x1b[C': 'RIGHT',
20+
'\x1b[D': 'LEFT'
21+
}
22+
23+
def detect_keypress_nonblocking():
24+
with raw_mode(sys.stdin):
25+
rlist, _, _ = select.select([sys.stdin], [], [], 0.1)
26+
if rlist:
27+
chars = []
28+
char = sys.stdin.read(1)
29+
if char == '\x1b': # Escape character
30+
chars.append(char)
31+
char = sys.stdin.read(1)
32+
if char:
33+
chars.append(char)
34+
if char == '[':
35+
char = sys.stdin.read(1)
36+
if char:
37+
chars.append(char)
38+
result = ''.join(chars)
39+
return SPECIAL_KEYS.get(result, result)
40+
return None

v1.2/mrmine/log.txt

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
Timestamp 1730475083.7451906: From function 'read_save' grabbed set ('SAVE_NUMBER', '1') from save
2+
Timestamp 1730475083.745336: From function 'read_save' writing save data key SAVE_NUMBER to data dictionary
3+
Timestamp 1730475083.7454157: From function 'read_save' grabbed set ('END_TIME', '0') from save
4+
Timestamp 1730475083.7455132: From function 'read_save' writing save data key END_TIME to data dictionary
5+
Timestamp 1730475083.7455869: From function 'read_save' grabbed set ('STORAGE', '0') from save
6+
Timestamp 1730475083.7456782: From function 'read_save' writing save data key STORAGE to data dictionary
7+
Timestamp 1730475083.7457502: From function 'read_save' grabbed set ('UPGRADES', '[]') from save
8+
Timestamp 1730475083.7458453: From function 'read_save' writing save data key UPGRADES to data dictionary
9+
Timestamp 1730475083.7459166: From function 'read_save' grabbed set ('MINERALS', '[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]') from save
10+
Timestamp 1730475083.746046: From function 'read_save' writing save data key MINERALS to data dictionary
11+
Timestamp 1730475083.746119: From function 'read_save' grabbed set ('FLUIDS', '[0, 0, 0]') from save
12+
Timestamp 1730475083.7462182: From function 'read_save' writing save data key FLUIDS to data dictionary
13+
Timestamp 1730475083.7462902: From function 'read_save' grabbed set ('SCIENTIST_DATA', '[]') from save
14+
Timestamp 1730475083.7463822: From function 'read_save' writing save data key SCIENTIST_DATA to data dictionary
15+
Timestamp 1730475083.7464526: From function 'read_save' grabbed set ('CAVE_DATA', '[]') from save
16+
Timestamp 1730475083.7465441: From function 'read_save' writing save data key CAVE_DATA to data dictionary
17+
Timestamp 1730475083.7466142: From function 'read_save' grabbed set ('CHEST_DATA', '[]') from save
18+
Timestamp 1730475083.7467046: From function 'read_save' writing save data key CHEST_DATA to data dictionary
19+
Timestamp 1730475083.7467768: From function 'read_save' grabbed set ('MONEY', '0') from save
20+
Timestamp 1730475083.7468665: From function 'read_save' writing save data key MONEY to data dictionary
21+
Timestamp 1730475083.7469378: From function 'read_save' grabbed set ('TP_DATA', '[]') from save
22+
Timestamp 1730475083.747028: From function 'read_save' writing save data key TP_DATA to data dictionary
23+
Timestamp 1730475083.747099: From function 'read_save' grabbed set ('MANAGER', '(0.0, 0)') from save
24+
Timestamp 1730475083.7471976: From function 'read_save' writing save data key MANAGER to data dictionary
25+
Timestamp 1730475083.7472687: From function 'read_save' grabbed set ('ATTACK', '(0, 0)') from save
26+
Timestamp 1730475083.7473636: From function 'read_save' writing save data key ATTACK to data dictionary
27+
Timestamp 1730475083.7474341: From function 'read_save' grabbed set ('MINER_SPEED', '1') from save
28+
Timestamp 1730475083.7475252: From function 'read_save' writing save data key MINER_SPEED to data dictionary
29+
Timestamp 1730475083.7475975: From function 'read_save' grabbed set ('MINER_EFFICIENCY', '1') from save
30+
Timestamp 1730475083.7476866: From function 'read_save' writing save data key MINER_EFFICIENCY to data dictionary
31+
Timestamp 1730475083.747757: From function 'read_save' grabbed set ('DEPTH', '10') from save
32+
Timestamp 1730475083.747847: From function 'read_save' writing save data key DEPTH to data dictionary
33+
Timestamp 1730475083.7479181: From function 'read_save' grabbed set ('DRILL_DATA', '[1, 1]') from save
34+
Timestamp 1730475083.7480226: From function 'read_save' writing save data key DRILL_DATA to data dictionary
35+
Timestamp 1730475083.7480965: From function 'read_save' grabbed set ('RIG_DATA', '[]') from save
36+
Timestamp 1730475083.748189: From function 'read_save' writing save data key RIG_DATA to data dictionary
37+
Timestamp 1730475083.7482605: From function 'read_save' grabbed set ('LAYER_HARDNESS', '1') from save
38+
Timestamp 1730475083.748352: From function 'read_save' writing save data key LAYER_HARDNESS to data dictionary
39+
Timestamp 1730475083.7484245: From function 'read_save' grabbed set ('FORGE_STATUS', '[]') from save
40+
Timestamp 1730475083.7485154: From function 'read_save' writing save data key FORGE_STATUS to data dictionary
41+
Timestamp 1730475083.7485955: From function 'read_save' grabbed set ('BROADCAST', 'nothing') from save
42+
Timestamp 1730475083.7486932: From function 'read_save' eval failed; writing directly to data dictionary
43+
Timestamp 1730475083.7487595: name 'nothing' is not defined
44+
Timestamp 1730475083.7488322: From function 'read_save' grabbed set ('BROADCAST_TYPE', 'nothing') from save
45+
Timestamp 1730475083.7489235: From function 'read_save' eval failed; writing directly to data dictionary
46+
Timestamp 1730475083.7490098: name 'nothing' is not defined
47+
Timestamp 1730475083.749085: From function 'read_save' grabbed set ('DATAID', '707923251') from save
48+
Timestamp 1730475083.7491806: From function 'read_save' writing save data key DATAID to data dictionary
49+
Timestamp 1730475083.749249: From function 'read_save' grabbed set ('PLANET', '1') from save
50+
Timestamp 1730475083.749334: From function 'read_save' writing save data key PLANET to data dictionary
51+
Timestamp 1730475083.7494292: From function 'write_save' attempting to write to save file (attempt 1)
52+
Timestamp 1730475083.7498674: From function 'write_save' opened save file
53+
Timestamp 1730475083.7499404: ("From function 'write_save' writing item", 'SAVE_NUMBER')
54+
Timestamp 1730475083.7500129: ("From function 'write_save' writing item", 'END_TIME')
55+
Timestamp 1730475083.7500846: ("From function 'write_save' writing item", 'STORAGE')
56+
Timestamp 1730475083.7501552: ("From function 'write_save' writing item", 'UPGRADES')
57+
Timestamp 1730475083.7502313: ("From function 'write_save' writing item", 'MINERALS')
58+
Timestamp 1730475083.7502997: ("From function 'write_save' writing item", 'FLUIDS')
59+
Timestamp 1730475083.7503695: ("From function 'write_save' writing item", 'SCIENTIST_DATA')
60+
Timestamp 1730475083.7504365: ("From function 'write_save' writing item", 'CAVE_DATA')
61+
Timestamp 1730475083.750502: ("From function 'write_save' writing item", 'CHEST_DATA')
62+
Timestamp 1730475083.7505677: ("From function 'write_save' writing item", 'MONEY')
63+
Timestamp 1730475083.7506335: ("From function 'write_save' writing item", 'TP_DATA')
64+
Timestamp 1730475083.7506993: ("From function 'write_save' writing item", 'MANAGER')
65+
Timestamp 1730475083.7507684: ("From function 'write_save' writing item", 'ATTACK')
66+
Timestamp 1730475083.7508354: ("From function 'write_save' writing item", 'MINER_SPEED')
67+
Timestamp 1730475083.7509022: ("From function 'write_save' writing item", 'MINER_EFFICIENCY')
68+
Timestamp 1730475083.750968: ("From function 'write_save' writing item", 'DEPTH')
69+
Timestamp 1730475083.7510366: ("From function 'write_save' writing item", 'DRILL_DATA')
70+
Timestamp 1730475083.751104: ("From function 'write_save' writing item", 'RIG_DATA')
71+
Timestamp 1730475083.7511716: ("From function 'write_save' writing item", 'LAYER_HARDNESS')
72+
Timestamp 1730475083.7512379: ("From function 'write_save' writing item", 'FORGE_STATUS')
73+
Timestamp 1730475083.7513034: ("From function 'write_save' writing item", 'BROADCAST')
74+
Timestamp 1730475083.751369: ("From function 'write_save' writing item", 'BROADCAST_TYPE')
75+
Timestamp 1730475083.7514367: ("From function 'write_save' writing item", 'DATAID')
76+
Timestamp 1730475083.7515247: ("From function 'write_save' writing item", 'PLANET')
77+
Timestamp 1730475083.751631: From function 'write_save' success

0 commit comments

Comments
 (0)