Clean up SweetLogger prints by making file and functions arguments automatic

This commit is contained in:
JonShard
2026-08-11 10:19:26 +02:00
parent bd43b0bd1e
commit 3ae1e089aa
26 changed files with 190 additions and 154 deletions
+3 -3
View File
@@ -25,15 +25,15 @@ static func find_first_child_of_type(node: Node, type: Variant) -> Node:
# Returns true if decendant is a decendant node of root, false otherwise. Returns false if either node is null.
static func is_node_decendant_of(decendant: Node, root: Node) -> bool:
if not decendant or not root:
SweetLogger.debug("is_node_decendant_of: decendant or root is null", [], "helper.gd", "is_node_decendant_of")
SweetLogger.debug("is_node_decendant_of: decendant or root is null", [])
return false
var current: Node = decendant
while current:
if current == root:
SweetLogger.debug("is_node_decendant_of: decendant {0} is a descendant of root {1}", [decendant.name, root.name], "helper.gd", "is_node_decendant_of")
SweetLogger.debug("is_node_decendant_of: decendant {0} is a descendant of root {1}", [decendant.name, root.name])
return true
current = current.get_parent()
SweetLogger.debug("is_node_decendant_of: decendant {0} is NOT a descendant of root {1}", [decendant.name, root.name], "helper.gd", "is_node_decendant_of")
SweetLogger.debug("is_node_decendant_of: decendant {0} is NOT a descendant of root {1}", [decendant.name, root.name])
return false