File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -1998,15 +1998,14 @@ func _organize_attachments() -> void:
19981998
19991999			#  We don't want to try and move it if it's still tweening.
20002000			#  But if it isn't, we make sure it always follows its parent is_running()
2001- 			if  not  (card ._tween .is_running ()) and  \
2002- 					card .state  in  \
2003- 					[CardState .ON_PLAY_BOARD ,CardState .FOCUSED_ON_BOARD ]:
2004- 				card .global_position  =  global_position  +  \
2005- 						Vector2 (
2006- 						(attach_index  +  1 ) *  card_size .x 
2007- 						*  CFConst .ATTACHMENT_OFFSET [attachment_offset ].x ,
2008- 						(attach_index  +  1 ) *  card_size .y  \
2009- 						*  CFConst .ATTACHMENT_OFFSET [attachment_offset ].y )
2001+ 			var  tween  : Tween  =  card ._tween .get_object ()
2002+ 			if  (not  (tween  and  tween .is_running ())
2003+ 				and  card .state  in  [CardState .ON_PLAY_BOARD ,CardState .FOCUSED_ON_BOARD ]
2004+ 				):
2005+ 				card .global_position  =  (global_position  + 
2006+ 					Vector2 (
2007+ 						(attach_index  +  1 ) *  card_size .x  *  CFConst .ATTACHMENT_OFFSET [attachment_offset ].x ,
2008+ 						(attach_index  +  1 ) *  card_size .y  *  CFConst .ATTACHMENT_OFFSET [attachment_offset ].y ))
20102009
20112010#  Returns the global mouse position but ensures it does not exit the
20122011#  viewport limits when including the card rect
Original file line number Diff line number Diff line change @@ -59,8 +59,9 @@ func reshuffle_all_in_pile(pile: Pile = cfc.NMAP.deck):
5959			await  get_tree ().create_timer (0.1 ).timeout 
6060	#  Last card in, is the top card of the pile
6161	var  last_card  : Card  =  pile .get_top_card ()
62- 	if  last_card ._tween  and  last_card ._tween .is_running ():
63- 		await  last_card ._tween .finished 
62+ 	var  tween  : Tween  =  last_card ._tween .get_object ()
63+ 	if  tween .is_running ():
64+ 		await  tween .finished 
6465	await  get_tree ().create_timer (0.2 ).timeout 
6566	pile .shuffle_cards ()
6667
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments