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-28 15:02:47 +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
|
2024-04-28 15:02:47 +00:00
|
|
|
if "--skip" in sys.argv:
|
2024-04-27 21:00:01 +00:00
|
|
|
skip = True
|
|
|
|
|
2024-04-28 15:02:47 +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:
|
2024-04-28 15:02:47 +00:00
|
|
|
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-28 15:02: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)
|
2024-04-28 15:02:47 +00:00
|
|
|
if sel == 0:
|
2024-04-27 21:00:01 +00:00
|
|
|
loc = 0
|
|
|
|
while loc != 1:
|
2024-04-28 15:02:47 +00:00
|
|
|
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
|
|
|
|
)
|
2024-04-27 21:00:01 +00:00
|
|
|
if loc == 0:
|
2024-04-28 15:02:47 +00:00
|
|
|
if data.LOCK_CONDS["LOCKED"]:
|
|
|
|
data.LOCK_CONDS["LOCKED"] = 0
|
2024-04-27 21:00:01 +00:00
|
|
|
else:
|
2024-04-28 15:02:47 +00:00
|
|
|
data.LOCK_CONDS["LOCKED"] = 1
|
2024-04-27 21:00:01 +00:00
|
|
|
elif sel == 1:
|
|
|
|
tur = 0
|
|
|
|
while tur != 2:
|
2024-04-28 15:02:47 +00:00
|
|
|
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
|
2024-04-27 21:00:01 +00:00
|
|
|
elif tur == 1:
|
2024-04-28 15:02:47 +00:00
|
|
|
if data.TURRET_CONDS["ENABLED"]:
|
|
|
|
data.TURRET_CONDS["ENABLED"] = 0
|
2024-04-27 21:00:01 +00:00
|
|
|
else:
|
2024-04-28 15:02:47 +00:00
|
|
|
data.TURRET_CONDS["ENABLED"] = 1
|
2024-04-27 21:00:01 +00:00
|
|
|
elif sel == 2:
|
|
|
|
log = 0
|
|
|
|
while log != data.LOG_RET_ID:
|
2024-04-28 15:02:47 +00:00
|
|
|
log = select.beginSelection(
|
|
|
|
data.ROBCO_HEADERS, data.SOFT_HEADERS, data.LOG_NAMES
|
|
|
|
)
|
2024-04-27 21:00:01 +00:00
|
|
|
if log != data.LOG_RET_ID:
|
2024-04-27 21:47:09 +00:00
|
|
|
LOG = data.LOGS[data.LOG_NAMES[log]].split("\n")
|
2024-04-28 15:02:47 +00:00
|
|
|
LOG.extend([""])
|
2024-04-27 21:47:09 +00:00
|
|
|
select.beginSelection(data.ROBCO_HEADERS, LOG, ["Return"])
|
2024-04-27 21:00:01 +00:00
|
|
|
else:
|
|
|
|
locked.beginLocked()
|
2024-04-28 15:02:47 +00:00
|
|
|
print("Login failed")
|
2024-04-27 21:00:01 +00:00
|
|
|
except KeyboardInterrupt:
|
|
|
|
pass
|
|
|
|
|
|
|
|
addSound("poweroff")
|
2024-04-27 21:43:53 +00:00
|
|
|
while not queueIsEmpty():
|
2024-04-28 15:02:47 +00:00
|
|
|
sleep(0.2)
|