From 2b39bb455161db8932abc497c631c0792a175be5 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 19 Apr 2024 01:50:53 +0200 Subject: [PATCH] Add a `log_priority` method to log the priority of a specific node --- behaviours/priority.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/behaviours/priority.gd b/behaviours/priority.gd index 08e5ba7..54509b1 100644 --- a/behaviours/priority.gd +++ b/behaviours/priority.gd @@ -57,6 +57,10 @@ func priority_conditional(variant: Variant, truthy: int = alternative_priority, func get_ref() -> Node: return get_parent() +## Log the current [field priority] value. +func log_priority() -> void: + Log.p(self, "Priority: %d" % priority) + func _on_priority_changed(_new: int, _old: int) -> void: priority_changed_no_args.emit()