Open broomo opened 3 months ago
added "and dropzone.can_drag_top_card" to card interacted method
`func _card_can_be_interacted_with(): var parent = get_parent() var valid = false if parent is CardPileUI:
if parent.is_card_ui_in_hand(self):
valid = parent.is_hand_enabled() and not parent.is_any_card_ui_clicked()
# check for cards in dropzone
var dropzone = parent.get_card_dropzone(self)
if dropzone:
valid = dropzone.get_top_card() == self and not parent.is_any_card_ui_clicked() and dropzone.can_drag_top_card
return valid`
In the example scene provided, after having no luck with the "can_drag_top_card" toggle using dropzones, I noticed the discard pile had this var set to false, but when setting it to true, cards could still not be dragged from top of discard.
I find that after can_drag_top_card is defined, it is not referenced again in any scripts, also, the discard pile simple does not have any code allowing it to be clicked and dragged from. it seems the can_drag_top_card set to false on the discard pile was just an illusion of function.