Fix a few crashes to do with logic ordering
This commit is contained in:
		| @@ -71,8 +71,9 @@ func _physics_process(delta): | ||||
| 	 | ||||
| 	#if the enter key is pressed, input the dice into the card | ||||
| 	if Input.is_action_just_pressed("ui_accept"): | ||||
| 		current_cards[hovering_card].dice_inputted(currently_holding_dice) | ||||
| 		current_cards[hovering_card].hovering_dice = null | ||||
| 		current_cards[hovering_card].dice_inputted(currently_holding_dice) | ||||
| 		hovering_card = 0 | ||||
| 		selected = false | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -17,6 +17,11 @@ func _physics_process(delta): | ||||
| 		selected_dice = null | ||||
| 		return | ||||
| 	 | ||||
| 	# skip turn if the list is empty | ||||
| 	if len(current_dice) == 0: | ||||
| 		selected = false | ||||
| 		return | ||||
| 	 | ||||
| 	# if selected dice is null, add a value | ||||
| 	if not selected_dice: | ||||
| 		selected_dice = 0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user