Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowTabitha committed Jan 15, 2024
1 parent c031484 commit 404fb5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def getBlueSpaceCodeOne(amount, switch):

def getRedSpaceCodeOne(amount, switch):
return f'''
MP1 - Blue Spaces Give ONEBLUE Coins: ONEREDSWITCH
MP1 - Red Spaces Take Away ONEBLUE Coins: ONEREDSWITCH
81057DD8 3408
81057DDA 000{switch}
81057DDC 1100
Expand Down Expand Up @@ -53,7 +53,7 @@ def getBlueSpaceCodeTwo(amount, switch):

def getRedSpaceCodeTwo(amount, switch):
return f'''
MP2 - Blue Spaces Give TWOBLUE Coins: TWOREDSWITCH
MP2 - Blue Spaces Take Away TWOBLUE Coins: TWOREDSWITCH
8106634C 3408
8106634E 000{switch}
81066350 1100
Expand Down Expand Up @@ -83,7 +83,7 @@ def getBlueSpaceCodeThree(amount, switch):

def getRedSpaceCodeThree(amount, switch):
return f'''
MP3 - Blue Spaces Give THREEBLUE Coins: THREEREDSWITCH
MP3 - Blue Spaces Take Away THREEBLUE Coins: THREEREDSWITCH
810FE2C0 3408
810FE2C2 000{amount}
810FE2C4 1100
Expand All @@ -106,7 +106,7 @@ def getRedSpaceCodeFour(amount):

def getBlueSpaceCodeFour(amount):
return f'''
MP4 - Blue Spaces Take Away FOURBLUE Coins
MP4 - Blue Spaces Give FOURBLUE Coins
0407FBDC 60000000
0407FBE0 3BC0{amount}
'''
Expand Down
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,11 @@ def parseCoinsFour():

redSpaceAmountBaseFour = redSpaceAmountFour.get()
try:
redSpaceAmountFour = int(redSpaceAmountBaseFour, 16)
negativeRedSpaceAmountBaseFour = -int(redSpaceAmountBaseFour)
redSpaceAmountFour = format(negativeRedSpaceAmountBaseFour & 0xFFFFFFFFFFFFFFFF, 'X')[12:]
redSpaceAmountFour = hex(int(redSpaceAmountFour.get()))
if len(redSpaceAmountFour) == 4:
redSpaceAmountFour = "00" + redSpaceAmountFour[2:]
elif len(redSpaceAmountFour) == 3:
redSpaceAmountFour = "000" + redSpaceAmountFour[2:]
except:
redSpaceAmountFour = "DUMMY"

Expand Down

0 comments on commit 404fb5a

Please sign in to comment.