Formatting
This commit is contained in:
parent
fb42cf8115
commit
bc3e7702ad
8 changed files with 269 additions and 231 deletions
71
fallout.py
71
fallout.py
|
@ -10,14 +10,14 @@ from time import sleep
|
|||
import sys
|
||||
|
||||
hard = False
|
||||
if '--hard' in sys.argv:
|
||||
if "--hard" in sys.argv:
|
||||
hard = True
|
||||
|
||||
skip = False
|
||||
if '--skip' in sys.argv:
|
||||
if "--skip" in sys.argv:
|
||||
skip = True
|
||||
|
||||
if '--preload' in sys.argv:
|
||||
if "--preload" in sys.argv:
|
||||
soundTest()
|
||||
|
||||
try:
|
||||
|
@ -33,52 +33,75 @@ try:
|
|||
else:
|
||||
pwd = "VERYVERYSECUREPASSWORD"
|
||||
if pwd != None:
|
||||
login.beginLogin(hard, 'ADMIN', pwd)
|
||||
login.beginLogin(hard, "ADMIN", pwd)
|
||||
while not queueIsEmpty():
|
||||
sleep(0.2)
|
||||
sel = 0
|
||||
while sel != 3:
|
||||
sel = select.beginSelection(data.ROBCO_HEADERS, data.SOFT_HEADERS, data.MAIN_MENU, data.MAIN_MSGS)
|
||||
sel = select.beginSelection(
|
||||
data.ROBCO_HEADERS,
|
||||
data.SOFT_HEADERS,
|
||||
data.MAIN_MENU,
|
||||
data.MAIN_MSGS,
|
||||
)
|
||||
while not queueIsEmpty():
|
||||
sleep(0.2)
|
||||
if sel == 0:
|
||||
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)
|
||||
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
|
||||
if data.LOCK_CONDS["LOCKED"]:
|
||||
data.LOCK_CONDS["LOCKED"] = 0
|
||||
else:
|
||||
data.LOCK_CONDS['LOCKED'] = 1
|
||||
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
|
||||
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
|
||||
if data.TURRET_CONDS["ENABLED"]:
|
||||
data.TURRET_CONDS["ENABLED"] = 0
|
||||
else:
|
||||
data.TURRET_CONDS['ENABLED'] = 1
|
||||
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)
|
||||
log = select.beginSelection(
|
||||
data.ROBCO_HEADERS, data.SOFT_HEADERS, data.LOG_NAMES
|
||||
)
|
||||
if log != data.LOG_RET_ID:
|
||||
LOG = data.LOGS[data.LOG_NAMES[log]].split("\n")
|
||||
LOG.extend([''])
|
||||
LOG.extend([""])
|
||||
select.beginSelection(data.ROBCO_HEADERS, LOG, ["Return"])
|
||||
else:
|
||||
locked.beginLocked()
|
||||
print('Login failed')
|
||||
print("Login failed")
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
addSound("poweroff")
|
||||
while not queueIsEmpty():
|
||||
sleep(0.2)
|
||||
sleep(0.2)
|
||||
|
|
|
@ -6,34 +6,35 @@ import curses
|
|||
|
||||
######################## global 'constants' ##############
|
||||
|
||||
ENTRY_1 = 'SET TERMINAL/INQUIRE'
|
||||
ENTRY_1 = "SET TERMINAL/INQUIRE"
|
||||
|
||||
ENTRY_2 = 'SET FILE/PROTECTION=OWNER:RWED ACCOUNTS.F'
|
||||
ENTRY_2 = "SET FILE/PROTECTION=OWNER:RWED ACCOUNTS.F"
|
||||
|
||||
ENTRY_3 = 'SET HALT RESTART/MAINT'
|
||||
ENTRY_3 = "SET HALT RESTART/MAINT"
|
||||
|
||||
ENTRY_4 = 'RUN DEBUG/ACCOUNTS.F'
|
||||
ENTRY_4 = "RUN DEBUG/ACCOUNTS.F"
|
||||
|
||||
|
||||
######################## text strings ####################
|
||||
|
||||
MESSAGE_1 = 'WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK'
|
||||
MESSAGE_1 = "WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK"
|
||||
|
||||
MESSAGE_2 = 'RIT-V300'
|
||||
MESSAGE_2 = "RIT-V300"
|
||||
|
||||
MESSAGE_3 = [
|
||||
'\nInitializing Robco Industries(TM) MF Boot Agent v2.3.0\n',
|
||||
'RETROS BIOS\n',
|
||||
'RBIOS-4.02.08.00 52EE5.E7.E8\n',
|
||||
'Copyright 2201-2203 Robco Ind.\n',
|
||||
'Uppermem: 64 KB\n',
|
||||
'Root (5A8)\n',
|
||||
'Maintenance Mode\n\n'
|
||||
"\nInitializing Robco Industries(TM) MF Boot Agent v2.3.0\n",
|
||||
"RETROS BIOS\n",
|
||||
"RBIOS-4.02.08.00 52EE5.E7.E8\n",
|
||||
"Copyright 2201-2203 Robco Ind.\n",
|
||||
"Uppermem: 64 KB\n",
|
||||
"Root (5A8)\n",
|
||||
"Maintenance Mode\n\n",
|
||||
]
|
||||
|
||||
|
||||
######################## functions #######################
|
||||
|
||||
|
||||
def runBoot(scr, hardMode):
|
||||
"""
|
||||
Start the boot portion of the terminal
|
||||
|
@ -48,54 +49,55 @@ def runBoot(scr, hardMode):
|
|||
curses.noecho()
|
||||
scr.scrollok(True)
|
||||
|
||||
slowWrite(scr, MESSAGE_1 + '\n\n')
|
||||
slowWrite(scr, MESSAGE_1 + "\n\n")
|
||||
|
||||
if hardMode:
|
||||
# use must enter the correct text to proceed
|
||||
entry = ''
|
||||
entry = ""
|
||||
while entry.upper() != ENTRY_1.upper():
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ">")
|
||||
entry = upperInput(scr)
|
||||
else:
|
||||
# input is entered for them
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ">")
|
||||
curses.napms(INPUT_PAUSE)
|
||||
slowWrite(scr, ENTRY_1 + '\n', TYPE_DELAY, True)
|
||||
slowWrite(scr, ENTRY_1 + "\n", TYPE_DELAY, True)
|
||||
|
||||
slowWrite(scr, '\n' + MESSAGE_2 + '\n\n')
|
||||
slowWrite(scr, "\n" + MESSAGE_2 + "\n\n")
|
||||
|
||||
if hardMode:
|
||||
entry = ''
|
||||
entry = ""
|
||||
while entry.upper() != ENTRY_2.upper():
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ">")
|
||||
entry = upperInput(scr)
|
||||
while entry.upper() != ENTRY_3.upper():
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ">")
|
||||
entry = upperInput(scr)
|
||||
else:
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ">")
|
||||
curses.napms(INPUT_PAUSE)
|
||||
slowWrite(scr, ENTRY_2 + '\n', TYPE_DELAY, True)
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ENTRY_2 + "\n", TYPE_DELAY, True)
|
||||
slowWrite(scr, ">")
|
||||
curses.napms(INPUT_PAUSE)
|
||||
slowWrite(scr, ENTRY_3 + '\n', TYPE_DELAY, True)
|
||||
slowWrite(scr, ENTRY_3 + "\n", TYPE_DELAY, True)
|
||||
|
||||
for LINE in MESSAGE_3:
|
||||
slowWrite(scr, LINE)
|
||||
slowWrite(scr, LINE)
|
||||
|
||||
if hardMode:
|
||||
entry = ''
|
||||
entry = ""
|
||||
while entry.upper() != ENTRY_4.upper():
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ">")
|
||||
entry = upperInput(scr)
|
||||
else:
|
||||
slowWrite(scr, '>')
|
||||
slowWrite(scr, ">")
|
||||
curses.napms(INPUT_PAUSE)
|
||||
slowWrite(scr, ENTRY_4 + '\n', TYPE_DELAY, True)
|
||||
slowWrite(scr, ENTRY_4 + "\n", TYPE_DELAY, True)
|
||||
|
||||
curses.napms(INPUT_PAUSE)
|
||||
return True
|
||||
|
||||
|
||||
def beginBoot(hardMode):
|
||||
"""
|
||||
Initialize curses and start the boot process
|
||||
|
|
172
fallout_data.py
172
fallout_data.py
|
@ -1,88 +1,74 @@
|
|||
####################### text strings ########################
|
||||
|
||||
ROBCO_HEADERS = (
|
||||
'ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM',
|
||||
'COPYRIGHT 2075-2077 ROBCO INDUSTRIES',
|
||||
'-SERVER 6-',
|
||||
''
|
||||
"ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM",
|
||||
"COPYRIGHT 2075-2077 ROBCO INDUSTRIES",
|
||||
"-SERVER 6-",
|
||||
"",
|
||||
)
|
||||
|
||||
TURRET_HEADERS = (
|
||||
'-RobCo Trespasser Management System-',
|
||||
'====================================',
|
||||
''
|
||||
"-RobCo Trespasser Management System-",
|
||||
"====================================",
|
||||
"",
|
||||
)
|
||||
|
||||
TURRET_HEADERS2 = (
|
||||
'RobcOS v.85',
|
||||
'(C)2076 RobCo',
|
||||
'========================',
|
||||
'| User Log:',
|
||||
'| >> Administrator (RobCoID 2398-H)',
|
||||
'| >> New_Admin: FIRE PUP',
|
||||
'| Welcome new user, FIRE PUP',
|
||||
'| >> New_Targeting_Param:',
|
||||
'| >>> FIRE PUP_userGroup',
|
||||
''
|
||||
"RobcOS v.85",
|
||||
"(C)2076 RobCo",
|
||||
"========================",
|
||||
"| User Log:",
|
||||
"| >> Administrator (RobCoID 2398-H)",
|
||||
"| >> New_Admin: FIRE PUP",
|
||||
"| Welcome new user, FIRE PUP",
|
||||
"| >> New_Targeting_Param:",
|
||||
"| >>> FIRE PUP_userGroup",
|
||||
"",
|
||||
)
|
||||
|
||||
SOFT_HEADERS = (
|
||||
'\tSoftLock Solutions, Inc',
|
||||
"\tSoftLock Solutions, Inc",
|
||||
'"Your Security is Our Security"',
|
||||
'>\\ Welcome, USER',
|
||||
''
|
||||
">\\ Welcome, USER",
|
||||
"",
|
||||
)
|
||||
|
||||
MAIN_MENU = (
|
||||
'Lock Control',
|
||||
'Turret Control',
|
||||
'Read Log',
|
||||
'Log out'
|
||||
)
|
||||
MAIN_MENU = ("Lock Control", "Turret Control", "Read Log", "Log out")
|
||||
|
||||
LOCK_MENU = {
|
||||
'LOCKED': ["Disengage Lock", "Engage Lock"],
|
||||
'RETURN': ["Return"]
|
||||
}
|
||||
LOCK_MENU = {"LOCKED": ["Disengage Lock", "Engage Lock"], "RETURN": ["Return"]}
|
||||
|
||||
|
||||
TURRET_MENU = {
|
||||
'TARGETING': ["Re-configure Targeting Parameters", "<!>WARNING: No Targeting Data<!>"],
|
||||
'ENABLED': ["Deactivate Turret System", "Activate Turret System"],
|
||||
'RETURN': ["Return"]
|
||||
"TARGETING": [
|
||||
"Re-configure Targeting Parameters",
|
||||
"<!>WARNING: No Targeting Data<!>",
|
||||
],
|
||||
"ENABLED": ["Deactivate Turret System", "Activate Turret System"],
|
||||
"RETURN": ["Return"],
|
||||
}
|
||||
|
||||
MAIN_MSGS = (
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'Shutting Down.'
|
||||
)
|
||||
MAIN_MSGS = ("", "", "", "Shutting Down.")
|
||||
|
||||
TURRET_MSGS = {
|
||||
'TARGETING': ['Target Data Cleared. Exercise Caution.', '<!>Please Exercise Caution<!>'],
|
||||
'ENABLED': ['Powering Down...', 'Booting...'],
|
||||
'RETURN': ['']
|
||||
"TARGETING": [
|
||||
"Target Data Cleared. Exercise Caution.",
|
||||
"<!>Please Exercise Caution<!>",
|
||||
],
|
||||
"ENABLED": ["Powering Down...", "Booting..."],
|
||||
"RETURN": [""],
|
||||
}
|
||||
|
||||
LOCK_MSGS = {
|
||||
'LOCKED': ['Clearance granted, Unlocking...', 'Clearance granted, Locking...'],
|
||||
'RETURN': ['']
|
||||
"LOCKED": ["Clearance granted, Unlocking...", "Clearance granted, Locking..."],
|
||||
"RETURN": [""],
|
||||
}
|
||||
|
||||
TURRET_CONDS = {
|
||||
'TARGETING': 0,
|
||||
'ENABLED': 0,
|
||||
'RETURN': 0
|
||||
}
|
||||
TURRET_CONDS = {"TARGETING": 0, "ENABLED": 0, "RETURN": 0}
|
||||
|
||||
LOCK_CONDS = {
|
||||
'LOCKED': 0,
|
||||
'RETURN': 0
|
||||
}
|
||||
LOCK_CONDS = {"LOCKED": 0, "RETURN": 0}
|
||||
|
||||
LOGS = {
|
||||
'Epilogue - Afterword': """USER: MOIRA BROWN
|
||||
"Epilogue - Afterword": """USER: MOIRA BROWN
|
||||
PASS: ***********
|
||||
|
||||
Date: 09.10.2297
|
||||
|
@ -104,20 +90,20 @@ Just about everyone in the Capital Wasteland has a story about the Lone Wanderer
|
|||
Of course, that's why I'm working on the new book, compiling the best and most useful tales of the Lone Wanderer for the next generation. It's not easy sorting out all the conflicting stories, but that'll be half of the fun for the readers. More importantly, between all of those crazy stories of bravery, barbarity, and everything in-between, we can all find a reason to keep on fighting our war for survival.
|
||||
|
||||
I guess some things never change, huh?""",
|
||||
'ERR - Ikkm00:Mvkz6x1ml:Nqtm': "[ERROR HX40-399: invalid decry.key]",
|
||||
'Nuka Cola - Quantum Progress Report 0041': """Isotope CE770 has proven to be a disastrous failure. All of the test subjects suffered severe internal organ failures and died within three days of ingestion. We recommend the immediate destruction of container A32 in the production rooms and suggest switching to isotope CE772. Please send standard "Nuka Condolences" Fruit and Cheese Packages to test group member's families.""",
|
||||
'Nuka Cola - Quantum Progress Report 0055': "Isotope CE772 has proven too damaging to the initial test group which now needs to be disbanded due to their reluctance to continue in our program. This group has suffered 4 fatalities, 12 major internal organ failures and 32 internal radiation burns. This is an unacceptable number of issues in a given test group and recommend we switch to an alternate isotope (such as CE774 or UR993).",
|
||||
'Nuka Cola - Quantum Progress Report 0067': "Test subjects in the Nuka-Cola Quantum program are responding well to the reconfigured taste and the new isotope. The only listed side effects from the group are: 3 cases of dizziness, 1 case of nausea and 1 case of impaired vision. We find from a sampling of 50 that this is an acceptable number of cases and approve this product for production.",
|
||||
'Nuka Cola - Company Announcement': "The Nuka-Cola Corporation is pleased to announce to all it's employees that the first shipments of our Nuka-Cola Quantum® are on their way to retailers in the Washington D.C. area! This flagship test market program is the culmination of a three year research program to bring the refreshing taste of Quantum to market. Congratulations to all employees on a job well done!",
|
||||
'Nuka Cola - New Flavor Coming!': """Attention all Nuka-Cola Corporation Employees
|
||||
"ERR - Ikkm00:Mvkz6x1ml:Nqtm": "[ERROR HX40-399: invalid decry.key]",
|
||||
"Nuka Cola - Quantum Progress Report 0041": """Isotope CE770 has proven to be a disastrous failure. All of the test subjects suffered severe internal organ failures and died within three days of ingestion. We recommend the immediate destruction of container A32 in the production rooms and suggest switching to isotope CE772. Please send standard "Nuka Condolences" Fruit and Cheese Packages to test group member's families.""",
|
||||
"Nuka Cola - Quantum Progress Report 0055": "Isotope CE772 has proven too damaging to the initial test group which now needs to be disbanded due to their reluctance to continue in our program. This group has suffered 4 fatalities, 12 major internal organ failures and 32 internal radiation burns. This is an unacceptable number of issues in a given test group and recommend we switch to an alternate isotope (such as CE774 or UR993).",
|
||||
"Nuka Cola - Quantum Progress Report 0067": "Test subjects in the Nuka-Cola Quantum program are responding well to the reconfigured taste and the new isotope. The only listed side effects from the group are: 3 cases of dizziness, 1 case of nausea and 1 case of impaired vision. We find from a sampling of 50 that this is an acceptable number of cases and approve this product for production.",
|
||||
"Nuka Cola - Company Announcement": "The Nuka-Cola Corporation is pleased to announce to all it's employees that the first shipments of our Nuka-Cola Quantum® are on their way to retailers in the Washington D.C. area! This flagship test market program is the culmination of a three year research program to bring the refreshing taste of Quantum to market. Congratulations to all employees on a job well done!",
|
||||
"Nuka Cola - New Flavor Coming!": """Attention all Nuka-Cola Corporation Employees
|
||||
|
||||
We are very proud to announce that R&D has been completed on Nuka-Cola Clear! With an only minimal loss of life, we've been able to modify the look of Nuka-Cola but give it the same great taste. We will be submitting the product to Marketing shortly for bottle design and advertising strategies. From all of us in the Research Department, thanks for the support!""",
|
||||
'Nuka Cola - From: Marketing': """The following locations have been accepted into the flagship Nuka-Cola Quantum test program. Please ensure that 1 (one) crate of Quantum is included with their regular deliveries along with the advertising package provided by our Marketing Department.
|
||||
"Nuka Cola - From: Marketing": """The following locations have been accepted into the flagship Nuka-Cola Quantum test program. Please ensure that 1 (one) crate of Quantum is included with their regular deliveries along with the advertising package provided by our Marketing Department.
|
||||
|
||||
1. Paradise Falls Shopping Mart
|
||||
2. Super Duper Mart
|
||||
3. Old Olney Grocery""",
|
||||
'Nuka Cola - Packing Line Instructions': """Welcome to the Nuka-Cola Packing Line Operator's Station! You are now instrumental in getting Nuka-Cola from our factory and to the public, so please read the simple instructions below. If you need assistance, please call x347 and ask for your Line Supervisor.
|
||||
"Nuka Cola - Packing Line Instructions": """Welcome to the Nuka-Cola Packing Line Operator's Station! You are now instrumental in getting Nuka-Cola from our factory and to the public, so please read the simple instructions below. If you need assistance, please call x347 and ask for your Line Supervisor.
|
||||
|
||||
1. Access the Packing Terminal and choose desired inventory to load into Sorting Units.
|
||||
2. Select "Activate Packing Line."
|
||||
|
@ -125,25 +111,25 @@ We are very proud to announce that R&D has been completed on Nuka-Cola Clear! Wi
|
|||
4. If there is an emergency, DO NOT PANIC! Simply call x347 and ask for your Line Supervisor. The Packing Line will automatically shut down in the event of an issue.
|
||||
|
||||
Remember, only you can prevent inventory loss by being attentive and vigilant!""",
|
||||
'Nuka Cola - Packing Line Notice': """Attention all Packing Line employees!
|
||||
"Nuka Cola - Packing Line Notice": """Attention all Packing Line employees!
|
||||
|
||||
Due to an oversight by the design department, the new Nuka-Cola Quantum bottles are slightly heavier than the standard Nuka-Cola bottles. As a result, the Packing Line is prone to jams and may cause damage to the equipment. Please DO NOT load Nuka-Cola Quantum bottles into the Sorting Units until further notice. All test samples of Quantum will be packaged by hand until a solution is reached.""",
|
||||
'Nuka Cola - Stage One': """Stage One of the Nuka-Cola Quantum marketing will include: 2 (two) 15 (fifteen)-second television commercials, 4 (four) 10 (ten)-second radio commercials and a highway billboard campaign.
|
||||
"Nuka Cola - Stage One": """Stage One of the Nuka-Cola Quantum marketing will include: 2 (two) 15 (fifteen)-second television commercials, 4 (four) 10 (ten)-second radio commercials and a highway billboard campaign.
|
||||
|
||||
The spots on TV and radio will tease the consumer with the blue glow of the new drink, never showing the bottle in an illuminated environment. The billboard will show the bottle's blue silhouette on a black background.
|
||||
|
||||
The tag line will be "Try something new... Go Blue!". The name will not be revealed until Stage Two.""",
|
||||
'Nuka Cola - Stage Two': """Stage Two of the Nuka-Cola Quantum marketing will include: 2 (two) 30 (thirty)-second television commercials, 4 (four) 15 (fifteen)-second radio commercials and a highway billboard campaign.
|
||||
"Nuka Cola - Stage Two": """Stage Two of the Nuka-Cola Quantum marketing will include: 2 (two) 30 (thirty)-second television commercials, 4 (four) 15 (fifteen)-second radio commercials and a highway billboard campaign.
|
||||
|
||||
In this stage, the name "Quantum" will be revealed and the bottle shown in full view. We will emphasize the drink's new energy content and flavor.
|
||||
|
||||
The tag line will be "Take the leap... enjoy a Quantum!" """,
|
||||
'Nuka Cola - Stage Three': """Stage Three of the Nuka-Cola Quantum marketing will include: 4 (four) 30 (thirty)-second television commercials, 4 (four) 15 (fifteen)-second radio commercials and a highway billboard campaign.
|
||||
"Nuka Cola - Stage Three": """Stage Three of the Nuka-Cola Quantum marketing will include: 4 (four) 30 (thirty)-second television commercials, 4 (four) 15 (fifteen)-second radio commercials and a highway billboard campaign.
|
||||
|
||||
In this final stage we will aggressively compare the drink to other competitors and show their inferiority using hired actors at "taste tests". The actors will read pre-written scripts approved by our department. The text should give an authentic "on the spot" impression but still clearly point out Quantum's strengths.
|
||||
|
||||
The tag line will remain: "Take the leap... enjoy a Quantum!" """,
|
||||
'Capitol Post - Commies Crushed - Alaska Liberated!': """By Dorothy Proud
|
||||
"Capitol Post - Commies Crushed - Alaska Liberated!": """By Dorothy Proud
|
||||
|
||||
Capital Post Staff Writer
|
||||
|
||||
|
@ -152,7 +138,7 @@ In the late evening hours of January 10th, brave American Army forces launched a
|
|||
No red-blooded American can ever forget that terrible winter of 2066, when Chairman Cheng's commie cutthroats mercilessly invaded the icy extension of the United States, in an unprecedented act of foreign aggression that sent shockwaves all the way back to our nation's Capital.
|
||||
|
||||
But the nightmare is finally over, and America, always the home of the brave, is once again the land of the free.""",
|
||||
'Capitol Post - Food Riots Rile Feds': """By Walter "Street Beat" Munroe
|
||||
"Capitol Post - Food Riots Rile Feds": """By Walter "Street Beat" Munroe
|
||||
|
||||
Capital Post Staff Writer
|
||||
|
||||
|
@ -161,7 +147,7 @@ It would appear that Washington's tolerance for American social disorder has fin
|
|||
In a recent public statement, White House spokesman Warren Eccleston said:
|
||||
|
||||
"Okay, Americans are hungry. We get it. Well I've got news for you - things are tough all over, people. The President himself has been forced to substitute cube steak for his nightly prime rib, and the only wine available is a detestable Chateau Montrose 2043. But does he whine? Does he take to the streets like a rabid Red? So please, good people, please. Wait in line. Get your food. And then go home. We're Americans! We do not solve our problems with violence." """,
|
||||
'Capitol Post - U.S. to Annex Canada!': """By Dorothy Proud
|
||||
"Capitol Post - U.S. to Annex Canada!": """By Dorothy Proud
|
||||
|
||||
Capital Post Staff Writer
|
||||
|
||||
|
@ -174,7 +160,7 @@ Tensions with our neighbor to the north have only escalated since then as the Un
|
|||
But it was a recent near-sabotage of the Alaskan pipeline that finally tipped the American military's hand.
|
||||
|
||||
"That was the last straw," said Buzz Babcock, commander of U.S. forces in Canada. "You know what's been stopping the Reds from pouring into downtown Juneau? American soldiers, that's what. And now we've got to worry about someone - Chinese, Alaskan, or otherwise - taking out the pipeline? I don't think so. Effectively immediately, United States troops are beginning a complete takeover of all Canadian assets and resources. Little America is ours. But let's face it - it always has been." """,
|
||||
'Capitol Post - Development of Super Weapon Confirmed': """By Walter "Street Beat" Munroe
|
||||
"Capitol Post - Development of Super Weapon Confirmed": """By Walter "Street Beat" Munroe
|
||||
|
||||
Capital Post Staff Writer
|
||||
|
||||
|
@ -185,7 +171,7 @@ Speaking at an Army press conference at the Pentagon, General Constantine Chase
|
|||
Unfortunately for our readers, that's as specific as Chase is willing to get. While he and the Army are ready for China to know the U.S. is developing a new weapon, they're not quite ready to divulge just what it is, or when it will be ready for deployment.
|
||||
|
||||
"All in due time, all in due time. Rest assured, when this weapon is complete, liberty will come to Anchorage... and Hell will follow." """,
|
||||
'Capitol Post - United Nations Disbanded!': """By Dorothy Proud
|
||||
"Capitol Post - United Nations Disbanded!": """By Dorothy Proud
|
||||
|
||||
Capital Post Staff Writer
|
||||
|
||||
|
@ -196,7 +182,7 @@ Many had considered the United Nations the best hope for brokering a ceasefire b
|
|||
In a somber press conference at the United Nations building in New York City, United Nations president Sakugama Okiri had this to say: "It is a sad day for the United States. Sadder still for the world. An era of relative peace and prosperity has come to a tragic end. The Resources Wars are upon us, and in my humble opinion the United Nations is needed now more than ever. Sadly, the world disagrees."
|
||||
|
||||
Those nations that have not already moved out of the immense headquarters will have completely vacated the premises by the end of the week. Several organizations have already begun bidding on the prime real estate, but children's toy retailer Bumbalo's seems determined to transform the building into their new East Coast superstore.""",
|
||||
'Capitol Post - Pint-Sized Slasher: More than Myth?': """By Walter "Street Beat" Munroe
|
||||
"Capitol Post - Pint-Sized Slasher: More than Myth?": """By Walter "Street Beat" Munroe
|
||||
|
||||
Capital Post Staff Writer
|
||||
|
||||
|
@ -207,18 +193,18 @@ According to Germantown police chief Joseph Field, the Pint-Sized Slasher may be
|
|||
Add to the sinister forensic findings this statement from Christopher Atkinson, the one surviving victim of the adolescent assassin, and it becomes clear that the Pint-Sized Slasher does indeed walk among us: "The clown! The clown! He's going to kill us all, do you understand me? He stabbed my brother Shaun right in the face! He killed my brother! The little clown!"
|
||||
|
||||
But assuming the Pint-Sized Slasher is indeed a real, tangible threat to the peace loving residents of D.C. suburbia, one question remains: why? What could possible motivate a child to don a clown mask and murder innocent people in cold blood? We may never know. At least not until the miniature maniac is brought to justice. Until then, all we can do is lock our doors, kiss our children goodnight… and pray they live to see morning.""",
|
||||
'Robot Repair Center - Note From Frank': """I can't take it anymore, Bob. I don't trust those turrets in Sector A. I swear I saw one track me the other day when I left work a little late. If that thing opens up on me, I'm screwed, since the bastard Feds suspended workman's comp as part of the "war effort." Hell.
|
||||
"Robot Repair Center - Note From Frank": """I can't take it anymore, Bob. I don't trust those turrets in Sector A. I swear I saw one track me the other day when I left work a little late. If that thing opens up on me, I'm screwed, since the bastard Feds suspended workman's comp as part of the "war effort." Hell.
|
||||
|
||||
Snake helped me smuggle in some pulse grenades that I locked away in the box under my desk. I tried one out on our Handy at the house and the missus nearly killed me! Knocks 'em out like a light. If you ever need one just grab the key from behind my terminal and use it to unlock the box. You can't say I never did anything for you! See you around buddy.
|
||||
|
||||
Oh, and stop throwing those staples over at me, they get on the floor and you know how I like to take my shoes off during the day.""",
|
||||
'Robot Repair Center - Note from Management regarding Sector B': """<MEMO>
|
||||
"Robot Repair Center - Note from Management regarding Sector B": """<MEMO>
|
||||
attn: Warehouse/Repair employees
|
||||
|
||||
Please make sure the main platform in the Repair Sector is properly raised before releasing the repaired bots from their pods. All units receive fimware programming to make their way to the main entrance and await pickup. Let's get them there safely and not repeat last week's accident involving a Protectron falling to the lower level. That error cost us time, money, and was an embarrassment to the company and our DCTA account client.
|
||||
|
||||
-- Management""",
|
||||
'L.O.B. Enterprises - Email: Weapon Practice Tonight?': """From: McCoy, Derrick
|
||||
"L.O.B. Enterprises - Email: Weapon Practice Tonight?": """From: McCoy, Derrick
|
||||
To: Entire Company
|
||||
|
||||
Subject: Weapon Practice Tonight?
|
||||
|
@ -226,17 +212,17 @@ Subject: Weapon Practice Tonight?
|
|||
If anyone would like to practice with their "low-grade, military-class" company issue, Sam and I will be shooting rounds off in the yard at 7:00PM.
|
||||
|
||||
BYOB.""",
|
||||
'L.O.B. Enterprises - Re: Weapon Practice': """From: McAndrews, Jeanne
|
||||
"L.O.B. Enterprises - Re: Weapon Practice": """From: McAndrews, Jeanne
|
||||
To: McCoy, Derrick
|
||||
Subject: Re: Weapon Practice Tonight?
|
||||
Sure, I'll definitely be there. I wouldn't miss a chance to have my weapon accidentally discharge and hit that "grenade" in Sam's pocket.""",
|
||||
'L.O.B. Enterprises - Sent Item: MAN THE DOORS!!': """From: Warring, Joanna
|
||||
"L.O.B. Enterprises - Sent Item: MAN THE DOORS!!": """From: Warring, Joanna
|
||||
To: Entire Company
|
||||
|
||||
Subject: Oh, !@#
|
||||
|
||||
THEY'RE HERE! MAN THE DOORS! THE FEDS ARE HERE!""",
|
||||
'L.O.B. Enterprises - All Personnel: Caps in Emails': """From: Director of Human Resources
|
||||
"L.O.B. Enterprises - All Personnel: Caps in Emails": """From: Director of Human Resources
|
||||
To: Entire Company
|
||||
|
||||
Subject: Caps in Emails
|
||||
|
@ -246,37 +232,37 @@ I would like to remind everyone that, despite the impending Federal invasion, st
|
|||
Specifically, do not write emails in all caps. This style is offensive to your coworkers.
|
||||
|
||||
Thank you for your cooperation.""",
|
||||
'L.O.B. Enterprises - Memo: Responding to Federal Raids': """Internal Memorandum
|
||||
"L.O.B. Enterprises - Memo: Responding to Federal Raids": """Internal Memorandum
|
||||
|
||||
Due to the increased awareness of our upcoming project milestone, you and your fellow employees may be required to initiate Emergency Defensive Procedures, as outlined in the Employee Handbook. If required, please review policies #H31, #L04, #L05, #P55, #T01.
|
||||
|
||||
Your continued adherence to company policy is appreciated.""",
|
||||
'L.O.B. Enterprises - Weapons Policy #H31': """Weapons Policy #H31
|
||||
"L.O.B. Enterprises - Weapons Policy #H31": """Weapons Policy #H31
|
||||
|
||||
As standard policy, all employees are required to carry low-grade military-class weaponry at all times (see HR Policy#A12). In the event of a hostile takeover, your desk can be used as a makeshift barricade. Position the desk between yourself and your opponent, then crouch behind the desk while firing any weapon approved on Form B43-2.
|
||||
|
||||
NOTE: Cafeteria privileges will be suspended in the event of a hostile takeover.""",
|
||||
'L.O.B. Enterprises - Evacuation Policy #T01': """Evacuation Policy #T01
|
||||
"L.O.B. Enterprises - Evacuation Policy #T01": """Evacuation Policy #T01
|
||||
|
||||
In the event of emergency evacuation scenario F1-a, all executive staff not under penalty are to be evacuated from the building via the archives and connected civic tunnels. All other personnel will remain behind to safeguard active projvects{sic} from imminent Federal inquiry.
|
||||
|
||||
All employees are tasked with barricading the main doors, and will be further tasked with keeping the building secured until 5:00 PM, or until the Chief of Security enacts protocol #T81. The usual lunch break will be suspended for that day.""",
|
||||
'L.O.B. Enterprises - Inclement Weather Policy #C31': """Inclement Weather Policy #C31
|
||||
"L.O.B. Enterprises - Inclement Weather Policy #C31": """Inclement Weather Policy #C31
|
||||
|
||||
In the event of extreme winter (nuclear) conditions, all employees are required to proceed to human resources and complete forms D87-a, D87-b, H04-1, and A14-3, addendum 7. In accordance with company policy #L83, employees will be issued iodine tablets, personal geiger counter, meal rations, and sworn into the sovereign L.O.B. republic.""",
|
||||
'L.O.B. Enterprises - Lab Report: Prototype ZRIN-363': """Lab Report: Prototype ZRIN-363
|
||||
"L.O.B. Enterprises - Lab Report: Prototype ZRIN-363": """Lab Report: Prototype ZRIN-363
|
||||
|
||||
Experimental prototype makes extensive use of hardware common to liquid ammunition flame projection weapons. While initial test results were impressive, extreme weight of unit (118.3kg) and fume inhalation rendered most test subjects incapable of firing the unit or remaining conscious under typical field conditions.""",
|
||||
'L.O.B. Enterprises - Lab Report: Prototype ZRIN-375': """Lab Report: Prototype ZRIN-375
|
||||
"L.O.B. Enterprises - Lab Report: Prototype ZRIN-375": """Lab Report: Prototype ZRIN-375
|
||||
|
||||
Prototype introduces proprietary ammunition type. Conventional 10mm shells house a caplet containing amalgamating agents. When the caplet was broken in lab tests, localized fireburst and shrapnel projection met requirements for project. However, in field tests amalgam caplet ammunition proved too fragile, and several detonated from excessive vibration or walk speed.""",
|
||||
'L.O.B. Enterprises - Lab Report: Prototype ZRIN-401': """Lab Report: Prototype ZRIN-401
|
||||
"L.O.B. Enterprises - Lab Report: Prototype ZRIN-401": """Lab Report: Prototype ZRIN-401
|
||||
|
||||
Prototype attempts to refine results of acumist coating within weapon barrel. Initial tests showed promise. As predicted, delivery friction super-heats projectile as it is delivered from the weapon, and conventional 10mm ammunition can be used. However; during live-fire testing, subjects firing the weapon in rapid succession suffered severe burns to the fingers and palm.""",
|
||||
'L.O.B. Enterprises - Lab Report: Prototype ZRIN-418': """Lab Report: Prototype ZRIN-418
|
||||
"L.O.B. Enterprises - Lab Report: Prototype ZRIN-418": """Lab Report: Prototype ZRIN-418
|
||||
|
||||
Prototype refines acumist barrel experiments by addition of retardant jacketing, as well as internal heat diffusers. Rate of fire diminished from un-modified version of weapon. Conventional 10mm ammunition does not fully liquefy until impact, giving the 418 exceptional accuracy compared to earlier prototypes. Live-fire tests report no major casualties. Recommend ZRIN-418 as production candidate.""",
|
||||
'Vault 101 - CONFIDENTIAL': """CONFIDENTIAL!
|
||||
"Vault 101 - CONFIDENTIAL": """CONFIDENTIAL!
|
||||
TOP-LEVEL SECURITY ONLY!
|
||||
|
||||
From: Chief Officer
|
||||
|
@ -289,7 +275,7 @@ I propose a midnight raid into their compound - live ammo, zero tolerance. Make
|
|||
You are not to inform the Overseer and some of our softer security guards about this plan, as they will only object and ensure our defeat. Once the deal's done, they'll see it was worth the price.
|
||||
|
||||
This'll show those scum what happens when you step out of line in our Vault.""",
|
||||
'Vault 101 - Report 2241-02-10': """As our tests suggested, the immediate vicinity of the vault is no longer dangerously irradiated, although the background radiation is still well above safe levels. Pockets of more intense radiation appear to still be common, and all surface water seems to be undrinkable. We will need to carry ample supplies of Rad-X with us on all future surveys. But hazard suits do not seem to be necessary for general exploration.
|
||||
"Vault 101 - Report 2241-02-10": """As our tests suggested, the immediate vicinity of the vault is no longer dangerously irradiated, although the background radiation is still well above safe levels. Pockets of more intense radiation appear to still be common, and all surface water seems to be undrinkable. We will need to carry ample supplies of Rad-X with us on all future surveys. But hazard suits do not seem to be necessary for general exploration.
|
||||
|
||||
Our old maps are largely useless. The town of Springvale is an abandoned ruin, and all pre-War roads have disappeared or are no longer passable.
|
||||
|
||||
|
@ -301,7 +287,7 @@ We spent a good deal of time in Megaton, and learned a great deal about the "Cap
|
|||
|
||||
Anne Palmer, Survey Team Leader
|
||||
February 10, 2241""",
|
||||
'Vault 101 - Vault-tec Instructions': """A Letter to the Overseer from Dr. Stanislaus Braun:
|
||||
"Vault 101 - Vault-tec Instructions": """A Letter to the Overseer from Dr. Stanislaus Braun:
|
||||
|
||||
If you are reading this, emergency Vault internment procedures have been initiated and you and your control group have been sealed into your Vault. Congratulations! You are now a vital part of the most ambitious program ever undertaken by Vault-Tec.
|
||||
|
||||
|
@ -312,17 +298,17 @@ Your Vault may or may not have been selected to receive a G.E.C.K. module. Pleas
|
|||
Doctor Stanislaus Braun
|
||||
Director, Societal Preservation Program
|
||||
Vault-Tec Corporation""",
|
||||
'Vault 101 - Attachment A': "Vault 101 will not receive a G.E.C.K. module, and should operate under the guidelines laid forth in the Overseer's sealed orders.",
|
||||
'Vault 101 - Vault-Tec Scientific Entry: The G.E.C.K.': """The G.E.C.K. is, quite simply, the most advanced piece of technology ever developed by Vault-Tec -- a terraforming module capability of creating life from complete lifelessness.
|
||||
"Vault 101 - Attachment A": "Vault 101 will not receive a G.E.C.K. module, and should operate under the guidelines laid forth in the Overseer's sealed orders.",
|
||||
"Vault 101 - Vault-Tec Scientific Entry: The G.E.C.K.": """The G.E.C.K. is, quite simply, the most advanced piece of technology ever developed by Vault-Tec -- a terraforming module capability of creating life from complete lifelessness.
|
||||
|
||||
After riding out the storm of nuclear Armageddon in a Vault-Tec patented vault, residents can then activate the G.E.C.K., and create a new Earthen paradise -- craters and dust will give way to rolling grasslands and sparkling clear water. Of course, due to time and monetary constraints, not every vault will be equipped with a G.E.C.K. module.""",
|
||||
'Vault 101 - External Contact Report': """The Vault recently received unexpected radio contact over the governmental Vault-Tec frequency, from an organization calling itself "The Enclave."
|
||||
"Vault 101 - External Contact Report": """The Vault recently received unexpected radio contact over the governmental Vault-Tec frequency, from an organization calling itself "The Enclave."
|
||||
|
||||
Governmental codes are valid according to the Vault's ancient records, and The Enclave put forth an offer of amnesty and unity with the official remnants of the American government, in exchange for access to the Vault and its data stores. They claim that our Vault passwords no longer match their records, preventing them from extending their offer in person.
|
||||
|
||||
After brief negotiation, I have refused entrance to this "Enclave." I cannot trust my Vault and its inhabitants to an unknown factor, much less one that would so gallantly suggest abandoning our vault's great mission.
|
||||
|
||||
All the more reason to prevent the rebels from opening the Vault to the likes of them."""
|
||||
All the more reason to prevent the rebels from opening the Vault to the likes of them.""",
|
||||
}
|
||||
|
||||
LOG_NAMES = list(LOGS.keys())
|
||||
|
|
|
@ -9,11 +9,11 @@ from time import sleep
|
|||
|
||||
LETTER_PAUSE = 5
|
||||
|
||||
INPUT_PAUSE = 500 # ms
|
||||
INPUT_PAUSE = 500 # ms
|
||||
|
||||
TYPE_DELAY = 40
|
||||
|
||||
HIDDEN_MASK = '*'
|
||||
HIDDEN_MASK = "*"
|
||||
|
||||
NEWLINE = 10
|
||||
|
||||
|
@ -30,7 +30,8 @@ _soundQueue = []
|
|||
global _queueRunning
|
||||
_queueRunning = False
|
||||
|
||||
def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False, silent = False):
|
||||
|
||||
def slowWrite(window, text, pause=LETTER_PAUSE, fake_user=False, silent=False):
|
||||
"""
|
||||
wrapper for curses.addstr() which writes the text slowly
|
||||
"""
|
||||
|
@ -38,13 +39,15 @@ def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False, silent = Fa
|
|||
texts = {0: text}
|
||||
if len(text) > width:
|
||||
while any(len(texts[ind]) > width for ind in texts.keys()):
|
||||
i = 0;
|
||||
i = 0
|
||||
for ind in texts.keys():
|
||||
if len(texts[ind]) > width:
|
||||
break
|
||||
i += 1
|
||||
texts[i+1] = f"{texts[i].split()[-1].strip()}{' '+texts[i+1].strip() if texts.get(i+1) else ''}\n"
|
||||
texts[i] = ' '.join(texts[i].split()[:-1]).strip() + '\n'
|
||||
if len(texts[ind]) > width:
|
||||
break
|
||||
i += 1
|
||||
texts[i + 1] = (
|
||||
f"{texts[i].split()[-1].strip()}{' '+texts[i+1].strip() if texts.get(i+1) else ''}\n"
|
||||
)
|
||||
texts[i] = " ".join(texts[i].split()[:-1]).strip() + "\n"
|
||||
for txt in texts.values():
|
||||
if not fake_user and not silent:
|
||||
addSound("beep")
|
||||
|
@ -55,7 +58,8 @@ def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False, silent = Fa
|
|||
if fake_user and not silent:
|
||||
_playSound("keyenter", True)
|
||||
|
||||
def upperInput(window, hidden = False, can_newline = True):
|
||||
|
||||
def upperInput(window, hidden=False, can_newline=True):
|
||||
"""
|
||||
Reads user input until enter key is pressed. Echoes the input in upper case
|
||||
|
||||
|
@ -64,7 +68,7 @@ def upperInput(window, hidden = False, can_newline = True):
|
|||
scrolled if necessary
|
||||
"""
|
||||
inchar = 0
|
||||
instr = ''
|
||||
instr = ""
|
||||
while inchar != NEWLINE:
|
||||
inchar = window.getch()
|
||||
# convert lower case to upper
|
||||
|
@ -73,7 +77,7 @@ def upperInput(window, hidden = False, can_newline = True):
|
|||
# deal with backspace
|
||||
if inchar in [DELETE, BACKSPACE]:
|
||||
if len(instr) > 0:
|
||||
#addSound("keyenter")
|
||||
# addSound("keyenter")
|
||||
instr = instr[:-1]
|
||||
cur = window.getyx()
|
||||
window.move(cur[0], cur[1] - 1)
|
||||
|
@ -84,39 +88,40 @@ def upperInput(window, hidden = False, can_newline = True):
|
|||
continue
|
||||
# output the character
|
||||
elif inchar != NEWLINE:
|
||||
#addSound("keyenter")
|
||||
# addSound("keyenter")
|
||||
instr += chr(inchar)
|
||||
if hidden:
|
||||
window.addch(HIDDEN_MASK)
|
||||
else:
|
||||
window.addch(inchar)
|
||||
elif can_newline:
|
||||
#addSound("keyenter")
|
||||
# addSound("keyenter")
|
||||
window.addch(NEWLINE)
|
||||
return instr
|
||||
|
||||
def centeredWrite(window, text, pause = LETTER_PAUSE, silent = False):
|
||||
|
||||
def centeredWrite(window, text, pause=LETTER_PAUSE, silent=False):
|
||||
"""
|
||||
Writes to the current line but centers the text
|
||||
"""
|
||||
width = window.getmaxyx()[1]
|
||||
window.move(window.getyx()[0], int(width / 2 - len(text) / 2))
|
||||
slowWrite(window, text, pause, silent = silent)
|
||||
slowWrite(window, text, pause, silent=silent)
|
||||
|
||||
|
||||
def _soundCheck():
|
||||
"""
|
||||
Internal use - Checks if the user explicity disabled sound or not
|
||||
"""
|
||||
return '--no-sound' not in sys.argv
|
||||
return "--no-sound" not in sys.argv
|
||||
|
||||
|
||||
def _playSound(file, block = False):
|
||||
def _playSound(file, block=False):
|
||||
"""
|
||||
Internal use - plays a specific sound from the current directory
|
||||
"""
|
||||
if _soundCheck():
|
||||
_play(str(_Path.cwd() / f'audio/{file}.wav'), block)
|
||||
_play(str(_Path.cwd() / f"audio/{file}.wav"), block)
|
||||
|
||||
|
||||
def _playQueue():
|
||||
|
|
|
@ -6,7 +6,7 @@ from fallout_functions import slowWrite, upperInput, addSound
|
|||
|
||||
################## text strings ######################
|
||||
|
||||
HEADER_TEXT = 'ROBCO INDUSTRIES (TM) TERMLINK PROTOCOL'
|
||||
HEADER_TEXT = "ROBCO INDUSTRIES (TM) TERMLINK PROTOCOL"
|
||||
|
||||
################## global "constants" ################
|
||||
|
||||
|
@ -25,13 +25,14 @@ HEADER_LINES = 5
|
|||
LOGIN_PAUSE = 3
|
||||
|
||||
# starting number for hex generation
|
||||
START_HEX = 0xf650
|
||||
START_HEX = 0xF650
|
||||
|
||||
# list of possible symbols for password hiding
|
||||
SYMBOLS = '!@#$%^*()_-+={}[]|\\:;\'",<>./?'
|
||||
SYMBOLS = "!@#$%^*()_-+={}[]|\\:;'\",<>./?"
|
||||
|
||||
################## functions #########################
|
||||
|
||||
|
||||
def generateHex(n):
|
||||
"""
|
||||
generates n numbers starting at START_HEX and increasing by 12 each time
|
||||
|
@ -62,8 +63,9 @@ def getPasswords():
|
|||
groups = []
|
||||
|
||||
# script file / password file location
|
||||
__location__ = os.path.realpath(os.path.join(os.getcwd(),
|
||||
os.path.dirname(__file__)))
|
||||
__location__ = os.path.realpath(
|
||||
os.path.join(os.getcwd(), os.path.dirname(__file__))
|
||||
)
|
||||
|
||||
# read from passwords.txt
|
||||
with open(os.path.join(__location__, "passwords.txt")) as pwfile:
|
||||
|
@ -96,7 +98,7 @@ def getFiller(length, passwords):
|
|||
# skip a distance based on total size to cover then place a password
|
||||
maxSkip = int(length / pwdCount - pwdLen)
|
||||
i += random.randint(maxSkip - 2, maxSkip)
|
||||
filler = filler[:i] + pwd + filler[i + pwdLen:]
|
||||
filler = filler[:i] + pwd + filler[i + pwdLen :]
|
||||
i += pwdLen
|
||||
return filler
|
||||
|
||||
|
@ -121,34 +123,46 @@ def initScreen(scr):
|
|||
fillerLength = width / 2 * fillerHeight
|
||||
passwords = getPasswords()
|
||||
filler = getFiller(fillerLength, passwords)
|
||||
fillerCol1, fillerCol2 = filler[0:len(filler)//2], filler[len(filler)//2:]
|
||||
fillerCol1, fillerCol2 = filler[0 : len(filler) // 2], filler[len(filler) // 2 :]
|
||||
|
||||
#print(fillerCol1)
|
||||
#time.sleep(15)
|
||||
#print(fillerCol2)
|
||||
#time.sleep(15)
|
||||
# print(fillerCol1)
|
||||
# time.sleep(15)
|
||||
# print(fillerCol2)
|
||||
# time.sleep(15)
|
||||
|
||||
# each column of symbols and passwords should be 1/4 of the screen
|
||||
fillerWidth = int(width / 4)
|
||||
|
||||
# print the header stuff
|
||||
slowWrite(scr, HEADER_TEXT)
|
||||
slowWrite(scr, '\nENTER PASSWORD NOW\n\n')
|
||||
slowWrite(scr, str(LOGIN_ATTEMPTS) + ' ATTEMPT(S) LEFT: ')
|
||||
slowWrite(scr, "\nENTER PASSWORD NOW\n\n")
|
||||
slowWrite(scr, str(LOGIN_ATTEMPTS) + " ATTEMPT(S) LEFT: ")
|
||||
for i in range(LOGIN_ATTEMPTS):
|
||||
scr.addch(curses.ACS_BLOCK)
|
||||
slowWrite(scr, ' ')
|
||||
slowWrite(scr, '\n\n')
|
||||
slowWrite(scr, " ")
|
||||
slowWrite(scr, "\n\n")
|
||||
|
||||
# print the hex and filler
|
||||
for i in range(fillerHeight):
|
||||
slowWrite(scr, "0x%X %s" % (hexCol1[i], fillerCol1[i * fillerWidth: (i + 1) * fillerWidth]), 1, silent = True)
|
||||
slowWrite(
|
||||
scr,
|
||||
"0x%X %s"
|
||||
% (hexCol1[i], fillerCol1[i * fillerWidth : (i + 1) * fillerWidth]),
|
||||
1,
|
||||
silent=True,
|
||||
)
|
||||
if i < fillerHeight - 1:
|
||||
scr.addstr('\n')
|
||||
scr.addstr("\n")
|
||||
|
||||
for i in range(fillerHeight):
|
||||
scr.move(HEADER_LINES + i, int(CONST_CHARS / 2 + fillerWidth))
|
||||
slowWrite(scr, '0x%X %s' % (hexCol2[i], fillerCol2[i * fillerWidth: (i + 1) * fillerWidth]), 1, silent = True)
|
||||
slowWrite(
|
||||
scr,
|
||||
"0x%X %s"
|
||||
% (hexCol2[i], fillerCol2[i * fillerWidth : (i + 1) * fillerWidth]),
|
||||
1,
|
||||
silent=True,
|
||||
)
|
||||
|
||||
scr.refresh()
|
||||
|
||||
|
@ -163,16 +177,19 @@ def moveInput(scr, inputPad):
|
|||
height = size[0]
|
||||
width = size[1]
|
||||
|
||||
inputPad.addstr('\n>')
|
||||
inputPad.addstr("\n>")
|
||||
|
||||
# cursor position relative to inputPad
|
||||
cursorPos = inputPad.getyx()
|
||||
|
||||
inputPad.refresh(0, 0,
|
||||
int(height - cursorPos[0] - 1),
|
||||
int(width / 2 + CONST_CHARS),
|
||||
int(height - 1),
|
||||
int(width - 1))
|
||||
inputPad.refresh(
|
||||
0,
|
||||
0,
|
||||
int(height - cursorPos[0] - 1),
|
||||
int(width / 2 + CONST_CHARS),
|
||||
int(height - 1),
|
||||
int(width - 1),
|
||||
)
|
||||
|
||||
|
||||
def userInput(scr, passwords):
|
||||
|
@ -207,16 +224,16 @@ def userInput(scr, passwords):
|
|||
|
||||
# write under the last line of text
|
||||
inputPad.move(cursorPos[0] - 1, cursorPos[1] - 1)
|
||||
inputPad.addstr('>' + guess.upper() + '\n')
|
||||
inputPad.addstr(">" + guess.upper() + "\n")
|
||||
|
||||
# user got password right
|
||||
if guess.upper() == pwd.upper():
|
||||
|
||||
addSound("correctpass")
|
||||
inputPad.addstr('>Exact match!\n')
|
||||
inputPad.addstr('>Please wait\n')
|
||||
inputPad.addstr('>while system\n')
|
||||
inputPad.addstr('>is accessed.\n')
|
||||
inputPad.addstr(">Exact match!\n")
|
||||
inputPad.addstr(">Please wait\n")
|
||||
inputPad.addstr(">while system\n")
|
||||
inputPad.addstr(">is accessed.\n")
|
||||
|
||||
moveInput(scr, inputPad)
|
||||
|
||||
|
@ -232,12 +249,11 @@ def userInput(scr, passwords):
|
|||
if pwd[i].upper() == guess[i].upper():
|
||||
matched += 1
|
||||
except IndexError:
|
||||
pass # user did not enter enough letters
|
||||
pass # user did not enter enough letters
|
||||
|
||||
addSound("wrongpass")
|
||||
inputPad.addstr('>Entry denied\n')
|
||||
inputPad.addstr('>' + str(matched) + '/' + str(pwdLen) +
|
||||
' correct.\n')
|
||||
inputPad.addstr(">Entry denied\n")
|
||||
inputPad.addstr(">" + str(matched) + "/" + str(pwdLen) + " correct.\n")
|
||||
|
||||
attempts -= 1
|
||||
# show remaining attempts
|
||||
|
@ -248,12 +264,13 @@ def userInput(scr, passwords):
|
|||
if i < attempts:
|
||||
scr.addch(curses.ACS_BLOCK)
|
||||
else:
|
||||
scr.addstr(' ')
|
||||
scr.addstr(' ')
|
||||
scr.addstr(" ")
|
||||
scr.addstr(" ")
|
||||
|
||||
# Out of attempts
|
||||
return None
|
||||
|
||||
|
||||
def runLogin(scr):
|
||||
"""
|
||||
Start the login portion of the terminal
|
||||
|
|
|
@ -5,8 +5,8 @@ from fallout_functions import centeredWrite
|
|||
|
||||
################## text strings ######################
|
||||
|
||||
LOCKED_1 = 'TERMINAL LOCKED'
|
||||
LOCKED_2 = 'PLEASE CONTACT AN ADMINISTRATOR'
|
||||
LOCKED_1 = "TERMINAL LOCKED"
|
||||
LOCKED_2 = "PLEASE CONTACT AN ADMINISTRATOR"
|
||||
|
||||
################## global 'constants' ################
|
||||
|
||||
|
@ -15,6 +15,7 @@ LOCKED_OUT_TIME = 5000
|
|||
|
||||
################## functions #########################
|
||||
|
||||
|
||||
def runLocked(scr):
|
||||
"""
|
||||
Start the locked out portion of the terminal
|
||||
|
@ -27,9 +28,9 @@ def runLocked(scr):
|
|||
scr.erase()
|
||||
curses.curs_set(0)
|
||||
scr.move(int(height / 2 - 1), 0)
|
||||
centeredWrite(scr, LOCKED_1, silent = True)
|
||||
centeredWrite(scr, LOCKED_1, silent=True)
|
||||
scr.move(int(height / 2 + 1), 0)
|
||||
centeredWrite(scr, LOCKED_2, silent = True)
|
||||
centeredWrite(scr, LOCKED_2, silent=True)
|
||||
scr.refresh()
|
||||
curses.napms(LOCKED_OUT_TIME)
|
||||
|
||||
|
|
|
@ -4,25 +4,27 @@ from fallout_functions import INPUT_PAUSE
|
|||
from fallout_functions import TYPE_DELAY
|
||||
from fallout_functions import upperInput
|
||||
from fallout_functions import HIDDEN_MASK
|
||||
|
||||
################## text strings ######################
|
||||
|
||||
HEADER_TEXT = 'WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK'
|
||||
HEADER_TEXT = "WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK"
|
||||
|
||||
PASSWORD_PROMPT = 'ENTER PASSWORD NOW'
|
||||
PASSWORD_PROMPT = "ENTER PASSWORD NOW"
|
||||
|
||||
PASSWORD_ERROR = 'INCORRECT PASSWORD, PLEASE TRY AGAIN'
|
||||
PASSWORD_ERROR = "INCORRECT PASSWORD, PLEASE TRY AGAIN"
|
||||
|
||||
################## global "constants" ################
|
||||
|
||||
ENTRY = 'LOGON '
|
||||
ENTRY = "LOGON "
|
||||
|
||||
################## functions #########################
|
||||
|
||||
|
||||
def runLogin(scr, hardMode, username, password):
|
||||
"""
|
||||
Start the login process
|
||||
|
||||
hardMode - boolean indicating whether the user has to enter the username
|
||||
hardMode - boolean indicating whether the user has to enter the username
|
||||
and password or if they are entered automatically
|
||||
username - the username to log in
|
||||
password - the password to log in
|
||||
|
@ -35,37 +37,37 @@ def runLogin(scr, hardMode, username, password):
|
|||
curses.noecho()
|
||||
scr.scrollok(True)
|
||||
|
||||
slowWrite(scr, HEADER_TEXT + '\n\n')
|
||||
slowWrite(scr, HEADER_TEXT + "\n\n")
|
||||
|
||||
if hardMode:
|
||||
# use must enter the correct text to proceed
|
||||
entry = ''
|
||||
entry = ""
|
||||
while entry.upper() != ENTRY.upper() + username.upper():
|
||||
slowWrite(scr, '> ')
|
||||
slowWrite(scr, "> ")
|
||||
entry = upperInput(scr)
|
||||
else:
|
||||
# input is entered for them
|
||||
slowWrite(scr, '> ')
|
||||
slowWrite(scr, "> ")
|
||||
curses.napms(INPUT_PAUSE)
|
||||
slowWrite(scr, ENTRY + username.upper() + '\n', TYPE_DELAY, True)
|
||||
slowWrite(scr, ENTRY + username.upper() + "\n", TYPE_DELAY, True)
|
||||
|
||||
slowWrite(scr, '\n' + PASSWORD_PROMPT + '\n\n')
|
||||
slowWrite(scr, "\n" + PASSWORD_PROMPT + "\n\n")
|
||||
|
||||
if hardMode:
|
||||
# use must enter the correct text to proceed
|
||||
entry = ''
|
||||
entry = ""
|
||||
while entry.upper() != password.upper():
|
||||
if entry:
|
||||
slowWrite(scr, PASSWORD_ERROR + '\n\n')
|
||||
|
||||
slowWrite(scr, '> ')
|
||||
slowWrite(scr, PASSWORD_ERROR + "\n\n")
|
||||
|
||||
slowWrite(scr, "> ")
|
||||
entry = upperInput(scr, True)
|
||||
else:
|
||||
# input is entered for them
|
||||
slowWrite(scr, '> ')
|
||||
slowWrite(scr, "> ")
|
||||
curses.napms(INPUT_PAUSE)
|
||||
password_stars = HIDDEN_MASK * len(password)
|
||||
slowWrite(scr, password_stars + '\n', TYPE_DELAY, True)
|
||||
slowWrite(scr, password_stars + "\n", TYPE_DELAY, True)
|
||||
|
||||
curses.napms(500)
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ from fallout_functions import slowWrite, centeredWrite, NEWLINE, SPACE, addSound
|
|||
|
||||
###################### Functions ############################
|
||||
|
||||
|
||||
def makeSelection(scr, SELECTIONS, MSGS):
|
||||
"""
|
||||
ALlow the user to select an option
|
||||
|
@ -20,9 +21,9 @@ def makeSelection(scr, SELECTIONS, MSGS):
|
|||
scr.move(selection_start_y, 0)
|
||||
line = 0
|
||||
for sel in SELECTIONS:
|
||||
whole_line = '> ' + SELECTIONS[line]
|
||||
whole_line = "> " + SELECTIONS[line]
|
||||
space = width - len(whole_line) % width
|
||||
whole_line += ' ' * space
|
||||
whole_line += " " * space
|
||||
|
||||
if line == selection:
|
||||
scr.addstr(whole_line, curses.A_REVERSE)
|
||||
|
@ -42,10 +43,10 @@ def makeSelection(scr, SELECTIONS, MSGS):
|
|||
addSound("keyenter")
|
||||
addSound("keyenter")
|
||||
if MSGS and MSGS[selection]:
|
||||
whole_line = '> ' + MSGS[selection]
|
||||
whole_line = "> " + MSGS[selection]
|
||||
space = width - len(whole_line) % width
|
||||
whole_line += ' ' * space
|
||||
scr.addstr(' ' * width)
|
||||
whole_line += " " * space
|
||||
scr.addstr(" " * width)
|
||||
scr.addstr(whole_line)
|
||||
scr.refresh()
|
||||
sleep(2)
|
||||
|
@ -65,10 +66,10 @@ def runSelection(scr, CENTERED_HEADERS, OTHER_HEADERS, OPTIONS, MESSAGES):
|
|||
width = scr.getmaxyx()[1]
|
||||
|
||||
for header in CENTERED_HEADERS:
|
||||
centeredWrite(scr, header + '\n')
|
||||
centeredWrite(scr, header + "\n")
|
||||
|
||||
for header in OTHER_HEADERS:
|
||||
slowWrite(scr, header + '\n')
|
||||
slowWrite(scr, header + "\n")
|
||||
|
||||
for i in range(width):
|
||||
scr.addch(curses.ACS_BSBS)
|
||||
|
@ -76,7 +77,8 @@ def runSelection(scr, CENTERED_HEADERS, OTHER_HEADERS, OPTIONS, MESSAGES):
|
|||
|
||||
return makeSelection(scr, OPTIONS, MESSAGES)
|
||||
|
||||
def beginSelection(center, other, options, messages = []):
|
||||
|
||||
def beginSelection(center, other, options, messages=[]):
|
||||
"""
|
||||
Initialize curses and start the boot process
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue