From d4dba21eda259e791204aeae69f22ea34f9e4869 Mon Sep 17 00:00:00 2001 From: Zacharie Guet Date: Fri, 1 Aug 2025 16:04:44 +0200 Subject: [PATCH] =?UTF-8?q?r=C3=A9paration=20d'une=20petite=20erreur=20dan?= =?UTF-8?q?s=20try=5Finteract=20de=20player.gd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entities/player/scripts/player.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entities/player/scripts/player.gd b/entities/player/scripts/player.gd index 916a0f2..d265772 100644 --- a/entities/player/scripts/player.gd +++ b/entities/player/scripts/player.gd @@ -26,7 +26,8 @@ func try_interact(): if len(interactables) > 1: # Sort them to the closer interactables.sort_custom( - func (el : Interactable): return el.global_position.distance_to(global_position) + func (el1 : Interactable, el2 : Interactable): + return el1.global_position.distance_to(global_position) > el2.global_position.distance_to(global_position) ) interactables[0].interact(self)