Skip to content

Commit

Permalink
Fix: A few issues with the change to the script (#1481)
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMWolfs authored Nov 30, 2024
1 parent ce226f7 commit beee377
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/scripts/updateMuseum.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def processMuseumData(internalName, data):
armor.add(armorSet)
if armorSet in setOverride:
addPieceToSet(setOverride[armorSet], armorSet)
return
continue
addPieceToSet(internalName, armorSet)
else:
donationXp = data.get('donation_xp', 0)
Expand Down Expand Up @@ -81,6 +81,7 @@ def addPieceToSet(piece, setName):
"CLOAK",
]

# Manually added overrides for armor sets as the Hypixel API does not provide the correct data
setOverride = {
"BLAZE": [
"BLAZE_BOOTS",
Expand All @@ -98,7 +99,7 @@ def addPieceToSet(piece, setName):
"ENDER_BELT",
"ENDER_CLOAK",
"ENDER_GAUNTLET",
"ENDER_NECKLACE"
"ENDER_NECKLACE",
"END_BOOTS",
"END_CHESTPLATE",
"END_HELMET",
Expand Down Expand Up @@ -193,7 +194,7 @@ def findAppropriateId(setName):
maxValues['total'] = maxValues['weapons'] + maxValues['armor'] + maxValues['rarities']

outputJson = {
"notice": "This file is automatically generated and should not be modified manually. Please edit the `updatedMuseum.py` file instead.",
"notice": "This file is automatically generated and should not be modified manually. Please edit the `updateMuseum.py` file instead.",
"weapons": sorted(list(weapons), key=lambda item: (itemToXp.get(item, 0), item)),
"armor": sorted(list(armor), key=lambda item: (itemToXp.get(item, 0), item)),
"rarities": sorted(list(rarities), key=lambda item: (itemToXp.get(item, 0), item)),
Expand Down

0 comments on commit beee377

Please sign in to comment.