Other Classes

Other API reference for other classes in GridBuilding v5-0

Other Classes

This section contains the API reference for all other classes in the GridBuilding v5-0 plugin.

ActionLogSettings

Returns an array of issues found during runtime validation

CategoricalTag

Small image representing the tag in UI elements.

DragPathData

Converts global position to tile coordinates on the specified map. Helper function for converting world positions to tilemap coordinates.[br][br] [code]p_map[/code]: [i]TileMapLayer[/i] - The tilemap layer to convert coordinates for[br] [code]p_global_position[/code]: [i]Vector2[/i] - Global position to convert to tile coordinates

GridTargetingDebugText

Update indicator line only (no tile coordinates).

GridTargetingSettings

Formula for calculating AStarGrid2D movement cost When created, sets the default_default_estimate_heuristic on the AStarGrid2D of the GridTargetingSystem

GridTargetingState

Checks if the new target is part of the same object tree as any exclusion Returns true if new_target is a child/descendant of an excluded node This helps detect when TargetingShapeCast2D detects a different node of the same logical object

GridTargetingSystem

Gets issues that would prevent the targeting_system from being able to target. This should be called after grid targeting state properties have all been defined

HighlightSettings

Returns an array of issues found during runtime validation

IndicatorFactory

Returns: [i]RuleCheckIndicator[/i] - Created indicator instance, or null if creation failed

IndicatorSetupReport

Calculates the number of tiles that have an indicator over them. There should only be one indicator per tile!

IndicatorSetupUtils

Result class for position validation operations

IndicatorVisualSettings

Returns an array of issues found during runtime validation

Manipulatable

[param p_position] Final world position for the root object [param p_rotation] Accumulated rotation in radians from ManipulationParent [param p_scale] Accumulated scale (may include negative values for flips)

ManipulatableSettings

Returns an array of issues found during runtime validation

ManipulationData

Determines if the data has a valid setup

ManipulationParent

[code]return[/code]: [i]Array[String][/i] - List of validation issues (empty if valid)

ManipulationSettings

Message for unsupported node types

ManipulationState

Returns an array of runtime validation issues for this resource

ManipulationSystem

Clears manipulation data reference when the provided data matches the active state.

ManipulationTransformCalculator

[param expected] Dictionary with position, rotation, scale [param actual] Dictionary with position, rotation, scale [param position_tolerance] Maximum difference for position (default 0.1) [param rotation_tolerance] Maximum difference for rotation in radians (default 0.01) [param scale_tolerance] Maximum difference for scale (default 0.01) [return] Dictionary with keys: matches (bool), differences (Dictionary)

ModeState

Returns an array of issues found during runtime validation

NodeLocator

Extracts the script file name from an object’s attached script. Uses pure logic class for composition over inheritance. Returns the script filename with extension, or empty string if no script.[br][br] [code]p_check[/code]: [i]Object[/i] - Object to get script name from

NodeSearchLogic

Pure function for validating search parameters Returns array of validation issues

PhysicsMatchingUtils2D

Checks if a collision object has any active physics layers that match a given bitmask.[br][br] [code]col_obj[/code]: [i]CollisionObject2D[/i] - Collision object to check layers for[br] [code]p_check_mask[/code]: [i]int[/i] - Physics layer bitmask to match against

PolygonIndicatorHeuristics

Prunes fringe offsets for concave polygons by removing tiles whose overlap area is below min_area_ratio * tile_area. Returns a new array (may be original if no pruning beneficial).

PolygonTileMapper

Helper: Compute polygon area using shoelace formula

PolygonTileOverlap

Helper: Compute polygon area using shoelace formula

PreviewFactory

The root node of the scene will be assigned the preview_root_script if any is in the settings

RecenterPlan

Typed result for recentering plan.

ResourceStack

Initializes the resource stack with a type and count.

TargetHighlighter

Check if the target is a preview object (has building_node script attached) Returns true if the target has the building_node script, indicating it’s a preview object

TargetInfoSettings

Returns an array of issues found during runtime validation

TargetInformer

Handle targeting state changes - shows info for any targeted object (hover).[br] [br] [b]Priority Logic:[/b] If manipulation is active (active_target_node != null) or building preview is active (preview != null), this handler returns early without updating the display. This ensures manipulation and building preview info takes precedence over targeting info.[br] [br] [code]p_new[/code]: [i]Node2D[/i] - Newly targeted node (can be null)[br] [code]_p_old[/code]: [i]Node2D[/i] - Previously targeted node (unused)

TargetingArea2D

Called when an area exits overlap

TargetingShapeCast2D

Promote a raw collider (which may be a child physics body) to its root Area2D if that root represents the intended gameplay target. This handles scenes like the Smithy where the visual/physics StaticBody2D is a child of an Area2D which carries the targetable layer. [param raw] The collider returned by ShapeCast2D. [return] A Node2D to use as targeting root (prefer Area2D on targetable layer) or the original if no promotion needed.

TestSetupFactory

Validates that all required dependencies are properly set. Returns: Array[String] - List of validation issues (empty if valid)

VirtualItemContainer

Gets a number count of an item type stored in the container if any