neelthee-mansion 3.21.12__py3-none-any.whl → 3.22.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- neelthee_mansion/Mansion_of_Amnesia.py +39 -108
- {neelthee_mansion-3.21.12.dist-info → neelthee_mansion-3.22.2.dist-info}/METADATA +1 -1
- {neelthee_mansion-3.21.12.dist-info → neelthee_mansion-3.22.2.dist-info}/RECORD +7 -7
- {neelthee_mansion-3.21.12.dist-info → neelthee_mansion-3.22.2.dist-info}/LICENSE.md +0 -0
- {neelthee_mansion-3.21.12.dist-info → neelthee_mansion-3.22.2.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.21.12.dist-info → neelthee_mansion-3.22.2.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.21.12.dist-info → neelthee_mansion-3.22.2.dist-info}/top_level.txt +0 -0
@@ -399,17 +399,45 @@ def start():
|
|
399
399
|
showInstructions()
|
400
400
|
|
401
401
|
|
402
|
+
def get_inventory_text():
|
403
|
+
the_inventory = [
|
404
|
+
itemnum.name for itemnum in player.inventory if isinstance(itemnum, item)
|
405
|
+
]
|
406
|
+
return f'\nInventory: \033[34m{", ".join(the_inventory)}\033[0m; Money: {player.money}; XP: {player.xp}; Level: {player.Level}'
|
407
|
+
|
408
|
+
def show_player_info():
|
409
|
+
global info_label, root
|
410
|
+
root = tk.Tk()
|
411
|
+
root.title("Player Info")
|
412
|
+
|
413
|
+
info_text = get_inventory_text()
|
414
|
+
info_label = tk.Label(root, text=info_text)
|
415
|
+
info_label.pack()
|
416
|
+
|
417
|
+
update_button = tk.Button(root, text="Update Info", command=update_player_info)
|
418
|
+
update_button.pack()
|
419
|
+
|
420
|
+
root.mainloop()
|
421
|
+
|
422
|
+
def update_player_info():
|
423
|
+
global root, info_label
|
424
|
+
info_text = get_inventory_text()
|
425
|
+
root.after(0, lambda: info_label.config(text=info_text))
|
426
|
+
|
427
|
+
def start_tkinter_thread():
|
428
|
+
thread = threading.Thread(target=show_player_info)
|
429
|
+
thread.daemon = True
|
430
|
+
thread.start()
|
431
|
+
|
432
|
+
|
402
433
|
def showStatus():
|
403
434
|
global player
|
404
435
|
|
405
436
|
# Display player's current status
|
406
437
|
text = f"\n---------------------------"
|
407
438
|
|
408
|
-
# Display the current
|
409
|
-
|
410
|
-
itemnum.name for itemnum in player.inventory if isinstance(itemnum, item)
|
411
|
-
]
|
412
|
-
text += f'\nInventory: %*BLUE*%{", ".join(the_inventory)}%*RESET*%; Money: {player.money}; XP: {player.xp}; Level: {player.Level}'
|
439
|
+
# Display the current stats
|
440
|
+
update_player_info()
|
413
441
|
|
414
442
|
# Display possible directions of travel
|
415
443
|
text = display_directions(text)
|
@@ -1162,11 +1190,11 @@ def initializer():
|
|
1162
1190
|
background_listbox.pack()
|
1163
1191
|
|
1164
1192
|
def select_background():
|
1193
|
+
global player
|
1165
1194
|
selected_index = background_listbox.curselection()
|
1166
1195
|
if selected_index:
|
1167
1196
|
background = list(BACKGROUNDS.keys())[selected_index[0]]
|
1168
1197
|
background_skills = BACKGROUNDS[background]
|
1169
|
-
global player
|
1170
1198
|
selected_character = {
|
1171
1199
|
"name": name_entry.get(),
|
1172
1200
|
"age": age_entry.get(),
|
@@ -1181,7 +1209,8 @@ def initializer():
|
|
1181
1209
|
"Solder",
|
1182
1210
|
selected_character["height"],
|
1183
1211
|
selected_character["weight"],
|
1184
|
-
Skills=background_skills
|
1212
|
+
Skills=background_skills,
|
1213
|
+
CURRENTROOM="Hall"
|
1185
1214
|
)
|
1186
1215
|
start_game()
|
1187
1216
|
|
@@ -1246,107 +1275,6 @@ def initializer():
|
|
1246
1275
|
|
1247
1276
|
create_main_menu()
|
1248
1277
|
|
1249
|
-
#Standord_Player = loop_til_valid_input(
|
1250
|
-
# "Do you want to use a premade character?", "you didn't answer Y or N.", Y_N
|
1251
|
-
#).value
|
1252
|
-
|
1253
|
-
#if Standord_Player:
|
1254
|
-
# while True:
|
1255
|
-
# type_text("Who do you want to play as?", colorTrue=False)
|
1256
|
-
# print(df)
|
1257
|
-
# selected_character = loop_til_valid_input(
|
1258
|
-
# "Who do you want to play as? (please select the number to the left of there stats)",
|
1259
|
-
# "That wasn't one of the characters. Please choose one.",
|
1260
|
-
# int,
|
1261
|
-
# )
|
1262
|
-
# lstIndex = last_index(CHARACTERSLIST)
|
1263
|
-
# if selected_character <= lstIndex:
|
1264
|
-
# character_info = CHARACTERSLIST[selected_character]
|
1265
|
-
# name = character_info["name"]
|
1266
|
-
# age = character_info["age"]
|
1267
|
-
# height = character_info["height"]
|
1268
|
-
# weight = character_info["weight(LBs)"]
|
1269
|
-
# break
|
1270
|
-
# else:
|
1271
|
-
# type_text(colorTrue=False)
|
1272
|
-
|
1273
|
-
#else:
|
1274
|
-
# type_text(
|
1275
|
-
# "You will now have to enter a name, age, height, and weight. Please enter the height in this format: _ft _. These will be used throughout the game.",
|
1276
|
-
# colorTrue=False,
|
1277
|
-
# )
|
1278
|
-
|
1279
|
-
# name = loop_til_valid_input(
|
1280
|
-
# "What is your name?",
|
1281
|
-
# "You didn't enter a string. Please enter a string.",
|
1282
|
-
# str,
|
1283
|
-
# )
|
1284
|
-
# age = loop_til_valid_input(
|
1285
|
-
# "What is your age (in whole years)?",
|
1286
|
-
# "You didn't enter an integer. Please enter an integer.",
|
1287
|
-
# int,
|
1288
|
-
# )
|
1289
|
-
# height = loop_til_valid_input(
|
1290
|
-
# "What is your height?",
|
1291
|
-
# "You didn't enter your height in the correct format. Please enter your height in the correct format.",
|
1292
|
-
# Height,
|
1293
|
-
# )
|
1294
|
-
# weight = loop_til_valid_input(
|
1295
|
-
# "What is your weight (in lbs)?",
|
1296
|
-
# "You didn't enter an integer. Please enter an integer.",
|
1297
|
-
# int,
|
1298
|
-
# )
|
1299
|
-
|
1300
|
-
#color_coding = loop_til_valid_input(
|
1301
|
-
# "Do you want color coding (Y/N)?", "you didn't answer Y or N.", Y_N
|
1302
|
-
#).value
|
1303
|
-
|
1304
|
-
#background_name = []
|
1305
|
-
#background_skills = []
|
1306
|
-
|
1307
|
-
#while True:
|
1308
|
-
# type_text("") # Prints an empty line
|
1309
|
-
# type_text("0. Random")
|
1310
|
-
|
1311
|
-
# # Display each background with its skills formatted correctly.
|
1312
|
-
# for idx, (background_name, background_skills) in enumerate(BACKGROUNDS.items()):
|
1313
|
-
# formatted_skills = ", ".join(background_skills)
|
1314
|
-
# type_text(f"{idx + 1}. {background_name} - {formatted_skills}")
|
1315
|
-
|
1316
|
-
# # Prompt the user to pick a background by number.
|
1317
|
-
# background = loop_til_valid_input(
|
1318
|
-
# "What background do you want? (please select the number to the left of them)",
|
1319
|
-
# "You didn't pick one",
|
1320
|
-
# int,
|
1321
|
-
# )
|
1322
|
-
|
1323
|
-
# length = len(BACKGROUNDS)
|
1324
|
-
# if 1 <= background <= length:
|
1325
|
-
# # Get the background name and skills based on user choice.
|
1326
|
-
# background_name = list(BACKGROUNDS.keys())[background - 1]
|
1327
|
-
# background_skills = BACKGROUNDS[background_name]
|
1328
|
-
# break
|
1329
|
-
# elif background == 0:
|
1330
|
-
# # Randomly select a background and get its associated skills.
|
1331
|
-
# background_name = choice(list(BACKGROUNDS.keys()))
|
1332
|
-
# background_skills = BACKGROUNDS[background_name]
|
1333
|
-
# break
|
1334
|
-
# else:
|
1335
|
-
# type_text("You didn't pick one")
|
1336
|
-
|
1337
|
-
## start the player in the Hall and sets up everything else
|
1338
|
-
#player = PC(
|
1339
|
-
# name,
|
1340
|
-
# age,
|
1341
|
-
# background,
|
1342
|
-
# 1,
|
1343
|
-
# "Soldier",
|
1344
|
-
# height,
|
1345
|
-
# weight,
|
1346
|
-
# CURRENTROOM="Hall",
|
1347
|
-
# Skills=background_skills,
|
1348
|
-
#)
|
1349
|
-
|
1350
1278
|
|
1351
1279
|
def main():
|
1352
1280
|
global player, color_coding
|
@@ -1357,6 +1285,9 @@ def main():
|
|
1357
1285
|
# shows the instructions
|
1358
1286
|
start()
|
1359
1287
|
|
1288
|
+
# starts the tkinter thread that shows the player's stats
|
1289
|
+
start_tkinter_thread()
|
1290
|
+
|
1360
1291
|
# loop forever while the player wants to play
|
1361
1292
|
while True:
|
1362
1293
|
command()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
neelthee_mansion/Books.py,sha256=Zs6GOi12vrikne-E37LdrLNRb6CyUogOCDApDGFj6Ls,26168
|
2
|
-
neelthee_mansion/Mansion_of_Amnesia.py,sha256=
|
2
|
+
neelthee_mansion/Mansion_of_Amnesia.py,sha256=oP1EmSizRcfnGTk2QW8TOO0AHEQGjDbKDf_x1qC5mTo,52870
|
3
3
|
neelthee_mansion/Quests.py,sha256=pUlru2RugP57MACQORZaF_X9lsbefTdPYTSO474phgo,2791
|
4
4
|
neelthee_mansion/Rooms.py,sha256=CgenMX9ssTCWbDFopX6GHhNDnRYF5MpaDufWvt5fPwU,86025
|
5
5
|
neelthee_mansion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -8,9 +8,9 @@ neelthee_mansion/all_game_utils.py,sha256=AasunTkFmgAqt9ZIoYmymi4R7leBe4ubW-C1ts
|
|
8
8
|
neelthee_mansion/creatures.py,sha256=vUR8PmdiftCFBCGJbHkCT4AMUPvqwouDGQ4ye2fiPCw,20910
|
9
9
|
neelthee_mansion/items.py,sha256=--DtMCZrurDAe3S-gB5DXAul_kmG9BGB0QmBY2-Fphc,6383
|
10
10
|
neelthee_mansion/utils.py,sha256=GaCkein6dppeufYfBMk59gHAE2b4p9TJW2MsRjyyFvQ,13702
|
11
|
-
neelthee_mansion-3.
|
12
|
-
neelthee_mansion-3.
|
13
|
-
neelthee_mansion-3.
|
14
|
-
neelthee_mansion-3.
|
15
|
-
neelthee_mansion-3.
|
16
|
-
neelthee_mansion-3.
|
11
|
+
neelthee_mansion-3.22.2.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
|
12
|
+
neelthee_mansion-3.22.2.dist-info/METADATA,sha256=KsCVgTzx4ontnMbt7LhytBv2JNabt07qyoQyQ_NkILA,1756
|
13
|
+
neelthee_mansion-3.22.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
14
|
+
neelthee_mansion-3.22.2.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
15
|
+
neelthee_mansion-3.22.2.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
16
|
+
neelthee_mansion-3.22.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|