fix: equip_target fails if target is not equipable

This commit is contained in:
Sara Gerretsen 2026-03-18 15:25:15 +01:00
parent 5c7e2102c0
commit 930b66bc53

View file

@ -3,7 +3,7 @@ extends BehaviourAction
@onready var body := get_behaviour_tree().get_parent() as CharacterBody3D
func _enter() -> int:
if body.target == null or not body.target is Area3D:
if body.target == null or not body.target is Area3D or not body.target.can_interact():
return Fail
else:
body.equip_weapon(body.target)