From d96dbdea1fcd710520fad220e1ae13a7984f0937 Mon Sep 17 00:00:00 2001 From: Nayla Hanegan Date: Mon, 29 Jan 2024 17:47:25 -0500 Subject: [PATCH] Fix N64 Shit --- codes.py | 6 +++--- main.py | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/codes.py b/codes.py index 1a3eef8..7816327 100644 --- a/codes.py +++ b/codes.py @@ -23,7 +23,7 @@ def getBlueSpaceCodeOne(amount, switch): def getRedSpaceCodeOne(amount, switch): return f''' -MP1 - Red Spaces Take Away ONEBLUE Coins: ONEREDSWITCH +MP1 - Red Spaces Take Away ONERED Coins: ONEREDSWITCH 81057DD8 3408 81057DDA 000{switch} 81057DDC 1100 @@ -53,7 +53,7 @@ def getBlueSpaceCodeTwo(amount, switch): def getRedSpaceCodeTwo(amount, switch): return f''' -MP2 - Blue Spaces Take Away TWOBLUE Coins: TWOREDSWITCH +MP2 - Red Spaces Take Away TWORED Coins: TWOREDSWITCH 8106634C 3408 8106634E 000{switch} 81066350 1100 @@ -83,7 +83,7 @@ def getBlueSpaceCodeThree(amount, switch): def getRedSpaceCodeThree(amount, switch): return f''' -MP3 - Red Spaces Take Away THREEBLUE Coins: THREEREDSWITCH +MP3 - Red Spaces Take Away THREERED Coins: THREEREDSWITCH 810FE2C0 3408 810FE2C2 000{switch} 810FE2C4 1100 diff --git a/main.py b/main.py index bd9a6ff..f76a6b1 100644 --- a/main.py +++ b/main.py @@ -1207,8 +1207,21 @@ def actionSpaceButtonOne(self): marioPartyOneBlueSpace = "" generatedCode = marioPartyOneRedSpace + marioPartyOneBlueSpace - generatedCode = generatedCode.replace("ONEBLUESWITCH", "Doesn't Double on Last 5") - generatedCode = generatedCode.replace("ONEREDSWITCH", "Doubles on Last 5") + + if redSpaceSwitchOne == "0": + generatedCode = generatedCode.replace("ONEREDSWITCH", "Doesn't Double on Last 5") + elif redSpaceSwitchOne == "1": + generatedCode = generatedCode.replace("ONEREDSWITCH", "Doubles on Last 5") + else: + pass + + if blueSpaceSwitchOne == "0": + generatedCode = generatedCode.replace("ONEBLUESWITCH", "Doesn't Double on Last 5") + elif blueSpaceSwitchOne == "1": + generatedCode = generatedCode.replace("ONEBLUESWITCH", "Doubles on Last 5") + else: + pass + generatedCode = generatedCode.replace("ONERED", redSpaceAmountBaseOne) generatedCode = generatedCode.replace("ONEBLUE", blueSpaceAmountBaseOne) @@ -1269,8 +1282,21 @@ def actionSpaceButtonTwo(self): marioPartyTwoBlueSpace = "" generatedCode = marioPartyTwoRedSpace + marioPartyTwoBlueSpace - generatedCode = generatedCode.replace("TWOBLUESWITCH", "Doesn't Double on Last 5") - generatedCode = generatedCode.replace("TWOREDSWITCH", "Doubles on Last 5") + + if redSpaceSwitchTwo == "0": + generatedCode = generatedCode.replace("TWOREDSWITCH", "Doesn't Double on Last 5") + elif redSpaceSwitchTwo == "1": + generatedCode = generatedCode.replace("TWOREDSWITCH", "Doubles on Last 5") + else: + pass + + if blueSpaceSwitchTwo == "0": + generatedCode = generatedCode.replace("TWOBLUESWITCH", "Doesn't Double on Last 5") + elif blueSpaceSwitchTwo == "1": + generatedCode = generatedCode.replace("TWOBLUESWITCH", "Doubles on Last 5") + else: + pass + generatedCode = generatedCode.replace("TWORED", redSpaceAmountBaseTwo) generatedCode = generatedCode.replace("TWOBLUE", blueSpaceAmountBaseTwo) @@ -1330,8 +1356,21 @@ def actionSpaceButtonThree(self): marioPartyThreeBlueSpace = "" generatedCode = marioPartyThreeRedSpace + marioPartyThreeBlueSpace - generatedCode = generatedCode.replace("THREEBLUESWITCH", "Doesn't Double on Last 5") - generatedCode = generatedCode.replace("THREEREDSWITCH", "Doubles on Last 5") + + if redSpaceSwitchThree == "0": + generatedCode = generatedCode.replace("THREEREDSWITCH", "Doesn't Double on Last 5") + elif redSpaceSwitchThree == "1": + generatedCode = generatedCode.replace("THREEREDSWITCH", "Doubles on Last 5") + else: + pass + + if blueSpaceSwitchThree == "0": + generatedCode = generatedCode.replace("THREEBLUESWITCH", "Doesn't Double on Last 5") + elif blueSpaceSwitchThree == "1": + generatedCode = generatedCode.replace("THREEBLUESWITCH", "Doubles on Last 5") + else: + pass + generatedCode = generatedCode.replace("THREERED", redSpaceAmountBaseThree) generatedCode = generatedCode.replace("THREEBLUE", blueSpaceAmountBaseThree)