Grid Placement

TargetingState2D

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: systems/grid_targeting/targeting_state_2d.gd

Version: 5.1

class_name: TargetingState2D extends: RefCounted

Summary

TargetingState2D

Pure data state for targeting objects within the Grid Building System.

Signals

(none)

Exports

(none)

Methods

  • _init()
  • is_ready()
    • Returns true if the targeting state has all runtime requirements met for operation
  • is_manual_targeting_active()
    • Returns true if manual targeting mode is currently active. When active, automatic targeting systems should not overwrite the target.
  • clear_collision_exclusions()
    • Clears the collision exclusion list. This is called automatically when the target changes (and manipulation is not active), but can also be called manually when ending manipulation operations.
  • get_target_map_tile_shape()
    • Get the shape of the currently targeted TileMapLayer’s tileset tiles
  • get_target_map_tile_set()
    • Gets the tileset of the currently targeted TileMapLayer
  • get_target()
    • Returns the resolved target node (the logical root).[br] This is what you should use for display, manipulation, and game logic.[br] [br] [b]This is the primary public API for accessing the current target.[/b]
  • get_collider()
    • Returns the raw collision object that detection by ShapeCast etc connected with [br] [br] [b]Internal use only.[/b] Most code should use get_target() instead, which returns the resolved logical root.
  • get_tile_size()
    • Gets the tile size from the target map’s tile set
  • validate_runtime()
    • Ensures that the targeting state is ready for runtime operation without producing any logging side-effects.
  • get_owner()
  • get_owner_root()
  • get_origin()
    • Returns the origin node associated with this targeting state. [return] The origin node provided by the owner context or null when unavailable.
  • get_editor_issues()
    • Returns an array of issues found during editor validation
  • get_runtime_issues()
    • Should be called AFTER necessary properties on the state have been set Checks the minimum setup dependencies for the state.
  • set_snapshot()
  • _is_redundant_collider_update()
    • Helper: determine if collider update can be skipped Returns true when the incoming collider is identical and a resolved target already exists