Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue with single char multi slot mods #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions reslotterGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def SetsearchDir(firstLoad=True):
searchDir = filedialog.askdirectory(title = "Select your mod's main folder")
if (searchDir == ""):
if (firstLoad):
root.destroy()
sys.exit("User exited")
root.destroy()
sys.exit("User exited")
elif (IsValidSearch(searchDir) == False):
messagebox.showerror(root.title(),"Please select the root of your mod's folder! This folder should contain a fighter folder within it!")
if (firstLoad):
root.destroy()
sys.exit("Not a fighter folder")
root.destroy()
sys.exit("Not a fighter folder")
return searchDir

#make sure that it is a validated search folder, otherwise quit
Expand Down Expand Up @@ -135,7 +135,7 @@ def InitSearch(firstLoad=True):
searchDir = SetsearchDir(firstLoad)

if (searchDir == "" and not firstLoad):
return False
return False

root.searchDir = searchDir
#Write new location to config file
Expand Down Expand Up @@ -512,10 +512,15 @@ def GetAssumedShareSlot(source,fighter):
return 0

def GetLastTarget(currentSlot):
if currentSlot in config["DEFAULT"]:
targetSlotStr = config["DEFAULT"][currentSlot]
return int(config["DEFAULT"][currentSlot].replace("+","").replace("c",""))+1
return 0
if currentSlot in config["DEFAULT"]:
targetSlotStr = config["DEFAULT"][currentSlot]
try:
targetSlotInt = int(targetSlotStr.replace("+", "").replace("c", ""))
except ValueError:
# handle the case where targetSlotStr is not a valid integer
targetSlotInt = 0
return targetSlotInt + 1
return 0

def RefreshSlotWindow():
for widget in root.frameCombos.winfo_children():
Expand Down