Advertisement
MAKS_Enjoyer

Out of the ashes of the capitalist system, the communist seeds of freedom shall grow

Oct 28th, 2022 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 61.46 KB | Source Code | 0 0
  1. import sys
  2. import random
  3. import string
  4. import webbrowser
  5. import pygame
  6. from pygame.rect import Rect
  7.  
  8. pygame.init()
  9.        
  10. width, height = 1000, 600
  11. clock = pygame.time.Clock()
  12. screen = pygame.display.set_mode((width, height))
  13. Blue = (0,0,255)
  14. White = (255,255,255)
  15. Light_Blue = (180, 221, 255)
  16. Gray = (200, 200, 200)
  17. Dark_Gray = (20, 20, 20)
  18. #------------------------------------------------------------------
  19. Btn_sps = 10
  20. cntrx = (width/6)
  21.  
  22. # main button
  23. btnw1, btnh1 = 220, 75
  24. xs1 = cntrx - (btnw1/2)
  25. ys1 = 200
  26. neil1 = [xs1, ys1, btnw1, btnh1]
  27. jim_bob1 = tuple(neil1)
  28. random_gen = pygame.Rect(jim_bob1)
  29. #------------------------------------------------------------------
  30. btnw2, btnh2 = 220, 75
  31. xs2 = cntrx - (btnw2/2)
  32. ys2 = ys1 + 85
  33. neil2 = [xs2, ys2, btnw2, btnh2]
  34. jim_bob2 = tuple(neil2)
  35. basic_gen = pygame.Rect(jim_bob2)
  36. #------------------------------------------------------------------
  37. btnw3, btnh3 = 220, 75
  38. xs3 = cntrx - (btnw3/2)
  39. ys3 = ys2 + 85
  40. neil3 = [xs3, ys3, btnw3, btnh3]
  41. jim_bob3 = tuple(neil3)
  42. advanced_gen = pygame.Rect(jim_bob3)
  43.  
  44. # credits + guide
  45. btnw4, btnh4 = 103, 42
  46. xs4 = (cntrx - 57) - (btnw4/2)
  47. ys4 = ys3 + 85
  48. neil4 = [xs4, ys4, btnw4, btnh4]
  49. jim_bob4 = tuple(neil4)
  50. guide = pygame.Rect(jim_bob4)
  51. #------------------------------------------------------------------
  52. btnw5, btnh5 = 103, 42
  53. xs5 = (cntrx + 57) - (btnw5/2)
  54. ys5 = ys3 + 85
  55. neil5 = [xs5, ys5, btnw5, btnh5]
  56. jim_bob5 = tuple(neil5)
  57. credits = pygame.Rect(jim_bob5)
  58.  
  59. # exit
  60. btnw6, btnh6 = 50, 20
  61. xs6 = 10
  62. ys6 = 572
  63. neil6 = [xs6, ys6, btnw6, btnh6]
  64. jim_bob6 = tuple(neil6)
  65. exit_btn = pygame.Rect(jim_bob6)
  66.  
  67. # social media
  68. imp1 = pygame.image.load("C:\\Users\\Public\\Operational_Functional_Block\\Python_Projects\\Assets\\reddit.png")
  69. btnw8, btnh8 = 40, 40
  70. imp1 = pygame.transform.scale(imp1, (btnw8, btnh8))
  71. xs8 = 882 - (btnw8)
  72. ys8 = 585 - (btnh8)
  73. neil8 = [xs8, ys8, btnw8, btnh8]
  74. jim_bob8 = tuple(neil8)
  75. #------------------------------------------------------------------
  76. imp2 = pygame.image.load("C:\\Users\\Public\\Operational_Functional_Block\\Python_Projects\\Assets\\discord.png")
  77. btnw9, btnh9 = 40, 40
  78. imp2 = pygame.transform.scale(imp2, (btnw9, btnh9))
  79. xs9 = (xs8 + (btnw9+Btn_sps))
  80. ys9 = 585 - (btnh9)
  81. neil9 = [xs9, ys9, btnw9, btnh9]
  82. jim_bob9 = tuple(neil9)
  83. #------------------------------------------------------------------
  84. imp3 = pygame.image.load("C:\\Users\\Public\\Operational_Functional_Block\\Python_Projects\\Assets\\website.png")
  85. btnw10, btnh10 = 40, 40
  86. imp3 = pygame.transform.scale(imp3, (btnw10, btnh10))
  87. xs10 = (xs9 + (btnw10+Btn_sps))
  88. ys10 = 585 - (btnh10)
  89. neil10 = [xs10, ys10, btnw10, btnh10]
  90. jim_bob10 = tuple(neil10)
  91. #------------------------------------------------------------------
  92. reddit_btn = screen.blit(imp1, jim_bob8)
  93. discord_btn = screen.blit(imp2, jim_bob9)
  94. web_btn = screen.blit(imp3, jim_bob10)
  95.  
  96. def random_code():
  97.     def bussy(altitude_Of_Operation_Chosen):
  98.         match (altitude_Of_Operation_Chosen):
  99.             case "0-10 km (Sea Level)":
  100.                 nozzle_Type_List_SL = ["De Laval Cone (Without Nozzle Extension)", "De Laval Bell (Without Nozzle Extension)"]
  101.                 random.shuffle(nozzle_Type_List_SL)
  102.                 nozzle_Type_Chosen = random.choice(nozzle_Type_List_SL)
  103.             case "20-30 km (Medium Atmosphere)":
  104.                 nozzle_Type_List_HA = ["De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
  105.                     "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"]
  106.                 random.shuffle(nozzle_Type_List_HA)
  107.                 nozzle_Type_Chosen = random.choice(nozzle_Type_List_HA)
  108.             case "30-80 km (High Atmosphere)":
  109.                 nozzle_Type_List_HAi = ["De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  110.                     "Dual Bell Nozzle"]
  111.                 random.shuffle(nozzle_Type_List_HAi)
  112.                 nozzle_Type_Chosen = random.choice(nozzle_Type_List_HAi)
  113.             case "80 km+ (Vacuum)":
  114.                 nozzle_Type_List_VA = ["De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
  115.                     "Expanding Nozzle"]
  116.                 random.shuffle(nozzle_Type_List_VA)
  117.                 nozzle_Type_Chosen = random.choice(nozzle_Type_List_VA)
  118.             case "Any Altitude (0-80 km+)":
  119.                 nozzle_Type_List_Aero = ["Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"]
  120.                 random.shuffle(nozzle_Type_List_Aero)
  121.                 nozzle_Type_Chosen = random.choice(nozzle_Type_List_Aero)
  122.         return nozzle_Type_Chosen
  123.  
  124.     def assCrack(engineName, firstP):
  125.         random.shuffle(engineName)
  126.         random.shuffle(firstP)
  127.         engNameFinalf = " " + random.choice(engineName)
  128.         firstPart_f = random.choice(firstP) + "-"
  129.         finalNumber = random.randint(12, 1110)
  130.         if finalNumber % 8 == 0:
  131.             engine_Name = str(firstPart_f) + str(finalNumber) + str(engNameFinalf)
  132.         else:
  133.             uio93 = random.randint(1, 1000)
  134.             uio94 = random.randint(1, 12)
  135.             if uio93 % uio94 == 0:
  136.                 randomizedCharacter = random.choice(string.ascii_lowercase)
  137.                 while (randomizedCharacter == 'l') or (randomizedCharacter == 'o') or (randomizedCharacter == 'i') or \
  138.                         (randomizedCharacter == 'q') or (randomizedCharacter == 'e') or (randomizedCharacter == 'h') or \
  139.                         (randomizedCharacter == 'g') or (randomizedCharacter == 'c') or (randomizedCharacter == 'j'):
  140.                     randomizedCharacter = random.choice(string.ascii_lowercase)
  141.                     if (randomizedCharacter != 'l') and (randomizedCharacter != 'o') and (randomizedCharacter != 'i') and \
  142.                             (randomizedCharacter != 'q') and (randomizedCharacter != 'e') and (randomizedCharacter != 'h') \
  143.                             and (randomizedCharacter != 'g') and (randomizedCharacter != 'c') and (
  144.                             randomizedCharacter != 'j'):
  145.                         break
  146.             else:
  147.                 randomizedCharacter = random.choice(string.ascii_uppercase)
  148.                 while (randomizedCharacter == 'O') or (randomizedCharacter == 'I') or (randomizedCharacter == 'Q'):
  149.                     randomizedCharacter = random.choice(string.ascii_uppercase)
  150.                     if (randomizedCharacter != 'O') and (randomizedCharacter != 'I') and (randomizedCharacter != 'Q'):
  151.                         break
  152.             engine_Name = str(firstPart_f) + str(finalNumber) + str(randomizedCharacter) + str(engNameFinalf)
  153.         return engine_Name
  154.  
  155.     def outputMonod(ENN, AOOC, PLC, NTLC, CMC, CCC):
  156.         lbrk = "======================================================================================================"
  157.         print(f"{lbrk}\nEngine Designation: {ENN}\n")
  158.         print(f"Propellant: {PLC}")
  159.         print(f"Altitude Of Operation: {AOOC}")
  160.         print(f"Exhaust Nozzle Geometry: {NTLC}")
  161.         print(f"Nozzle Cooling Mechanism: {CMC}")
  162.         print(f"Propellant catalyst: {CCC}\n")
  163.  
  164.         outputEOD = "Engine Designation: " + ENN
  165.         outputTP = "Propellant: " + PLC
  166.         outputAOC = "Altitude Of Operation: " + AOOC
  167.         outputENG = "Exhaust Nozzle Geometry: " + NTLC
  168.         outputNCM = "Nozzle Cooling Mechanism: " + CMC
  169.         outputEPC = "Propellant catalyst: " + CCC
  170.  
  171.         MonoD = [outputEOD, outputTP, outputAOC, outputENG, outputNCM, outputEPC]
  172.         return MonoD
  173.  
  174.     def outputMono(ENN, ECC, AOOC, PLC, NTLC, CMC):
  175.         lbrk = "======================================================================================================"
  176.         print(f"{lbrk}\nEngine Designation: {ENN}\n")
  177.         print(f"Flow Cycle: {ECC}")
  178.         print(f"Propellant: {PLC}")
  179.         print(f"Altitude Of Operation: {AOOC}")
  180.         print(f"Exhaust Nozzle Geometry: {NTLC}")
  181.         print(f"Nozzle Cooling Mechanism: {CMC}\n")
  182.  
  183.         outputEOD = "Engine Designation: " + ENN
  184.         outputEFC = "Flow Cycle: " + ECC
  185.         outputTP = "Propellant: " + PLC
  186.         outputAOC = "Altitude Of Operation: " + AOOC
  187.         outputENG = "Exhaust Nozzle Geometry: " + NTLC
  188.         outputNCM = "Nozzle Cooling Mechanism: " + CMC
  189.  
  190.         Mono = [outputEOD, outputEFC, outputTP, outputAOC, outputENG, outputNCM]
  191.         return Mono
  192.  
  193.     def outputEx(ENN, ECC, OCC, FCC, AOOC, NTC, TRR, CMC, isHyp):
  194.         lbrk = "========================================================================================================"
  195.         print(f"{lbrk}\nEngine Designation: {ENN}\n")
  196.         print(f"Flow Cycle: {ECC}")
  197.         print(f"Engine Oxidizer: {OCC}")
  198.         isCryo = False
  199.         if OCC == "O3 (Ozone)" or OCC == "F2 (Fluorine)" or OCC == "F2 (Fluorine) + O2 (Oxygen)" or \
  200.                 OCC == "ClF3 (Chlorine Trifluoride)" or OCC == "ClF5 (Chlorine Pentafluoride)" or OCC == "O2 (Oxygen)":
  201.             isCryo = True
  202.         if FCC == "CH3OH (Methanol)" or FCC == "C12H24 (Kerosene)" or FCC == "H2 (Hydrogen)" or FCC == "C2H5OH(Ethanol) 85%" or \
  203.                 FCC == "C2H5OH(Ethanol) 75%" or FCC == "B2H6 (Diborane)" or FCC == "B5H9 (Pentaborane)" or FCC == "NH3 (Ammonia)" or FCC == "CH4 (Methane)":
  204.             isCryo = True
  205.         print(f"Engine Fuel: {FCC}")
  206.         if isHyp:
  207.             message = "Propellant properties: Hypergolic"
  208.         else:
  209.             message = "Propellant properties: Not Hypergolic"
  210.         if isCryo is True and isHyp is True:
  211.             message = message + " and cryogenic"
  212.             print(message)
  213.         elif isCryo is True and isHyp is False:
  214.             message = message + " but cryogenic"
  215.             print(message)
  216.         elif isCryo is False and isHyp is True:
  217.             message = message + " but not cryogenic"
  218.             print(message)
  219.         else:
  220.             message = message + " or cryogenic"
  221.             print(message)
  222.         uio96 = random.randint(1, 1000)
  223.         uio97 = random.randint(1, 12)
  224.         if uio96 % uio97 == 0:
  225.             Throttle_MinV = random.randint(1, 100)
  226.             Throttle_MaxV = random.randint(100, 115)
  227.             ThrottleRange = str(Throttle_MinV) + " - " + str(Throttle_MaxV)
  228.         else:
  229.             ThrottleRange = "Not Throttleable"
  230.         gimbalangle = random.randint(0, 15)
  231.         if gimbalangle <= 0 or AOOC == "80 km+ (Vacuum)":
  232.             piss = "None"
  233.         else:
  234.             piss = str(gimbalangle) + " degrees"
  235.         print(f"Altitude Of Operation: {AOOC}")
  236.         print(f"Exhaust Nozzle Geometry: {NTC}")
  237.         print(f"Engine Gimbal Range: {piss}")
  238.         print(f"Tank repressurisation Method: {TRR}")
  239.         print(f"Nozzle Cooling Mechanism: {CMC}")
  240.         print(f"Engine Throttle Range: {ThrottleRange}\n")
  241.  
  242.         outputEOD = "Engine Designation: " + ENN
  243.         outputPFC = "Flow Cycle: " + ECC
  244.         outputEO = "Engine Oxidizer: " + OCC
  245.         outputEF = "Engine Fuel: " + FCC
  246.         outputAOC = "Altitude Of Operation: " + AOOC
  247.         outputNTC = "Exhaust Nozzle Geometry: " + NTC
  248.         outputHCC = message
  249.         outputEGR = "Engine Gimbal Range: " + piss
  250.         outputTRM = "Tank repressurisation Method: " + TRR
  251.         outputNCM = "Nozzle Cooling Mechanism: " + CMC
  252.         outputETR = "Engine Throttle Range: " + ThrottleRange
  253.  
  254.         EX = [outputEOD, outputPFC, outputEO, outputEF, outputAOC, outputNTC, outputHCC, outputEGR, outputTRM, outputNCM, outputETR]
  255.         return EX
  256.  
  257.     def outputNt(ENN, ECC, AOOC, NCC, PLC, RFC, NTLC, TRC, CMC, bi):
  258.         lbrk = "========================================================================================================"
  259.         bi = str(bi)
  260.         print(f"{lbrk}\nEngine Designation: {ENN}\n")
  261.         print(f"Flow Cycle: {NCC} + {ECC}")
  262.         print(f"Propellant (Remass): {PLC}")
  263.         print(f"Reactor Fuel: {RFC}")
  264.         print(f"Engine Bi-modality: {bi}")
  265.         print(f"Altitude Of Operation: {AOOC}")
  266.         print(f"Exhaust Nozzle Geometry: {NTLC}")
  267.         print(f"Tank repressurisation Method: {TRC}")
  268.         print(f"Nozzle Cooling Mechanism: {CMC}\n")
  269.  
  270.         outputEOD = "Engine Designation: " + ENN
  271.         outputPFC = "Flow Cycle: " + NCC + ECC
  272.         outputERP = "Propellant (Remass): " + PLC
  273.         outputERF = "Reactor Fuel: " + RFC
  274.         outputEBM = "Engine Bi-modality: " + bi
  275.         outputAOP = "Altitude Of Operation: " + AOOC
  276.         outputENG = "Exhaust Nozzle Geometry: " + NTLC
  277.         outputTRM = "Tank repressurisation Method: " + TRC
  278.         outputNCM = "Nozzle Cooling Mechanism: " + CMC
  279.  
  280.         NT = [outputEOD, outputPFC, outputERP, outputERF, outputEBM, outputAOP, outputENG, outputTRM, outputNCM]
  281.         return NT
  282.  
  283.     def outputEt(ENN, ECC, AOOC, PLC, NTLC, PGLC):
  284.         lbrk = "======================================================================================================"
  285.         print(f"{lbrk}\nEngine Designation: {ENN}\n")
  286.         print(f"Flow Cycle: {ECC}")
  287.         print(f"Propellant(Remass): {PLC}")
  288.         print(f"Altitude Of Operation: {AOOC}")
  289.         print(f"Exhaust Nozzle Geometry: {NTLC}")
  290.         print(f"Engine Power Source: {PGLC}")
  291.         pwr = str(random.randint(20, 1000)) + " kW"
  292.         print(f"Rated Power Level: {pwr}\n")
  293.  
  294.         outputEOD = "Engine Designation: " + ENN
  295.         outputPFC = "Flow Cycle: " + ECC
  296.         outputERP = "Propellant(Remass): " + PLC
  297.         outputAOC = "Altitude Of Operation: " + AOOC
  298.         outputENG = "Exhaust Nozzle Geometry: " + NTLC
  299.         outputEPS = "Engine Power Source: " + PGLC
  300.         outputRPL = "Rated Power Level: " + pwr
  301.  
  302.         ET = [outputEOD, outputPFC, outputERP, outputAOC, outputENG, outputEPS, outputRPL]
  303.         return ET
  304.  
  305.     def outputDef(ENN, ECC, OCC, FCC, AOOC, NTC, TRR, CMC, isHyp):
  306.         lbrk = "======================================================================================================"
  307.         print(f"{lbrk}\nEngine Designation: {ENN}\n")
  308.         print(f"Flow Cycle: {ECC}")
  309.         print(f"Engine Oxidizer: {OCC}")
  310.         isCryo = False
  311.         if OCC == "O3 (Ozone)" or OCC == "F2 (Fluorine)" or OCC == "F2 (Fluorine) + O2 (Oxygen)" or \
  312.                 OCC == "ClF3 (Chlorine Trifluoride)" or OCC == "ClF5 (Chlorine Pentafluoride)" or OCC == "O2 (Oxygen)":
  313.             isCryo = True
  314.         if FCC == "CH3OH (Methanol)" or FCC == "C12H24 (Kerosene)" or FCC == "H2 (Hydrogen)" or FCC == "C2H5OH(Ethanol) 85%" or \
  315.                 FCC == "C2H5OH(Ethanol) 75%" or FCC == "B2H6 (Diborane)" or FCC == "B5H9 (Pentaborane)" or FCC == "NH3 (Ammonia)" or FCC == "CH4 (Methane)":
  316.             isCryo = True
  317.         print(f"Engine Fuel: {FCC}")
  318.         if isHyp:
  319.             message = "Propellant properties: Hypergolic"
  320.         else:
  321.             message = "Propellant properties: Not Hypergolic"
  322.         if isCryo is True and isHyp is True:
  323.             message = message + " and cryogenic"
  324.             print(message)
  325.         elif isCryo is True and isHyp is False:
  326.             message = message + " but cryogenic"
  327.             print(message)
  328.         elif isCryo is False and isHyp is True:
  329.             message = message + " but not cryogenic"
  330.             print(message)
  331.         else:
  332.             message = message + " or cryogenic"
  333.             print(message)
  334.         uio96 = random.randint(1, 1000)
  335.         uio97 = random.randint(1, 12)
  336.         if uio96 % uio97 == 0:
  337.             Throttle_MinV = random.randint(1, 100)
  338.             Throttle_MaxV = random.randint(100, 115)
  339.             ThrottleRange = str(Throttle_MinV) + " - " + str(Throttle_MaxV)
  340.         else:
  341.             ThrottleRange = "Not Throttleable"
  342.         gimbalangle = random.randint(0, 15)
  343.         if gimbalangle <= 0 or AOOC == "80 km+ (Vacuum)":
  344.             piss = "None"
  345.         else:
  346.             piss = str(gimbalangle) + " degrees"
  347.         print(f"Altitude Of Operation: {AOOC}")
  348.         print(f"Exhaust Nozzle Geometry: {NTC}")
  349.         print(f"Engine Gimbal Range: {piss}")
  350.         print(f"Tank repressurisation Method: {TRR}")
  351.         print(f"Nozzle Cooling Mechanism: {CMC}")
  352.         print(f"Engine Throttle Range: {ThrottleRange}\n")
  353.  
  354.         outputEOD = "Engine Designation: " + ENN
  355.         outputPFC = "Flow Cycle: " + ECC
  356.         outputEO = "Engine Oxidizer: " + OCC
  357.         outputEF = "Engine Fuel: " + FCC
  358.         outputAOC = "Altitude Of Operation: " + AOOC
  359.         outputNTC = "Exhaust Nozzle Geometry: " + NTC
  360.         outputHCC = message
  361.         outputEGR = "Engine Gimbal Range: " + piss
  362.         outputTRM = "Tank repressurisation Method: " + TRR
  363.         outputNCM = "Nozzle Cooling Mechanism: " + CMC
  364.         outputETR = "Engine Throttle Range: " + ThrottleRange
  365.  
  366.         DEF = [outputEOD, outputPFC, outputEO, outputEF, outputAOC, outputNTC, outputHCC, outputEGR, outputTRM, outputNCM, outputETR]
  367.         return DEF
  368.  
  369.     def isHypergolic(OCC, FCC):
  370.         isHyper = False
  371.         if OCC == "N2O4 (Nitrogen Tetroxide)":
  372.             if FCC == "50% CH6N2 + 50% N2H4 (Aerosine-50)" or FCC == "75% CH6N2 + 25% N2H4 (UH-25)" or FCC == "C6H5NH2 (Aniline)" or \
  373.                     FCC == "C2H8N2 (UnsymmetricalDimethylHydrazine)" or FCC == "CH6N2 (MonomethylHydrazine)" or FCC == "N2H4 (Hydrazine)":
  374.                 isHyper = True
  375.         elif OCC == "H2O2 (Hydrogen Peroxide) 95%" or OCC == "H2O2 (Hydrogen Peroxide) 85%" or OCC == "O2 (Oxygen)":
  376.             isHyper = False
  377.         elif OCC == "O3 (Ozone)" or OCC == "F2 (Fluorine)" or OCC == "F2 (Fluorine) + O2 (Oxygen)" or \
  378.                 OCC == "ClF3 (Chlorine Trifluoride)" or OCC == "ClF5 (Chlorine Pentafluoride)":
  379.             isHyper = True
  380.         elif OCC == "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)" or OCC == "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)" or \
  381.                 OCC == "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)" or OCC == "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)" or \
  382.                 OCC == "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)":
  383.             if FCC == "CH6N2 (MonomethylHydrazine)" or OCC == "N2H4 (Hydrazine)":
  384.                 isHyper = True
  385.             else:
  386.                 isHyper = False
  387.         return isHyper
  388.  
  389.     engine_Name1 = ["\"Argosy\"", "\"Galileo\"", "\"Callisto\"", "\"Nauka\"", "\"Insider\"", "\"Granis\"", "\"Rassvet\"",
  390.                     "\"Zvezda\"", "\"Zarya\"", "\"Orion\"", "\"Ares\"", "\"Delta\"", "\"Atlas\"", "\"Dreadnought\"",
  391.                     "\"Daedalus\"", "\"Baltia\"", "\"Dizhou\"", "\"Hermes\"", "\"Icarus\"", "\"Connestoga\"", "\"Yupiter\"",
  392.                     "\"Emphasis\"", "\"Olympus\"", "\"Kronos\"", "\"Helios\"", "\"Alabaster\"", "\"Falcon\"", "\"Saturn\"",
  393.                     "\"Eagle\"", "\"Endeavour\"", "\"Atlantis\"", "\"Cygnus\"", "\"Apollo\"", "\"Horizon\"", "\"Bulava\"",
  394.                     "\"Pioneer\"", "\"Voyager\"", "\"Exploration\"", "\"Expedition\"", "\"Vulcan\"", "\"Vysota\"",
  395.                     "\"Federation\"", "\"Sojourner\"", "\"Nautilus\"", "\"Jubilance\"", "\"Lagrange\"", "\"Volna\"",
  396.                     "\"Prometheus\"", "\"Tellus\"", "\"Alpha\"", "\"Delta\"", "\"Proton\"", "\"Neutron\"", "\"Topol\"",
  397.                     "\"Electron\"", "\"Pluton\"", "\"Poodle\"", "\"Skipper\"", "\"Convair\"", "\"Nexus\"", "\"Oko\"",
  398.                     "\"Vector\"", "\"Terrier\"", "\"Rhino\"", "\"Panther\"", "\"Goliath\"", "\"Juno\"", "\"Shrimp\"",
  399.                     "\"Thumper\"", "\"Mainsail\"", "\"Dart\"", "\"Twitch\"", "\"Stratus\"", "\"Oscar\"", "\"Kosmos\"",
  400.                     "\"Sentinel\"", "\"Pegasus\"", "\"Kelus\"", "\"Starshot\"", "\"Vernor\"", "\"Mammoth\"", "\"Liberty\"",
  401.                     "\"Douglas\"", "\"Heimdall\"", "\"Dynetics\"", "\"Pathfinder\"", "\"Horizon\"", "\"Poisk\"", "\"Pirs\"",
  402.                     "\"Philae\"", "\"Mariner\"", "\"Centaur\"", "\"Orel\"", "\"Pratt\"", "\"Hyperion\"", "\"Sagittarius\"",
  403.                     "\"Apollo\"", "\"Bryton\"", "\"Volga\"", "\"Harmony\"", "\"Cassini\"", "\"Contour\"", "\"Altair\"",
  404.                     "\"Dream\"", "\"Baikal\"", "\"Zenith\"", "\"Urpinod\"", "\"Bernal\"", "\"Condor\"", "\"Athena\"",
  405.                     "\"Astra\"", "\"Aerolus\"", "\"Rombus\"", "\"Lunokhod\"", "\"Fregat\"", "\"Glonass\"", "\"Dragon\"",
  406.                     "\"Salyut\"", "\"Starliner\"", "\"Skylab\"", "\"Briz\"", "\"Colombus\"", "\"Rosetta\"", "\"Redstone\"",
  407.                     "\"Antares\"", "\"Philae\"", "\"Prospero\"", "\"Leonardo\"", "\"Parker\"", "\"Dyson\"", "\"Oberon\"",
  408.                     "\"DragonFly\"", "\"Energia\"", "\"Buran\"", "\"Urgan\"", "\"Angara\"", "\"Vostok\"", "\"Voskhod\"",
  409.                     "\"Shenzhou\"", "\"Ingenuity\"", "\"Oberon\"", "\"Discovery\"", "\"Horizon\"", "\"Visionalis\"",
  410.                     "\"Cerasus\"", "\"Progress\"", "\"Unity\"", "\"Surveyor\"", "\"Prospector\"", "\"Ikar\"", "\"Redstone\"",
  411.                     "\"Lapis\"", "\"Caesius\"", "\"Iridium\"", "\"Daedlus\"", "\"Aelita\"", "\"Beta\"", "\"Gamma\"",
  412.                     "\"Alpha\"", "\"Epsilon\"", "\"Omega\"", "\"Discoverer\"", "\"Explorer\"", "\"Hornet\"", "\"Serenity\"",
  413.                     "\"Ariane\"", "\"Hornet\"", "\"Asimov\"", "\"Pegasus\"", "\"Venture\"", "\"Antares\"", "\"Star\"",
  414.                     "\"Archimedes\"", "\"Hera\"", "\"Iris\"", "\"Titan\"", "\"Artemis\"", "\"Phoenix\"", "\"Ross\"",
  415.                     "\"Sarychev\"", "\"Nemesis\"", "\"Heimdall\"", "\"Sturt\"", "\"Odin\"", "\"Aethelred\"", "\"Vesper\"",
  416.                     "\"Aces\"", "\"Argon\"", "\"Olympia\"", "\"Perseus\"", "\"Chyron\"", "\"Proxima\"", "\"Arminus\"",
  417.                     "\"Destiny\"", "\"Valient\"", "\"FireFly\"", "\"Obsidian\"", "\"Leviathan\"", "\"Magellan\"", "\"Voyager\"",
  418.                     "\"Mariner\"", "\"Joist\"", "\"Crimson\"", "\"Fortune\"", "\"Vanguard\"", "\"Aurora\"", "\"Ulysses\"",
  419.                     "\"Crusader\"", "\"Python\"", "\"Kuiper\"", "\"Insurgent\"", "\"Pathfinder\"", "\"Kvant\"", "\"Spektr\"",
  420.                     "\"Cassini\"", "\"Zemlya\"", "\"Dawn\"", "\"Kepler\"", "\"Parom\"", "\"Elektron\"", "\"Aeonian\"", "\"Node\"",
  421.                     "\"Burya\"", "\"Voyager\"", "\"Ceres\"", "\"Bayern\"", "\"Chasovoy\"", "\"Copernicus\"", "\"Quaoar\"",
  422.                     "\"Minotaur\"", "\"Agena\"", "\"Thor\"", "\"Vega\"", "\"Scout\"", "\"Coeus\"", "\"Minerva\"", "\"Kratos\"",
  423.                     "\"Neith\"", "\"Omoikane\"", "\"Gayamun\"", "\"Odin\"", "\"Kronos\"", "\"Hope\"", "\"Polet\"", "\"Polyot\"",
  424.                     "\"Sputnik\"", "\"Clementine\"", "\"Sojourner\"", "\"Ingenuity\"", "\"Perseverence\"", "\"Onatchesko\"",
  425.                     "\"Atlantis\"", "\"Tsyklon\"", "\"Zenit\"", "\"Almaz\"", "\"Soyuz\"", "\"Molniya\"", "\"Oreol\"",
  426.                     "\"Yantar\"", "\"Foton\"", "\"Meteor\"", "\"Ekran\"", "\"Strela\"", "\"Bion\"", "\"Piroda\"", "\"Salyut\"",
  427.                     "\"Strela\"", "\"Luch\"", "\"Potok\"", "\"Prognoz\"", "\"Orlets\"", "\"Etalon\"", "\"Astron\"", "\"Efir\"",
  428.                     "\"Kometa\"", "\"Fram\"", "\"Zemlya\"", "\"Gorizont\"", "\"Arkon\"", "\"Gamma\"", "\"Ekspress\"",
  429.                     "\"Gonets\"", "\"Taifun\"", "\"Okean\"", "\"Reflektor\"", "\"Kolibr\"", "\"Sever\"", "\"Comet\"",
  430.                     "\"Roton\"", "\"Solaris\"", "\"Altaris\"", "\"Ithacus\"", "\"Dekto\"", "\"Dream\"", "\"Impuls\"",
  431.                     "\"Vremya\"", "\"Portal\"", "\"Zodiak\"", "\"Slava\"", "\"Inertsiya\"", "\"Stimuls\"", "\"Ambross\"",
  432.                     "\"Amal\"", "\"Thea\"", "\"Orphelia\"", "\"Polyot\"", "\"Mudrost\"", "\"Carrack\"", "\"Artak\"",
  433.                     "\"Questar\"", "\"Artyom\"", "\"Tsyclon\"", "\"Ascension\"", "\"Tenacity\"", "\"Contour\"", "\"Zephyr\"",
  434.                     "\"Atlanta\"", "\"Polaris\"", "\"Aeolus\"", "\"Mayak\"", "\"Pamir\"", "\"Taimyr\"", "\"Cheget\"",
  435.                     "\"Sirius\"", "\"Uragan\"", "\"Agat\"", "\"Skiph\"", "\"Kristall\"", "\"Altair\"", "\"Uran\"",
  436.                     "\"Ingul\"", "\"Carat\"", "\"Pulsar\"", "\"Titan\"", "\"Eridanus\"", "\"Parus\"", "\"Cepheus\"",
  437.                     "\"Varagian\"", "\"Olympus\"", "\"Tarkhaniy\"", "\"Astraeus\"", "\"Antares\"", "\"Kazbek\"",
  438.                     "\"Burlak\"", "\"Borei\"", "\"Favor\"", "\"Rubin\"", "\"Almaz\"", "\"Granit\"", "\"Ruby\"",
  439.                     "\"Sokol\"", "\"Argon\"", "\"Kavkaz\"", "\"Ural\"", "\"Berkut\"", "\"Dunay\"", "\"Yastreb\"",
  440.                     "\"Terek\"", "\"Radon\"", "\"Taymyr\"", "\"Pamir\"", "\"Photon\"", "\"Elbrus\"", "\"Isayiev\"", "\"Shmel\"",
  441.                     "\"Kobra\"", "\"Shturn\"", "\"Metis\"", "\"Malyutka\"", "\"Fleyta\"", "\"Konkurs\"", "\"Bastion\"", "\"Svir\"",
  442.                     "\"Ataka\"", "\"Vodopad\"", "\"Veter\"", "\"Vyuga\"", "\"Vulga\"", "\"Tochka\"", "\"Oka\"", "\"Dvina\"",
  443.                     "\"Almaz\"", "\"Araks\"", "\"Kanopus\"", "\"Kliper\"", "\"Kobalt\"", "\"Siluet\"", "\"Kondor\"",
  444.                     "\"Lotos\"", "\"Luch\"", "\"Mir\"", "\"Neman\"", "\"Obzor\"", "\"Okean\"", "\"Oktan\"", "\"Orlets\"",
  445.                     "\"Poisk\"", "\"Potok\"", "\"Pirs\"", "\"Prognoz\"", "\"Resurs\"", "\"Rodnik\"", "\"Romb\"", "\"Kapustin\"",
  446.                     "\"Oplot\"", "\"Tsygan\"", "\"Teplokhod\"", "\"Sokosha\"", "\"Rubezh\"", "\"Zircon\"", "\"Moskva\"",
  447.                     "\"Tryol\"", "\"Ustinov\"", "\"Belyayev\"", "\"Novorod\"", "\"Argos\"", "\"Nerthus\"", "\"Janus\"",
  448.                     "\"Hephaestus\"", "\"Themis\"", "\"Chronos\"", "\"Tethys\"", "\"Minos\"", "\"Autumn\"", "\"Resilience\"",
  449.                     "\"Aelita\"", "\"Rheus\"", "\"Solntspek\"", "\"Spitzer\"", "\"Cartago\"", "\"Melibea\"", "\"Spartacus\"",
  450.                     "\"Pulsar\"", "\"Fusion\"", "\"Reliant\"", "\"Thunder\"", "\"Novo\"", "\"Panthera\"", "\"Nematoda\"",
  451.                     "\"Anelida\"", "\"Chordata\"", "\"Tetrapoda\"", "\"Cyclero\"", "\"Carrier\"", "\"Gaia\"", "\"Irtysh\"",
  452.                     "\"Wyvern\"", "\"Tarsier\"", "\"Alpina\"", "\"Espadon\"", "\"Parlos\"", "\"Nebula\"", "\"Lazarus\"",
  453.                     "\"Rufus\"", "\"Dornier\"", "\"Argus\"", "\"Kybau\"", "\"Kalau\"", "\"Chasvoy\"", "\"Zephyr\"", "\"Temny\"",
  454.                     "\"Gorizont\"", "\"Yars\"", "\"Krugazor\"", "\"Soprotivlenye\"", "\"Shtil\"", "\"Layner\""]
  455.     engine_Cycle = ["Gas Generator", "Staged Combustion (Oxidizer Rich)", "Staged Combustion (Fuel Rich)",
  456.                     "Expander (Open/Bleed)", "Expander (Closed)", "Dual Expander (Open/Bleed)", "Dual Expander (Closed)",
  457.                     "Pressure-Fed", "Full Flow Staged", "Electric Pump Fed", "Combustion Tap Off", "Monopropellant (Cold Gas)",
  458.                     "Monopropellant (Decomposition)", "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear",
  459.                     "Pebble-Bed Core", "Nuclear SaltWater", "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster",
  460.                     "Gridded Ion Thruster", "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)"]
  461.     propellant_List1 = ["H2O2 (Hydrogen Peroxide)", "N2H4 (Hydrazine)", "NH2OH+NO3 (Hydroxylammonium nitrate)",
  462.                         "65% NH4N(NO2)2 (Ammonium Dinitramide) + 35% CH3OH(Methanol)"]
  463.     propellant_List2 = ["Nitrogen (N2)", "Helium (He)", "Carbon Dioxide (CO2)", "Ammonia (NH3)",
  464.                         "Hydrogen (H2)", "Methane (CH4)"]
  465.     propellant_List3 = ["Hydrogen (H2)", "Helium (He)", "Nitrogen (N2)", "Hydrogen (H)", "Ammonia (NH3)",
  466.                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  467.                         "Methane (CH4)"]
  468.     altitude_Of_Operation = ["0-10 km (Sea Level)", "20-30 km (Medium Atmosphere)", "30-80 km (High Atmosphere)",
  469.                                 "80 km+ (Vacuum)", "Any Altitude (0-80 km+)"]
  470.     tank_Repressurisation = ["Autogenous", "Inert Gas"]
  471.     firstPart = ["RD", "RS", "AJ", "XLR", "NK", "RL", "KDTU", "AR", "BE", "MV", "YF", "PKA", "J", "RSA", "MJ", "XS",
  472.                     "LM10", "HM", "LE", "LRE", "CE", "DST", "DOK", "KDU", "KRD", "R", "RO", "LMS", "LMP", "RT", "F", "E",
  473.                     "A", "B", "S.10", "R", "JDK", "SPP", "TYS", "SOK", "RES", "FWR", "NAA75", "LR", "MA", "GE", "OSA",
  474.                     "OBA", "NA", "RM02", "RM", "H", "MBB", "MB", "DF", "DE", "BF", "X", "BW", "BADR", "HS", "DC"]
  475.     engine_Name = assCrack(engine_Name1, firstPart)
  476.     random.shuffle(engine_Cycle)
  477.     engine_Cycle_Chosen = random.choice(engine_Cycle)
  478.     nuclear_Cycle_Chosen = ""
  479.     match engine_Cycle_Chosen:
  480.         case "Gas Core" | "Liquid Core" | "Solid Core" | "Pulsed Nuclear" | "Nuclear SaltWater" | "Pebble-Bed Core":
  481.             cooling_mechanism = ["Radiative Cooling", "Dump Cooling", "Film Cooling", "Regenerative Cooling", "Transpiration Cooling"]
  482.             match engine_Cycle_Chosen:
  483.                 case "Gas Core":
  484.                     remass_List = ["Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  485.                                     "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)", "Methane (CH4)"]
  486.                     random.shuffle(remass_List)
  487.                     remass_List_Chosen = random.choice(remass_List)
  488.                     propellant_List_Chosen = "Uranium HexaFluoride (UF6) + " + remass_List_Chosen
  489.                     nuclear_cycle1 = ["\"Expander Bleed\"", "\"Expander Closed\"", "\"Nuclear Lightbulb\"",
  490.                                         "\"Vortex Confined\"", "\"Wheel Flow\"", "\"Magnetohydrodynamic(MHD) vortex\"",
  491.                                         "\"Expander Open\""]
  492.                     random.shuffle(nuclear_cycle1)
  493.                     nuclear_Cycle_Chosen = random.choice(nuclear_cycle1)
  494.                     reactor_fuel = ["100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"]
  495.                     random.shuffle(reactor_fuel)
  496.                     reactor_Fuel_Chosen = random.choice(reactor_fuel)
  497.                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)"
  498.  
  499.                 case "Liquid Core", "Colloid-Core", "Pebble-Bed Core":
  500.                     remass_List2 = ["Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)",
  501.                                     "Ammonia (NH3)", "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)",
  502.                                     "Carbon Monoxide (CO)",
  503.                                     "Methane (CH4)"]
  504.                     random.shuffle(remass_List2)
  505.                     remass_List_Chosen = random.choice(remass_List2)
  506.                     propellant_List_Chosen = "Uranium HexaFluoride (UF6) + " + remass_List_Chosen
  507.                     nuclear_cycle1 = ["\"Expander Bleed\"", "\"Expander Closed\"", "\"Vortex Confined\"",
  508.                                         "\"Expander Open\""]
  509.                     random.shuffle(nuclear_cycle1)
  510.                     nuclear_Cycle_Chosen = random.choice(nuclear_cycle1)
  511.                     reactor_fuel = ["100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"]
  512.                     random.shuffle(reactor_fuel)
  513.                     reactor_Fuel_Chosen = random.choice(reactor_fuel)
  514.                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)"
  515.  
  516.                 case "Nuclear SaltWater":
  517.                     propellant_List_Chosen = "Uranium TetraBromide (UBr4) + Water (H2O)"
  518.                     reactor_fuel = ["100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235",
  519.                                     "1-2% Uranium-235"]
  520.                     random.shuffle(reactor_fuel)
  521.                     reactor_Fuel_Chosen = random.choice(reactor_fuel)
  522.                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)"
  523.  
  524.                 case _:
  525.                     random.shuffle(propellant_List3)
  526.                     propellant_List_Chosen = random.choice(propellant_List3)
  527.                     nuclear_cycle1 = ["\"Expander Bleed\"", "\"Expander Closed\"", "\"Expander Open\""]
  528.                     random.shuffle(nuclear_cycle1)
  529.                     nuclear_Cycle_Chosen = random.choice(nuclear_cycle1)
  530.                     reactor_fuel = ["100-90% Uranium-235", "50% Uranium-235", "20-8% Uranium-235", "1-2% Uranium-235",
  531.                                     "100-90% Plutonium-238", "50% Plutonium-238", "25-8% Plutonium-238", "1-2% Plutonium-238"]
  532.                     random.shuffle(reactor_fuel)
  533.                     reactor_Fuel_Chosen = random.choice(reactor_fuel)
  534.                     nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)"
  535.             altitude_Of_Operation_Chosen = "80 km+ (Vacuum)"
  536.             random.shuffle(tank_Repressurisation)
  537.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  538.             random.shuffle(cooling_mechanism)
  539.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  540.             bimodal_decider = random.randint(15, 168)
  541.             bimodal = False
  542.             if bimodal_decider % 2 == 0:
  543.                 bimodal = True
  544.             NT = outputNt(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, nuclear_Cycle_Chosen,
  545.                         propellant_List_Chosen, reactor_Fuel_Chosen, nozzle_Type_List_Chosen,
  546.                         tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, bimodal)
  547.             return NT
  548.        
  549.         case "MagnetoPlasmaDynamic Thruster" | "Hall Effect Thruster" | "Gridded Ion Thruster" | "Colloid Thruster" | "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)":
  550.             powerGen_List = ["Hydrogen Fuel cell", "Nuclear Fission Reactor", "Nuclear Fusion Reactor", "Photovoltaic Panel",
  551.                                 "Solar Thermal Panel", "Radioisotope Thermoelectric Generator (RTG)"]
  552.             match engine_Cycle_Chosen:
  553.                 case "Hall Effect Thruster":
  554.                     propellant_List = ["Xenon", "Krypton", "Argon", "Bismuth", "Iodine","Magnesium", "Zinc", "Adamantane"]
  555.                     random.shuffle(propellant_List)
  556.                     propellant_List_Chosen = random.choice(propellant_List)
  557.                     nozzle_Type_List_Chosen = "Hall Effect Thruster Nozzle"
  558.                 case "Gridded Ion Thruster":
  559.                     propellant_List = ["Xenon", "Mercury", "Caesium"]
  560.                     random.shuffle(propellant_List)
  561.                     propellant_List_Chosen = random.choice(propellant_List)
  562.                     nozzle_Type_List_Chosen = "Electrostatic Ion Nozzle"
  563.                 case "Colloid Thruster":
  564.                     propellant_List_Chosen = "NH2OH+NO3 (Hydroxylammonium nitrate)"
  565.                     nozzle_Type_List_Chosen = "Capillary Emitter-Electrode Cone"
  566.                 case "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)":
  567.                     propellant_List = ["Xenon", "Krypton", "Argon"]
  568.                     random.shuffle(propellant_List)
  569.                     propellant_List_Chosen = random.choice(propellant_List)
  570.                     nozzle_Type_List_Chosen = "VASIMR Magnetic Confinement Nozzle"
  571.                 case "MagnetoPlasmaDynamic Thruster":
  572.                     propellant_List = ["Xenon", "Neon", "Argon", "Hydrogen", "Hydrazine", "Lithium"]
  573.                     random.shuffle(propellant_List)
  574.                     propellant_List_Chosen = random.choice(propellant_List)
  575.                     nozzle_Type_List_Chosen = "Cathode Plug Magnetic Confinement Nozzle"
  576.             random.shuffle(powerGen_List)
  577.             powerGen_List_Chosen = random.choice(powerGen_List)
  578.             altitude_Of_Operation_Chosen = "80 km+ (Vacuum)"
  579.             ET = outputEt(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  580.                         propellant_List_Chosen, nozzle_Type_List_Chosen, powerGen_List_Chosen)
  581.             return ET
  582.        
  583.         case "Monopropellant (Decomposition)":
  584.             engine_Name = assCrack(engine_Name1, firstPart)
  585.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling"]
  586.             nozzle_Type_List1 = ["De Laval Cone (Without Nozzle Extension)", "De Laval Bell (Without Nozzle Extension)"]
  587.             random.shuffle(nozzle_Type_List1)
  588.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List1)
  589.             random.shuffle(propellant_List1)
  590.             propellant_List_Chosen = random.choice(propellant_List1)
  591.             altitude_Of_Operation_Chosen = "80 km+ (Vacuum)"
  592.             random.shuffle(cooling_mechanism)
  593.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  594.             if propellant_List_Chosen == "N2H4 (Hydrazine)" or propellant_List_Chosen == "65% NH4N(NO2)2 (Ammonium Dinitramide) + 35% CH3OH(Methanol)":
  595.                 catalyst_Chosen = "Iridium coated Alumina Pellets"
  596.             elif propellant_List_Chosen == "H2O2 (Hydrogen Peroxide)":
  597.                 catalyst_Chosen = "KMNO4 (Potassium Permanganate) Honeycomb"
  598.             elif "NH2OH+NO3 (Hydroxylammonium nitrate)":
  599.                 catalyst_Chosen = "Iridium coated Copper Pellets"
  600.             MonoD = outputMonod(engine_Name, altitude_Of_Operation_Chosen, propellant_List_Chosen,nozzle_Type_List_Chosen,
  601.                         cooling_Mechanism_Chosen, catalyst_Chosen)
  602.             return MonoD
  603.            
  604.         case "Monopropellant (Cold Gas)":
  605.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling"]
  606.             nozzle_Type_List1 = ["De Laval Cone (Without Nozzle Extension)", "De Laval Bell (Without Nozzle Extension)"]
  607.             random.choice(propellant_List2)
  608.             propellant_List_Chosen = random.choice(propellant_List2)
  609.             altitude_Of_Operation_Chosen = "80 km+ (Vacuum)"
  610.             random.choice(nozzle_Type_List1)
  611.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List1)
  612.             random.choice(cooling_mechanism)
  613.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  614.             Mono = outputMono(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, propellant_List_Chosen,
  615.                         nozzle_Type_List_Chosen, cooling_Mechanism_Chosen)
  616.             return Mono
  617.            
  618.         case "Expander (Closed)" | "Expander (Open/Bleed)":
  619.             oxidizer_List = ["O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)"]
  620.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  621.                                     "Regenerative Cooling", "Transpiration Cooling"]
  622.             random.choice(oxidizer_List)
  623.             oxidizer_Chosen = random.choice(oxidizer_List)
  624.             match oxidizer_Chosen:
  625.                 case "O2 (Oxygen)":
  626.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%",
  627.                                     "C2H5OH(Ethanol) 75%", "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
  628.                                     "CH6N2 (MonomethylHydrazine)",
  629.                                     "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)",
  630.                                     "B5H9 (Pentaborane)"]
  631.                     random.shuffle(fuel_List)
  632.                     fuel_Chosen = random.choice(fuel_List)
  633.                 case "F2 (Fluorine)":
  634.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%",
  635.                                     "C2H5OH(Ethanol) 75%", "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "N2H4 (Hydrazine)",
  636.                                     "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
  637.                                     "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"]
  638.                     random.shuffle(fuel_List)
  639.                     fuel_Chosen = random.choice(fuel_List)
  640.                 case "F2 (Fluorine) + O2 (Oxygen)" | "O3 (Ozone)":
  641.                     fuel_List = ["H2 (Hydrogen)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
  642.                                     "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"]
  643.                     random.shuffle(fuel_List)
  644.                     fuel_Chosen = random.choice(fuel_List)
  645.             random.shuffle(altitude_Of_Operation)
  646.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  647.             nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen)
  648.             random.shuffle(cooling_mechanism)
  649.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  650.             isHype = isHypergolic(oxidizer_Chosen, fuel_Chosen)
  651.             EX = outputEx(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  652.                         nozzle_Type_Chosen, "Autogenous", cooling_Mechanism_Chosen, isHype)
  653.             return EX
  654.            
  655.         case "Dual Expander (Closed)" | "Dual Expander (Open/Bleed)":
  656.             oxidizer_List = ["O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)"]
  657.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  658.                                     "Regenerative Cooling", "Transpiration Cooling"]
  659.             random.choice(oxidizer_List)
  660.             oxidizer_Chosen = random.choice(oxidizer_List)
  661.             fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)"]
  662.             match oxidizer_Chosen:
  663.                 case "O2 (Oxygen)" | "F2 (Fluorine)":
  664.                     random.shuffle(fuel_List)
  665.                     fuel_Chosen = random.choice(fuel_List)
  666.                 case "F2 (Fluorine) + O2 (Oxygen)" : fuel_Chosen = "H2 (Hydrogen)"
  667.             random.shuffle(altitude_Of_Operation)
  668.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  669.             nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen)
  670.             random.shuffle(cooling_mechanism)
  671.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  672.             isHype = isHypergolic(oxidizer_Chosen, fuel_Chosen)
  673.             EX = outputEx(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  674.                         nozzle_Type_Chosen, "Autogenous", cooling_Mechanism_Chosen, isHype)
  675.             return EX
  676.            
  677.         case "Staged Combustion (Fuel Rich)":
  678.             oxidizer_List = ["O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)"]
  679.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  680.                                     "Regenerative Cooling", "Transpiration Cooling"]
  681.             random.choice(oxidizer_List)
  682.             oxidizer_Chosen = random.choice(oxidizer_List)
  683.             match oxidizer_Chosen:
  684.                 case "O2 (Oxygen)" | "F2 (Fluorine)":
  685.                     fuel_List = ["H2 (Hydrogen)", "NH3 (Ammonia)", "N2H4 (Hydrazine)"]
  686.                     random.shuffle(fuel_List)
  687.                     fuel_Chosen = random.choice(fuel_List)
  688.            
  689.                 case "F2 (Fluorine) + O2 (Oxygen)" | "O3 (Ozone)": fuel_Chosen = "H2 (Hydrogen)"
  690.             random.shuffle(tank_Repressurisation)
  691.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  692.             random.shuffle(altitude_Of_Operation)
  693.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  694.             nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen)
  695.             random.shuffle(cooling_mechanism)
  696.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  697.             isHype = isHypergolic(oxidizer_Chosen, fuel_Chosen)
  698.             DEF = outputDef(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  699.                         nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHype)
  700.             return DEF
  701.        
  702.         case "Staged Combustion (Oxidizer Rich)":
  703.             oxidizer_List = ["O2 (Oxygen)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"]
  704.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  705.                                     "Regenerative Cooling", "Transpiration Cooling"]
  706.             random.choice(oxidizer_List)
  707.             oxidizer_Chosen = random.choice(oxidizer_List)
  708.             match oxidizer_Chosen:
  709.                 case "O2 (Oxygen)" | "O3 (Ozone)":
  710.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  711.                                     "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  712.                                     "CH3OH (Methanol)"]
  713.                     random.shuffle(fuel_List)
  714.                     fuel_Chosen = random.choice(fuel_List)
  715.                 case "N2O4 (Nitrogen Tetroxide)":
  716.                     fuel_List = ["C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)",
  717.                                     "50% CH6N2 + 50% N2H4 (Aerosine-50)", "C2H8N2 (UnsymetricalDimethylHydrazine)"]
  718.                     random.shuffle(fuel_List)
  719.                     fuel_Chosen = random.choice(fuel_List)
  720.             random.shuffle(tank_Repressurisation)
  721.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  722.             random.shuffle(altitude_Of_Operation)
  723.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  724.             nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen)
  725.             random.shuffle(cooling_mechanism)
  726.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  727.             isHype = isHypergolic(oxidizer_Chosen, fuel_Chosen)
  728.             DEF = outputDef(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  729.                         nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHype)
  730.             return DEF
  731.        
  732.         case "Full Flow Staged Combustion" | "Combustion Tap Off":
  733.             oxidizer_List = ["O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "N2H4 (Hydrazine)",
  734.                                 "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"]
  735.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling", "Dump Cooling",
  736.                                     "Film Cooling", "Regenerative Cooling", "Transpiration Cooling"]
  737.             random.choice(oxidizer_List)
  738.             oxidizer_Chosen = random.choice(oxidizer_List)
  739.             match oxidizer_Chosen:
  740.                 case "O2 (Oxygen)":
  741.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%",
  742.                                     "C2H5OH(Ethanol) 75%", "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
  743.                                     "CH6N2 (MonomethylHydrazine)",
  744.                                     "N2H4 (Hydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"]
  745.                     random.shuffle(fuel_List)
  746.                     fuel_Chosen = random.choice(fuel_List)
  747.                 case "F2 (Fluorine)":
  748.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%",
  749.                                     "C2H5OH(Ethanol) 75%", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  750.                                     "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)"]
  751.                     random.shuffle(fuel_List)
  752.                     fuel_Chosen = random.choice(fuel_List)
  753.                 case "F2 (Fluorine) + O2 (Oxygen)" | "O3 (Ozone)":
  754.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%",
  755.                                     "C2H5OH(Ethanol) 75%", "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)",
  756.                                     "50% CH6N2 + 50% N2H4 (Aerosine-50)", "CH6N2 (MonomethylHydrazine)", "B2H6 (Diborane)",
  757.                                     "B5H9 (Pentaborane)"]
  758.                     random.shuffle(fuel_List)
  759.                     fuel_Chosen = random.choice(fuel_List)
  760.                 case "N2H4 (Hydrazine)" | "N2O4 (Nitrogen Tetroxide)":
  761.                     fuel_List = ["H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  762.                                     "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)",
  763.                                     "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  764.                                     "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)"]
  765.                     random.shuffle(fuel_List)
  766.                     fuel_Chosen = random.choice(fuel_List)
  767.             random.shuffle(tank_Repressurisation)
  768.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  769.             random.shuffle(altitude_Of_Operation)
  770.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  771.             nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen)
  772.             random.shuffle(cooling_mechanism)
  773.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  774.             isHype = isHypergolic(oxidizer_Chosen, fuel_Chosen)
  775.             DEF = outputDef(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  776.                         nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHype)
  777.             return DEF
  778.        
  779.         case _:
  780.             cooling_mechanism = ["Ablative Cooling", "Radiative Cooling", "Dump Cooling",
  781.                                     "Film Cooling", "Regenerative Cooling", "Transpiration Cooling"]
  782.             oxidizer_List = ["O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)","N2O4 (Nitrogen Tetroxide)",
  783.                                 "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%", "O3 (Ozone)",
  784.                                 "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)","AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  785.                                 "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  786.                                 "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)", "ClF3 (Chlorine Trifluoride)",
  787.                                 "ClF5 (Chlorine Pentafluoride)"]
  788.             random.choice(oxidizer_List)
  789.             oxidizer_Chosen = random.choice(oxidizer_List)
  790.             match oxidizer_Chosen:
  791.                 case "O2 (Oxygen)":
  792.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%",
  793.                                     "C2H5OH(Ethanol) 75%", "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
  794.                                     "CH6N2 (MonomethylHydrazine)",
  795.                                     "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)",
  796.                                     "B5H9 (Pentaborane)", "C2H6 (Ethane)"]
  797.                     random.shuffle(fuel_List)
  798.                     fuel_Chosen = random.choice(fuel_List)
  799.                 case "F2 (Fluorine)":
  800.                     fuel_List = ["H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  801.                                     "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  802.                                     "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
  803.                                     "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"]
  804.                     random.shuffle(fuel_List)
  805.                     fuel_Chosen = random.choice(fuel_List)
  806.                 case "F2 (Fluorine) + O2 (Oxygen)"| "O3 (Ozone)":
  807.                     fuel_List = ["H2 (Hydrogen)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)","B5H9 (Pentaborane)"]
  808.                     random.shuffle(fuel_List)
  809.                     fuel_Chosen = random.choice(fuel_List)
  810.                 case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)" | "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)" |\
  811.                         "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)" | "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)" |\
  812.                         "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)" | "ClF3 (Chlorine Trifluoride)" | "ClF5 (Chlorine Pentafluoride)":
  813.                     fuel_List = ["C2H5OH(Ethanol) 85%", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)"]
  814.                     random.shuffle(fuel_List)
  815.                     fuel_Chosen = random.choice(fuel_List)
  816.                 case "N2O4 (Nitrogen Tetroxide)" | "H2O2 (Hydrogen Peroxide) 95%" | "H2O2 (Hydrogen Peroxide) 85%":
  817.                     fuel_List = ["H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  818.                                     "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)",
  819.                                     "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  820.                                     "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
  821.                                     "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)"]
  822.                     random.shuffle(fuel_List)
  823.                     fuel_Chosen = random.choice(fuel_List)
  824.             random.shuffle(tank_Repressurisation)
  825.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  826.             random.shuffle(altitude_Of_Operation)
  827.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  828.             nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen)
  829.             random.shuffle(cooling_mechanism)
  830.             cooling_Mechanism_Chosen = random.choice(cooling_mechanism)
  831.             isHype = isHypergolic(oxidizer_Chosen, fuel_Chosen)
  832.             DEF = outputDef(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  833.                         nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, isHype)
  834.             return DEF
  835. def basic_code():
  836.     pass
  837. def advanced_code():
  838.     pass
  839. def guide_code():
  840.     pass
  841. def credits_code():
  842.     jimy = [675,290]
  843.     font = pygame.font.SysFont("Arial", 30)
  844.     textsurface = font.render("Creator: @Maks_Enjoyer on Twitter", False, Gray)
  845.     jimy[0] = (jimy[0] - (textsurface.get_width()/2))
  846.     screen.blit(textsurface, jimy)
  847.     #---------------------------------------------------------------------------
  848.     jimy = [675, (jimy[1]+40)]
  849.     font = pygame.font.SysFont("Arial", 30)
  850.     textsurface = font.render("Co-Creator: StackOverflow", False, Gray)
  851.     jimy[0] = (jimy[0] - (textsurface.get_width()/2))
  852.     screen.blit(textsurface, jimy)          
  853. def render(jesus, color, input_rect, base_font, user_text, IsCredits, IsRandom, Ypee):
  854.     screen.fill((Dark_Gray))
  855.     pygame.draw.rect(screen, Gray, random_gen)
  856.     pygame.draw.rect(screen, Gray, basic_gen)
  857.     pygame.draw.rect(screen, Gray, advanced_gen)
  858.     pygame.draw.rect(screen, Gray, guide)
  859.     pygame.draw.rect(screen, Gray, credits)
  860.     pygame.draw.rect(screen, Gray, exit_btn)
  861.     reddit_btn = screen.blit(imp1, jim_bob8)
  862.     discord_btn = screen.blit(imp2, jim_bob9)
  863.     web_btn = screen.blit(imp3, jim_bob10)
  864.     #------------------------------------------------------------------
  865.     #Rectangle Thingy for the screen
  866.     (x, y, width, height) = (360, 158, 620, 370)
  867.     border_width = 3
  868.     pygame.draw.rect(screen, Dark_Gray, (x, y, width, height))
  869.     pygame.draw.rect(screen, Gray, (x, y, width, height), width=border_width)
  870.     #-------------------------------------------------------------------
  871.     font1 = pygame.font.SysFont("Garamond", 90)
  872.     textsurface1 = font1.render("Rocket Engine Builder", False, Gray)  
  873.     jim1 = textsurface1.get_rect(center = screen.get_rect().center)
  874.     jim1[1] = 28
  875.     screen.blit(textsurface1, jim1)
  876.     #-------------------------------------------------------------------
  877.     font2 = pygame.font.SysFont("Arial", 19, True)
  878.     textsurface2 = font2.render("Choose a configuration:", False, Gray)    
  879.     jim2 = textsurface2.get_rect(center = screen.get_rect().center)
  880.     jim2[0] = 55
  881.     jim2[1] = 164
  882.     screen.blit(textsurface2, jim2)
  883.     #-------------------------------------------------------------------
  884.     font2 = pygame.font.SysFont("Arial", 18)
  885.     textsurface2 = font2.render("Random Generation", False, Dark_Gray)  
  886.     jim2 = textsurface2.get_rect(center = screen.get_rect().center)
  887.     jim2[0] = cntrx - 80
  888.     jim2[1] = ys1 + 25
  889.     screen.blit(textsurface2, jim2)    
  890.     #-------------------------------------------------------------------
  891.     font2 = pygame.font.SysFont("Arial", 18)
  892.     textsurface2 = font2.render("Basic Generation", False, Dark_Gray)  
  893.     jim2 = textsurface2.get_rect(center = screen.get_rect().center)
  894.     jim2[0] = cntrx - 71
  895.     jim2[1] = ys1 + 110
  896.     screen.blit(textsurface2, jim2)      
  897.     #-------------------------------------------------------------------
  898.     font2 = pygame.font.SysFont("Arial", 18)
  899.     textsurface2 = font2.render("Advanced Generation", False, Dark_Gray)  
  900.     jim2 = textsurface2.get_rect(center = screen.get_rect().center)
  901.     jim2[0] = cntrx - 86
  902.     jim2[1] = ys2 + 111
  903.     screen.blit(textsurface2, jim2)
  904.     #-------------------------------------------------------------------
  905.     jimy2 = [675,133]
  906.     font4 = pygame.font.SysFont("Arial", 20)
  907.     textsurface4 = font4.render(jesus, False, Gray)
  908.     jimy2[0] = (jimy2[0] - (textsurface4.get_width()/2))
  909.     screen.blit(textsurface4, jimy2)          
  910.     #-------------------------------------------------------------------
  911.     font3 = pygame.font.SysFont("Garamond", 22)
  912.     textsurface3 = font3.render("EXIT", False, Dark_Gray)
  913.     jim3 = [17,575]
  914.     screen.blit(textsurface3, jim3)    
  915.     #-------------------------------------------------------------------
  916.     if IsCredits == True:
  917.         credits_code()
  918.     #-------------------------------------------------------------------
  919.     pygame.draw.rect(screen, color, input_rect)
  920.     text_surface = base_font.render(user_text, True, Gray)
  921.     screen.blit(text_surface, (input_rect.x+5, input_rect.y+5))
  922.     input_rect.w = max(100, text_surface.get_width()+10)
  923.     #-------------------------------------------------------------------
  924.     if IsRandom == True:
  925.         for i in Ypee:
  926.             if Ypee.index(i) == 0:
  927.                 jimy = [680,173]
  928.                 font = pygame.font.SysFont("Arial", 22)
  929.                 textsurface = font.render(i, True, Gray)
  930.                 jimy[0] = (jimy[0] - (textsurface.get_width()/2))
  931.                 screen.blit(textsurface, jimy)
  932.             else:
  933.                 jimy = [380,((Ypee.index(i)*19) + 200)]
  934.                 font = pygame.font.SysFont("Arial", 15)
  935.                 textsurface = font.render(i, False, Gray)
  936.                 screen.blit(textsurface, jimy)
  937.     pygame.display.flip()
  938.  
  939. clock.tick(60)
  940. run = True
  941. IsCredits = False
  942. IsRandom = False
  943. jesus = "Press a button on your left to start..."
  944. base_font = pygame.font.Font(None, 32)
  945. user_text = ''
  946. color_active = (0,0,0)
  947. color_passive = (0,0,0)
  948. color = color_passive
  949. input_rect = pygame.Rect(400, 200, 140, 32)
  950. active = False
  951. Ypee = []
  952. while run:
  953.     events = pygame.event.get()
  954.     for event in events:
  955.         if event.type == pygame.QUIT:
  956.             run = False
  957.         elif event.type == pygame.MOUSEBUTTONDOWN:
  958.             mouse_pos = event.pos
  959.             if random_gen.collidepoint(mouse_pos):
  960.                 IsRandom = True
  961.                 IsCredits = False
  962.                 Ypee = random_code()  
  963.                 jesus = "Random Generation"                
  964.                 print("The random generation button was pressed")
  965.                 print(Ypee)
  966.                 #-------------------------------------------------------------------  
  967.             if basic_gen.collidepoint(mouse_pos):
  968.                 IsRandom = False
  969.                 IsCredits = False
  970.                 jesus = "Basic Generation"
  971.                 print("The basic generation was pressed")
  972.                 #-------------------------------------------------------------------
  973.             if advanced_gen.collidepoint(mouse_pos):
  974.                 IsRandom = False
  975.                 IsCredits = False
  976.                 jesus = "Advanced Geneneration"
  977.                 print("The advanced generation was pressed")
  978.                 #-------------------------------------------------------------------    
  979.             if guide.collidepoint(mouse_pos):
  980.                 IsRandom = False
  981.                 IsCredits = False
  982.                 jesus = "Help Guide"
  983.                 print("The guide button was pressed")
  984.             if credits.collidepoint(mouse_pos):
  985.                 IsRandom = False
  986.                 IsCredits = False
  987.                 jesus = "Credits"
  988.                 print("The credits button was pressed")
  989.             if reddit_btn.collidepoint(mouse_pos):
  990.                 print("The reddit button was pressed")
  991.                 webbrowser.open(r"https://reddit.com/")    
  992.             if discord_btn.collidepoint(mouse_pos):
  993.                 print("The discord button was pressed")
  994.                 webbrowser.open(r"https://youtube.com/")    
  995.             if web_btn.collidepoint(mouse_pos):
  996.                 print("The website button was pressed")
  997.                 webbrowser.open(r"https://stackoverflow.com/")      
  998.             if exit_btn.collidepoint(mouse_pos):
  999.                 print("The exit button was pressed")
  1000.                 sys.exit()  
  1001.         if event.type == pygame.MOUSEBUTTONDOWN:
  1002.             if input_rect.collidepoint(event.pos):
  1003.                 active = True
  1004.             else:
  1005.                 active = False
  1006.         if event.type == pygame.KEYDOWN:
  1007.             if event.key == pygame.K_BACKSPACE:
  1008.                 user_text = user_text[:-1]
  1009.             elif event.key == pygame.K_RETURN:
  1010.                 final = user_text
  1011.                 if final != "trans rights are human rights":
  1012.                     user_text = ''
  1013.                 else:
  1014.                     print("You inputed: " + final)
  1015.             else:
  1016.                 user_text += event.unicode
  1017.         if active:
  1018.             color = color_active
  1019.         else:
  1020.             color = color_passive                                                                            
  1021.     render(jesus, color, input_rect, base_font, user_text, IsCredits, IsRandom, Ypee)        
  1022. pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement