diff --git a/character/Barista.gd b/character/Barista.gd index 1174fd4..8e1e0e4 100644 --- a/character/Barista.gd +++ b/character/Barista.gd @@ -113,7 +113,7 @@ func remove_cup(): for item in carry_attachment.get_children(): if item is Cup: cup = item - carry_attachment.remove_child(item) + item.queue_free() if cup: return cup.coffee_type return null diff --git a/level/Fridge.gd b/level/Fridge.gd index 35227b4..fa98903 100644 --- a/level/Fridge.gd +++ b/level/Fridge.gd @@ -98,7 +98,7 @@ func set_using(): yield(tween, "tween_completed") animation_player.play("drinkBeverage") yield(animation_player, "animation_finished") - barista.carry_attachment.remove_child(cold_beverage) + cold_beverage.queue_free() # TODO: convert this into speech baloons func eprint(text: String): diff --git a/level/ServingTray.gd b/level/ServingTray.gd index f2d3732..8c1a25a 100644 --- a/level/ServingTray.gd +++ b/level/ServingTray.gd @@ -116,7 +116,7 @@ func take_items(): return for i in items_container_object.get_children(): var item_type = i.coffee_type - items_container_object.remove_child(i) + i.queue_free() func set_putting(): should_ignore_clicks = false