neelthee-mansion 3.20.21__tar.gz → 3.21.0__tar.gz
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-3.20.21 → neelthee_mansion-3.21.0}/PKG-INFO +1 -1
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/Mansion_of_Amnesia.py +125 -93
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion.egg-info/PKG-INFO +1 -1
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion.egg-info/SOURCES.txt +0 -2
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/setup.py +1 -1
- neelthee_mansion-3.20.21/neelthee_mansion/Mansion_of_Amnesia-win2.py +0 -1345
- neelthee_mansion-3.20.21/neelthee_mansion/Rooms-win2.py +0 -1937
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/LICENSE.md +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/README.md +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/Books.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/Quests.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/Rooms.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/__init__.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/__main__.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/all_game_utils.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/creatures.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/items.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion/utils.py +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion.egg-info/dependency_links.txt +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion.egg-info/entry_points.txt +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion.egg-info/requires.txt +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/neelthee_mansion.egg-info/top_level.txt +0 -0
- {neelthee_mansion-3.20.21 → neelthee_mansion-3.21.0}/setup.cfg +0 -0
@@ -3,6 +3,7 @@ from .creatures import *
|
|
3
3
|
from .items import *
|
4
4
|
from .Quests import *
|
5
5
|
from .all_game_utils import *
|
6
|
+
import tkinter as tk
|
6
7
|
|
7
8
|
|
8
9
|
GameState = {
|
@@ -1114,106 +1115,137 @@ def handle_guard_action(guard):
|
|
1114
1115
|
def initializer():
|
1115
1116
|
global color_coding, player, CHARACTERSLIST
|
1116
1117
|
df = pd.DataFrame(CHARACTERSLIST)
|
1117
|
-
Standord_Player = loop_til_valid_input(
|
1118
|
-
"Do you want to use a premade character?", "you didn't answer Y or N.", Y_N
|
1119
|
-
).value
|
1120
1118
|
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1119
|
+
# A tkinter window that asks these questions, instead of the console.Include a button that says "Exit Game". When the button is clicked, the game exits. Include a button that says "premade character". When the button is clicked, a new window opens that lets you choose one of the premade characters from teh CHARACTERSLIST var. Include a button that says "custom character". When the button is clicked, a new window opens that asks them for a name, age, hight, and waight(LBs).
|
1120
|
+
def create_main_menu():
|
1121
|
+
def select_character():
|
1122
|
+
selected_index = character_listbox.curselection()
|
1123
|
+
if selected_index:
|
1124
|
+
selected_character = CHARACTERSLIST[selected_index[0]]
|
1125
|
+
name_entry.delete(0, tk.END)
|
1126
|
+
name_entry.insert(0, selected_character['name'])
|
1127
|
+
age_entry.delete(0, tk.END)
|
1128
|
+
age_entry.insert(0, selected_character['age'])
|
1129
|
+
height_entry.delete(0, tk.END)
|
1130
|
+
height_entry.insert(0, selected_character['height'])
|
1131
|
+
weight_entry.delete(0, tk.END)
|
1132
|
+
weight_entry.insert(0, selected_character['weight(LBs)'])
|
1133
|
+
character_window.destroy()
|
1134
|
+
|
1135
|
+
def show_premade_characters():
|
1136
|
+
global character_window, character_listbox
|
1137
|
+
character_window = tk.Toplevel(root)
|
1138
|
+
character_window.title("Select Premade Character")
|
1139
|
+
character_listbox = tk.Listbox(character_window, width=50)
|
1140
|
+
for character in CHARACTERSLIST:
|
1141
|
+
character_info = f"Name: {character['name']}, Age: {character['age']}, Height: {character['height']}, Weight: {character['weight(LBs)']} LBs"
|
1142
|
+
character_listbox.insert(tk.END, character_info)
|
1143
|
+
character_listbox.pack()
|
1144
|
+
select_button = tk.Button(character_window, text="Select", command=select_character)
|
1145
|
+
select_button.pack()
|
1146
|
+
|
1147
|
+
def custom_character():
|
1148
|
+
name_entry.delete(0, tk.END)
|
1149
|
+
age_entry.delete(0, tk.END)
|
1150
|
+
height_entry.delete(0, tk.END)
|
1151
|
+
weight_entry.delete(0, tk.END)
|
1152
|
+
|
1153
|
+
def choose_background():
|
1154
|
+
background_window = tk.Toplevel(root)
|
1155
|
+
background_window.title("Choose Background")
|
1156
|
+
|
1157
|
+
tk.Label(background_window, text="Select a Background for Your Character:").pack()
|
1158
|
+
|
1159
|
+
background_listbox = tk.Listbox(background_window)
|
1160
|
+
for background in BACKGROUNDS.keys():
|
1161
|
+
background_listbox.insert(tk.END, background)
|
1162
|
+
background_listbox.pack()
|
1163
|
+
|
1164
|
+
def select_background():
|
1165
|
+
selected_index = background_listbox.curselection()
|
1166
|
+
if selected_index:
|
1167
|
+
background = list(BACKGROUNDS.keys())[selected_index[0]]
|
1168
|
+
background_skills = BACKGROUNDS[background]
|
1169
|
+
global player
|
1170
|
+
selected_character = {
|
1171
|
+
"name": name_entry.get(),
|
1172
|
+
"age": age_entry.get(),
|
1173
|
+
"height": height_entry.get(),
|
1174
|
+
"weight": weight_entry.get()
|
1175
|
+
}
|
1176
|
+
player = PC(
|
1177
|
+
selected_character["name"],
|
1178
|
+
selected_character["age"],
|
1179
|
+
background,
|
1180
|
+
1,
|
1181
|
+
"Solder",
|
1182
|
+
selected_character["height"],
|
1183
|
+
selected_character["weight"],
|
1184
|
+
Skills=background_skills,
|
1185
|
+
CURRENTROOM="Hall"
|
1186
|
+
)
|
1187
|
+
start_game()
|
1140
1188
|
|
1141
|
-
|
1142
|
-
|
1143
|
-
"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.",
|
1144
|
-
colorTrue=False,
|
1145
|
-
)
|
1189
|
+
select_button = tk.Button(background_window, text="Select", command=select_background)
|
1190
|
+
select_button.pack()
|
1146
1191
|
|
1147
|
-
|
1148
|
-
|
1149
|
-
"You didn't enter a string. Please enter a string.",
|
1150
|
-
str,
|
1151
|
-
)
|
1152
|
-
age = loop_til_valid_input(
|
1153
|
-
"What is your age (in whole years)?",
|
1154
|
-
"You didn't enter an integer. Please enter an integer.",
|
1155
|
-
int,
|
1156
|
-
)
|
1157
|
-
height = loop_til_valid_input(
|
1158
|
-
"What is your height?",
|
1159
|
-
"You didn't enter your height in the correct format. Please enter your height in the correct format.",
|
1160
|
-
Height,
|
1161
|
-
)
|
1162
|
-
weight = loop_til_valid_input(
|
1163
|
-
"What is your weight (in lbs)?",
|
1164
|
-
"You didn't enter an integer. Please enter an integer.",
|
1165
|
-
int,
|
1166
|
-
)
|
1192
|
+
def exit_game():
|
1193
|
+
exit()
|
1167
1194
|
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1195
|
+
def continue_setup():
|
1196
|
+
ask_color_coding()
|
1197
|
+
|
1198
|
+
def start_game():
|
1199
|
+
# I will add more logic for starting the game later
|
1200
|
+
root.destroy()
|
1171
1201
|
|
1172
|
-
|
1173
|
-
|
1202
|
+
def ask_color_coding():
|
1203
|
+
color_window = tk.Toplevel(root)
|
1204
|
+
color_window.title("Color Coding")
|
1205
|
+
tk.Label(color_window, text="Do you want color coding?").pack()
|
1206
|
+
tk.Button(color_window, text="Yes", command=lambda: set_color_coding(True)).pack()
|
1207
|
+
tk.Button(color_window, text="No", command=lambda: set_color_coding(False)).pack()
|
1174
1208
|
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
for idx, (background_name, background_skills) in enumerate(BACKGROUNDS.items()):
|
1181
|
-
formatted_skills = ", ".join(background_skills)
|
1182
|
-
type_text(f"{idx + 1}. {background_name} - {formatted_skills}")
|
1183
|
-
|
1184
|
-
# Prompt the user to pick a background by number.
|
1185
|
-
background = loop_til_valid_input(
|
1186
|
-
"What background do you want? (please select the number to the left of them)",
|
1187
|
-
"You didn't pick one",
|
1188
|
-
int,
|
1189
|
-
)
|
1209
|
+
def set_color_coding(choice):
|
1210
|
+
global color_coding
|
1211
|
+
color_coding = choice
|
1212
|
+
# Add your logic for enabling/disabling color coding here
|
1213
|
+
choose_background()
|
1190
1214
|
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1215
|
+
root = tk.Tk()
|
1216
|
+
root.title("Character Creation")
|
1217
|
+
|
1218
|
+
tk.Label(root, text="Name:").pack()
|
1219
|
+
name_entry = tk.Entry(root)
|
1220
|
+
name_entry.pack()
|
1221
|
+
|
1222
|
+
tk.Label(root, text="Age:").pack()
|
1223
|
+
age_entry = tk.Entry(root)
|
1224
|
+
age_entry.pack()
|
1225
|
+
|
1226
|
+
tk.Label(root, text="Height:").pack()
|
1227
|
+
height_entry = tk.Entry(root)
|
1228
|
+
height_entry.pack()
|
1229
|
+
|
1230
|
+
tk.Label(root, text="Weight (LBs):").pack()
|
1231
|
+
weight_entry = tk.Entry(root)
|
1232
|
+
weight_entry.pack()
|
1233
|
+
|
1234
|
+
premade_button = tk.Button(root, text="Premade Character", command=show_premade_characters)
|
1235
|
+
premade_button.pack()
|
1236
|
+
|
1237
|
+
custom_button = tk.Button(root, text="Custom Character", command=custom_character)
|
1238
|
+
custom_button.pack()
|
1239
|
+
|
1240
|
+
continue_button = tk.Button(root, text="Continue", command=continue_setup)
|
1241
|
+
continue_button.pack()
|
1242
|
+
|
1243
|
+
exit_button = tk.Button(root, text="Exit Game", command=exit_game)
|
1244
|
+
exit_button.pack()
|
1245
|
+
|
1246
|
+
root.mainloop()
|
1247
|
+
|
1248
|
+
create_main_menu()
|
1217
1249
|
|
1218
1250
|
|
1219
1251
|
def main():
|
@@ -2,10 +2,8 @@ LICENSE.md
|
|
2
2
|
README.md
|
3
3
|
setup.py
|
4
4
|
neelthee_mansion/Books.py
|
5
|
-
neelthee_mansion/Mansion_of_Amnesia-win2.py
|
6
5
|
neelthee_mansion/Mansion_of_Amnesia.py
|
7
6
|
neelthee_mansion/Quests.py
|
8
|
-
neelthee_mansion/Rooms-win2.py
|
9
7
|
neelthee_mansion/Rooms.py
|
10
8
|
neelthee_mansion/__init__.py
|
11
9
|
neelthee_mansion/__main__.py
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="neelthee_mansion",
|
5
|
-
version="3.
|
5
|
+
version="3.21.0", # Update version number for each release
|
6
6
|
packages=find_packages(), # Automatically finds all packages and modules
|
7
7
|
install_requires=[
|
8
8
|
"wheel",
|