fix: equip_target fails if target is not equipable
This commit is contained in:
parent
5c7e2102c0
commit
930b66bc53
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue