Skip to content

Commit c29b33a

Browse files
Merge pull request #7 from nbusseneau/pr/fix-priority-sorting
fix sorting mods by priority not working
2 parents 53ea7c1 + 2ab8f77 commit c29b33a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

modimporter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ def isedited(base):
568568
return True
569569
return False
570570

571-
def sortmods(base,mods):
572-
codes[base] = deque(sorted(codes[base],key=lambda x: x.ep))
571+
def sortmods(mods):
572+
return sorted(mods,key=lambda x: x.ep)
573573

574574
def makeedit(base,mods,echo=True):
575575
Path(bakdir+"/"+"/".join(base.split("/")[:-1])).mkdir(parents=True, exist_ok=True)
@@ -664,7 +664,7 @@ def start():
664664

665665
print("\nModified files for "+game+" mods:")
666666
for base, mods in codes.items():
667-
sortmods(base,mods)
667+
mods = sortmods(mods)
668668
makeedit(base,mods)
669669

670670
bs = len(codes)

0 commit comments

Comments
 (0)