Backfill slots when dropping

This commit is contained in:
Olivier 'reivilibre' 2023-01-08 23:48:05 +00:00
parent e528126fd2
commit 49bd7cd62c
1 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,12 @@ func _act_drop():
return
var child = $ItemHolder1.get_child(0)
child.drop(self, direction * 10)
if $ItemHolder2.get_child_count() > 0:
# backfill the child
var new_child = $ItemHolder2.get_child(0)
$ItemHolder2.remove_child(new_child)
$ItemHolder1.add_child(new_child)
var press_area_press = null