2015-05-26 21:37:25 +00:00
|
|
|
#! /usr/bin/env python
|
|
|
|
import fallout_login as login
|
2015-05-27 01:11:31 +00:00
|
|
|
import fallout_boot as boot
|
|
|
|
import fallout_locked as locked
|
2015-06-14 21:05:56 +00:00
|
|
|
import fallout_hack as hack
|
2015-06-14 22:31:01 +00:00
|
|
|
import fallout_selection as select
|
2024-04-27 21:00:01 +00:00
|
|
|
import fallout_data as data
|
2024-04-27 21:43:53 +00:00
|
|
|
from fallout_functions import soundTest, queueIsEmpty, addSound
|
2024-04-27 21:00:01 +00:00
|
|
|
from time import sleep
|
2015-05-31 21:54:43 +00:00
|
|
|
import sys
|
2015-05-26 21:37:25 +00:00
|
|
|
|
2015-05-31 21:54:43 +00:00
|
|
|
hard = False
|
2024-04-27 21:00:01 +00:00
|
|
|
if '--hard' in sys.argv:
|
2015-05-31 21:54:43 +00:00
|
|
|
hard = True
|
|
|
|
|
2024-04-27 21:00:01 +00:00
|
|
|
skip = False
|
|
|
|
if '--skip' in sys.argv:
|
|
|
|
skip = True
|
|
|
|
|
2024-04-27 21:07:08 +00:00
|
|
|
if '--preload' in sys.argv:
|
2024-04-27 21:00:01 +00:00
|
|
|
soundTest()
|
|
|
|
|
|
|
|
try:
|
|
|
|
addSound("poweron")
|
2024-04-27 21:43:53 +00:00
|
|
|
while not queueIsEmpty():
|
2024-04-27 21:00:01 +00:00
|
|
|
sleep(0.2)
|
|
|
|
if skip or boot.beginBoot(hard):
|
2024-04-27 21:43:53 +00:00
|
|
|
while not queueIsEmpty():
|
2024-04-27 21:00:01 +00:00
|
|
|
sleep(0.2)
|
|
|
|
pwd = None
|
|
|
|
if not skip:
|
|
|
|
pwd = hack.beginLogin()
|
|
|
|
else:
|
|
|
|
pwd = "VERYVERYSECUREPASSWORD"
|
|
|
|
if pwd != None:
|
|
|
|
login.beginLogin(hard, 'ADMIN', pwd)
|
2024-04-27 21:43:53 +00:00
|
|
|
while not queueIsEmpty():
|
2024-04-27 21:00:01 +00:00
|
|
|
sleep(0.2)
|
|
|
|
sel = 0
|
|
|
|
while sel != 3:
|
2024-04-27 22:50:47 +00:00
|
|
|
sel = select.beginSelection(data.ROBCO_HEADERS, data.SOFT_HEADERS, data.MAIN_MENU, data.MAIN_MSGS)
|
2024-04-27 21:43:53 +00:00
|
|
|
while not queueIsEmpty():
|
2024-04-27 21:00:01 +00:00
|
|
|
sleep(0.2)
|
|
|
|
if sel == 0:
|
|
|
|
loc = 0
|
|
|
|
while loc != 1:
|
|
|
|
MENU = [data.LOCK_MENU[tog][data.LOCK_CONDS[tog]] for tog in data.LOCK_CONDS.keys()]
|
|
|
|
MSGS = [data.LOCK_MSGS[tog][data.LOCK_CONDS[tog]] for tog in data.LOCK_CONDS.keys()]
|
|
|
|
loc = select.beginSelection(data.ROBCO_HEADERS, data.SOFT_HEADERS, MENU, MSGS)
|
|
|
|
if loc == 0:
|
|
|
|
if data.LOCK_CONDS['LOCKED']:
|
|
|
|
data.LOCK_CONDS['LOCKED'] = 0
|
|
|
|
else:
|
|
|
|
data.LOCK_CONDS['LOCKED'] = 1
|
|
|
|
elif sel == 1:
|
|
|
|
tur = 0
|
|
|
|
while tur != 2:
|
|
|
|
MENU = [data.TURRET_MENU[tog][data.TURRET_CONDS[tog]] for tog in data.TURRET_CONDS.keys()]
|
|
|
|
MSGS = [data.TURRET_MSGS[tog][data.TURRET_CONDS[tog]] for tog in data.TURRET_CONDS.keys()]
|
|
|
|
tur = select.beginSelection(data.TURRET_HEADERS, data.TURRET_HEADERS2, MENU, MSGS)
|
|
|
|
if tur == 0:
|
|
|
|
data.TURRET_CONDS['TARGETING'] = 1
|
|
|
|
elif tur == 1:
|
|
|
|
if data.TURRET_CONDS['ENABLED']:
|
|
|
|
data.TURRET_CONDS['ENABLED'] = 0
|
|
|
|
else:
|
|
|
|
data.TURRET_CONDS['ENABLED'] = 1
|
|
|
|
elif sel == 2:
|
|
|
|
log = 0
|
|
|
|
while log != data.LOG_RET_ID:
|
|
|
|
log = select.beginSelection(data.ROBCO_HEADERS, data.SOFT_HEADERS, data.LOG_NAMES)
|
|
|
|
if log != data.LOG_RET_ID:
|
2024-04-27 21:47:09 +00:00
|
|
|
LOG = data.LOGS[data.LOG_NAMES[log]].split("\n")
|
|
|
|
LOG.extend([''])
|
|
|
|
select.beginSelection(data.ROBCO_HEADERS, LOG, ["Return"])
|
2024-04-27 21:00:01 +00:00
|
|
|
else:
|
|
|
|
locked.beginLocked()
|
|
|
|
print('Login failed')
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
pass
|
|
|
|
|
|
|
|
addSound("poweroff")
|
2024-04-27 21:43:53 +00:00
|
|
|
while not queueIsEmpty():
|
2024-04-27 21:00:01 +00:00
|
|
|
sleep(0.2)
|