NodeSearchLogic

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Pure logic class for node search operations. Contains no state and can be easily tested in isolation.

Source File: addons/grid_building/placement/placement_rules/template_rules/resources/node_search_logic.gd

Extends: RefCounted

Public Methods

find_nodes_by_name

1
2
3
4
find_nodes_by_name(
    nodes: Array[Node],
    name: String
) -> Array[Node]

Flags: static

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


find_nodes_by_script

1
2
3
4
find_nodes_by_script(
    nodes: Array,
    script_name: String
) -> Array[Node]

Flags: static

Pure function for searching by script Returns array of nodes that have the given script


find_nodes_by_group

1
2
3
4
find_nodes_by_group(
    nodes: Array,
    group_name: String
) -> Array[Node]

Flags: static

Pure function for searching by group membership Returns array of nodes that are in the given group


find_nodes_by_class

1
2
3
4
find_nodes_by_class(
    nodes: Array,
    cls_name: String
) -> Array[Node]

Flags: static

Pure function for searching by class type Returns array of nodes that are instances of the given class


find_nodes_by_property

1
2
3
4
5
find_nodes_by_property(
    nodes: Array,
    property_name: String,
    property_value: Variant
) -> Array[Node]

Flags: static

Pure function for searching by property value Returns array of nodes that have the given property value


find_nodes_by_method_result

1
2
3
4
5
find_nodes_by_method_result(
    nodes: Array,
    method_name: String,
    expected_result: Variant
) -> Array[Node]

Flags: static

Pure function for searching by method call result Returns array of nodes where the method call returns the expected value


combine_search_results

1
combine_search_results(search_results: Array) -> Array[Node]

Flags: static

Pure function for combining search results Returns array of nodes that match any of the search criteria


filter_search_results

1
2
3
4
filter_search_results(
    nodes: Array,
    filter_func: Callable
) -> Array[Node]

Flags: static

Pure function for filtering search results Returns array of nodes that match the filter criteria


sort_search_results

1
2
3
4
sort_search_results(
    nodes: Array,
    sort_func: Callable
) -> Array[Node]

Flags: static

Pure function for sorting search results Returns sorted array of nodes based on the sort function


get_script_name

1
get_script_name(node: Node) -> String

Flags: static

Pure function for getting script name from node Returns script filename or empty string if no script


validate_search_params

1
2
3
4
validate_search_params(
    search_method: int,
    search_string: String
) -> Array[String]

Flags: static

Pure function for validating search parameters Returns array of validation issues