NodeSearchLogic
Summary
Section titled “Summary”Pure logic class for node search operations. Contains no state and can be easily tested in isolation.
Methods
Section titled “Methods”static func find_nodes_by_name(
nodes:Array
[
Node
]
,
name:String
)
->Array
[
Node
]
Pure function for searching by name Expects a typed Array[Node] to ensure callers provide node collections explicitly. Returns array of nodes that match the given name
static func find_nodes_by_script(
nodes:Array
,
script_name:String
)
->Array
[
Node
]
Pure function for searching by script Returns array of nodes that have the given script
static func find_nodes_by_group(
nodes:Array
,
group_name:String
)
->Array
[
Node
]
Pure function for searching by group membership Returns array of nodes that are in the given group
static func find_nodes_by_class(
nodes:Array
,
cls_name:String
)
->Array
[
Node
]
Pure function for searching by class type Returns array of nodes that are instances of the given class
static func find_nodes_by_property(
nodes:Array
,
property_name:String
,
property_value:Variant
)
->Array
[
Node
]
Pure function for searching by property value Returns array of nodes that have the given property value
static func find_nodes_by_method_result(
nodes:Array
,
method_name:String
,
expected_result:Variant
)
->Array
[
Node
]
Pure function for searching by method call result Returns array of nodes where the method call returns the expected value
static func combine_search_results(
search_results:Array
)
->Array
[
Node
]
Pure function for combining search results Returns array of nodes that match any of the search criteria
static func filter_search_results(
nodes:Array
,
filter_func:Callable
)
->Array
[
Node
]
Pure function for filtering search results Returns array of nodes that match the filter criteria
static func sort_search_results(
nodes:Array
,
sort_func:Callable
)
->Array
[
Node
]
Pure function for sorting search results Returns sorted array of nodes based on the sort function
static func get_script_name(
node:Node
)
->String
Pure function for getting script name from node Returns script filename or empty string if no script
static func validate_search_params(
search_method:int
,
search_string:String
)
->Array
[
String
]
Pure function for validating search parameters Returns array of validation issues
Source
Section titled “Source”addons/grid_building/placement/placement_rules/template_rules/resources/node_search_logic.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.