@@ -145,7 +145,7 @@ def __init__(self):
145145 self .pushLabel = customtkinter .CTkLabel (master = self .pushFrame , text = 'Which formation?' , fg_color = ("gray86" , "gray17" ))
146146 self .pushLabel .place (x = 10 , y = 80 )
147147 self .pushFormationDropdown = customtkinter .CTkComboBox (master = self .pushFrame , values = ["1st" , "2nd" , "3rd" , "4th" , "5th" ], width = 80 )
148- self .pushFormationDropdown .set ('3rd' )
148+ self .pushFormationDropdown .set (config . get ( 'PUSH' , 'formation' ) )
149149 self .pushFormationDropdown .place (x = 10 , y = 110 )
150150 # Push Duration
151151 # self.pushLabel = customtkinter.CTkLabel(master=self.pushFrame, text='Check for Victory every:', fg_color=("gray86", "gray17"))
@@ -666,6 +666,8 @@ def headlessArgs():
666666 if currenttimeutc .isoweekday () == day :
667667 printBlue ('Auto-Pushing ' + str (tower ) + ' using using the ' + str (config .get ('PUSH' , 'formation' ) + ' formation' ))
668668 openTower (tower )
669+ if isVisible ('buttons/challenge_plain' , 0.8 , retry = 3 , seconds = 3 , click = True , region = boundries ['challengeTower' ]): # lower confidence and retries for animated button
670+ configureBattleFormation (config .getint ('PUSH' , 'formation' ))[0 :1 ]
669671 config .read (settings ) # to load any new values (ie formation downdown changed and saved) into memory
670672 wait (3 )
671673 while 1 :
@@ -815,24 +817,24 @@ def dailies():
815817def push ():
816818 connect_device ()
817819 buttonState ('disabled' )
818- formationstr = str (app .pushFormationDropdown .get ())[0 :1 ]
820+ formation = int ( str (app .pushFormationDropdown .get ())[0 :1 ]) # to str first so we can take first character, then int
819821
820822 if app .pushLocationDropdown .get () == 'Campaign' :
821- printBlue ('Auto-Pushing Campaign using the ' + str (config . get ('PUSH' , 'formation' ) + ' formation' ) )
823+ printBlue ('Auto-Pushing Campaign using the ' + str (app . pushFormationDropdown . get ()) + ' formation' )
822824 confirmLocation ('campaign' , region = boundries ['campaignSelect' ])
823825 if str (app .pushFormationDropdown .get ()) != config .get ('PUSH' , 'formation' ):
824- config .set ('PUSH' , 'formation' , app .fastrewardsEntry .get ())
826+ config .set ('PUSH' , 'formation' , app .pushFormationDropdown .get ())
825827 updateSettings ()
826828 while 1 :
827- pushCampaign (formation = int ( formationstr ) , duration = int (config .get ('PUSH' , 'victoryCheck' )))
829+ pushCampaign (formation = formation , duration = int (config .get ('PUSH' , 'victoryCheck' )))
828830 else :
829831 printBlue ('Auto-Pushing ' + str (app .pushLocationDropdown .get ()) + ' using using the ' + str (app .pushFormationDropdown .get ()) + ' formation' )
830832 openTower (app .pushLocationDropdown .get ())
831833 if str (app .pushFormationDropdown .get ()) != config .get ('PUSH' , 'formation' ):
832- config .set ('PUSH' , 'formation' , app .fastrewardsEntry .get ())
834+ config .set ('PUSH' , 'formation' , app .pushFormationDropdown .get ())
833835 updateSettings ()
834836 while 1 :
835- pushTower (formation = int ( formationstr ) , duration = int (config .get ('PUSH' , 'victoryCheck' )))
837+ pushTower (formation = formation , duration = int (config .get ('PUSH' , 'victoryCheck' )))
836838
837839class IORedirector (object ):
838840 def __init__ (self , text_widget ):
0 commit comments