BuildActionData
Returns the preview instance from the build action if it exists
Placement API reference for placement classes in GridBuilding v5-0
This section contains the API reference for all placement classes in the GridBuilding v5-0 plugin.
Returns the preview instance from the build action if it exists
Instantiates a Placeable’s scene, sets its properties, and adds it to the world. Returns the instantiated Node2D if successful, otherwise null.[br][br] [code]p_placeable[/code]: [i]Placeable[/i] - The Placeable resource to instantiate[br] [code]p_preview[/code]: [i]Node2D[/i] - The preview node that holds the desired global_transform
Custom display for objects being built
Script to be added to the root of any preview instance node temporarily created by the building system after non-kept scripts are stripped out. Does not override an existing script in the root.
Resets preview when it exits the scene tree.
Handles changes to build mode. Cleans up build state and indicators when switching out of build mode.
Unit test helper: verify tile center calculation Returns the tile coordinate and world position for testing
Keyboard helper: detect rotation input from a key event and actions [param event] The keyboard input event to check [param actions] GBActions containing rotation action mappings [return] Rotation direction: 1 for clockwise, -1 for counter-clockwise, 0 for no rotation
Move the positioner by a specified number of tiles in a given direction
In editor validation
Creates views for each placeable
Be very careful about changing these because game saves do not know if you change the string key of loaded properties.
Scrollable list managing PlaceableListEntry nodes, providing selection & keyboard nav.
Enforces fixed height for consistent sizing when fixed_entry_height > 0
Finds all placeables at the path and sub directories and returns them as an array
Validates the injection depenendicies of this GBInjectable
Recursively finds all nodes of a specific type within a parent node
Validates the sequence for runtime usage and returns any issues found. Includes sequence-level validation plus comprehensive placeable validation. Note: Individual placeable.get_runtime_issues() calls already include their editor issues, preventing duplication while ensuring complete coverage. [return] Array of validation issue descriptions, empty if no issues found
Behavior:
Cleanup method to disconnect signals when no longer needed
Enforces fixed icon size for consistent icon dimensions when [member fixed_icon_size] > 0.[br] Constrains icon to a square boundary (fixed_icon_size x fixed_icon_size) while maintaining[br] aspect ratio. The larger dimension is scaled to fit fixed_icon_size, and the smaller dimension[br] scales proportionally. Icon is centered within the bounds.[br] When disabled (0), icon sizing is not enforced and will use scene file settings.
Factory: build a PlacementReport from validation issue dictionary Builds a PlacementReport using the owning GBOwner (not the owner_root Node)
Returns an array of issues found during runtime validation
Combines base_rules that apply to all placements within a context with additional_rules that apply to specific placements[br] [br] [code]base_rules[/code] The rules that apply to all placements [br] [code]additional_rules[/code] The rules that apply to specific placements [br] [code]ignore_base[/code] Whether to ignore base rules completely and return only the additional_rules
Combines base_rules that apply to all placements within a context with additional_rules that apply to specific placements[br] [br] [code]base_rules[/code] The rules that apply to all placements [br] [code]additional_rules[/code] The rules that apply to specific placements [br] [code]ignore_base[/code] Whether to ignore base rules completely and return only the additional_rules
Adds rule groups to the test and returns if all were setup successfully
Optional: Check if a preview is currently being shown.
Message to output when there are no tile collision indicators to check against the rule.
Checks if the tile data meets all required custom data matches
Message to output when there are no tile collision indicators to check against the rule.
Returns the preview instance from the build action if it exists
Instantiates a Placeable's scene, sets...
Custom display for objects being built
Script to be added to...
Resets preview when it exits the scene tree.
Handles changes to build mode....
Unit test helper: verify tile...
Keyboard helper: detect rotation input...
Move the positioner by a specified number of tiles in a given direction
In editor validation
Creates views for each placeable
Be very careful about changing...
Scrollable list managing PlaceableListEntry nodes, providing selection & keyboard nav.
Enforces fixed height for consistent sizing when fixed_entry_height > 0
Finds all placeables at the...
Validates the injection depenendicies of this GBInjectable
Recursively finds all nodes of a specific type within a parent node
Validates the sequence for runtime...
Behavior: - PlaceableSequence objects are...
Cleanup method to disconnect signals when no longer needed
Enforces fixed icon size for...
Factory: build a PlacementReport from...
Returns an array of issues found during runtime validation
Combines base_rules that apply to...
Adds rule groups to the test and returns if all were setup successfully
Optional: Check if a preview is currently being shown.
Message to output when there are no tile collision indicators to check against the rule.
Checks if the tile data meets all required custom data matches
Message to output when there are no tile collision indicators to check against the rule.