PlaceableSequence
AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: placeables/placeable_sequence.gd
Version: 5.0
class_name: PlaceableSequence
extends: GBResource
Summary
Groups multiple placeable variants under a single selectable slot for UI selection.
PlaceableSequence allows players to cycle through related building variants (e.g., Basic Tower → Heavy Tower → Rapid Tower) before placing on the grid. Each sequence contains an ordered array of Placeable resources that share a common purpose but have different properties, visuals, or functionality.
Key Features:
- Ordered variant collection with left/right cycling in UI
- Automatic arrow button display when 2+ variants exist
- Compatible with PlaceableList and PlaceableSequenceSelectionUI
- Validation delegation to individual Placeable objects
Usage Example: [codeblock] var tower_sequence := PlaceableSequence.new() tower_sequence.display_name = “Defense Towers” tower_sequence.placeables = [basic_tower, heavy_tower, rapid_tower] [/codeblock]
Integration:
- Use with PlaceableSequenceSelectionUI for tabbed variant selection
- Compatible with existing BuildingSystem placement workflow
- Each variant maintains its own placement rules and validation
Signals
(none)
Exports
display_nameplaceablesicon
Methods
count()- Returns the total number of placeable variants in this sequence. Used by UI components to determine if variant cycling controls should be displayed. [return] Number of placeable variants (0 if empty)
get_variant()- Retrieves a specific placeable variant by its index position. [param index] Zero-based index of the variant to retrieve [return] Placeable resource at the specified index, or null if index is out of bounds
variant_display_name()- Gets the display name for a specific variant, with fallback handling. [param index] Zero-based index of the variant to get the name for [return] Display name of the variant, or fallback “Variant N” if unavailable
get_editor_issues()- Validates the sequence configuration and returns any editor-time issues found. Performs sequence-level validation and delegates individual placeable validation to each Placeable object for proper separation of concerns. [return] Array of validation issue descriptions, empty if no issues found
get_runtime_issues()- 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